Edit

Word.SelectionInsertSymbolOptions interface

Represents the options for the Selection.insertSymbol method.

Remarks

API set: WordApiDesktop 1.4

Used by

Examples

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/55-selection/insert-symbol.yaml

// Inserts a Wingdings checkmark (ANSI character 252) at the selection.
// The font option selects the symbol font, unicode: false uses the ANSI code point,
// and bias: Word.FontBias.standard ensures the standard (non-East-Asian) glyph is used.
await Word.run(async (context) => {
  const options: Word.SelectionInsertSymbolOptions = {
    font: "Wingdings",
    unicode: false,
    bias: Word.FontBias.standard,
  };
  context.document.selection.insertSymbol(252, options);
  await context.sync();

  console.log("Inserted Wingdings checkmark (character 252).");
});

Properties

bias

If provided, specifies the font bias for symbols. This argument is useful for setting the correct font bias for East Asian characters. The default value is standard.

font

If provided, specifies the name of the font that contains the symbol.

unicode

If provided, specifies whether the character is Unicode. true to insert the Unicode character specified by the characterNumber property when the Selection.insertSymbol method is called; false to instead insert the ANSI character specified by the characterNumber property. The default value is false.

Property Details

bias

If provided, specifies the font bias for symbols. This argument is useful for setting the correct font bias for East Asian characters. The default value is standard.

bias?: Word.FontBias | "Standard" | "FarEast" | "NoSpecified";

Property Value

Word.FontBias | "Standard" | "FarEast" | "NoSpecified"

Remarks

API set: WordApiDesktop 1.4

font

If provided, specifies the name of the font that contains the symbol.

font?: string;

Property Value

string

Remarks

API set: WordApiDesktop 1.4

unicode

If provided, specifies whether the character is Unicode. true to insert the Unicode character specified by the characterNumber property when the Selection.insertSymbol method is called; false to instead insert the ANSI character specified by the characterNumber property. The default value is false.

unicode?: boolean;

Property Value

boolean

Remarks

API set: WordApiDesktop 1.4