Bookmark.InsertSymbol(Int32, Object, Object, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Inserts a symbol in place of the Bookmark control.
public void InsertSymbol (int CharacterNumber, ref object Font, ref object Unicode, ref object Bias);
abstract member InsertSymbol : int * obj * obj * obj -> unit
Public Sub InsertSymbol (CharacterNumber As Integer, Optional ByRef Font As Object, Optional ByRef Unicode As Object, Optional ByRef Bias As Object)
Parameters
- CharacterNumber
- 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
- Object
The name of the font that contains the symbol.
- Unicode
- 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
- 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.
Examples
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);
}
Private Sub BookmarkInsertSymbol()
Me.Paragraphs(1).Range.InsertParagraphBefore()
Dim Bookmark1 As Microsoft.Office.Tools.Word.Bookmark = _
Me.Controls.AddBookmark(Me.Paragraphs(1).Range, "Bookmark1")
Bookmark1.InsertSymbol(171)
End Sub
Remarks
Calling this method might delete the Bookmark control.
Optional Parameters
For information on optional parameters, see Optional Parameters in Office Solutions.