Expand Minimize

Bookmark.InsertSymbol Method

Inserts a symbol in place of the Bookmark control.

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word (in Microsoft.Office.Tools.Word.dll)

void InsertSymbol(
	int CharacterNumber,
	ref Object Font,
	ref Object Unicode,
	ref Object Bias
)

Parameters

CharacterNumber
Type: System.Int32

The character number for the specified symbol. This value is always the sum of 31 and the number that corresponds to the position of the symbol in the table of symbols (counting from left to right). For example, to specify a delta character at position 37 in the table of symbols in the Symbol font, set CharacterNumber to 68.

Font
Type: System.Object

The name of the font that contains the symbol.

Unicode
Type: System.Object

true to insert the Unicode character specified by CharacterNumber; false to insert the ANSI character specified by CharacterNumber. The default value is false.

Bias
Type: System.Object

Sets the font bias for symbols. This argument is useful for setting the correct font bias for East Asian characters. Can be one of the following WdFontBias constants: wdFontBiasDefault, wdFontBiasDontCare, or wdFontBiasFareast. This argument might not be available to you, depending on the language support (U.S. English, for example) that you have selected or installed.

Calling this method might delete the Bookmark control.

Optional Parameters

For information on optional parameters, see Optional Parameters in Office Solutions.

The following code example adds a Bookmark control to the document and then inserts a double-headed arrow into the bookmark. The bookmark is deleted from the document when you use the InsertSymbol method.

This example is for a document-level customization.

private void BookmarkInsertSymbol()
{
    this.Paragraphs[1].Range.InsertParagraphBefore();
    Microsoft.Office.Tools.Word.Bookmark bookmark1 =
        this.Controls.AddBookmark(this.Paragraphs[1].Range,
        "bookmark1");

    int CharacterNumber = 171;
    bookmark1.InsertSymbol(CharacterNumber, ref missing, ref missing,
        ref missing);
}

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft