InsertSymbol Method

Applies To

Range object, Selection object.

Description

Inserts a symbol in place of the specified range or selection.

Note If you don't want to replace the range or selection, use the Collapse method before you use this method.

Syntax

expression.InsertSymbol(CharacterNumber, Font, Unicode)

expression Required. An expression that returns a Range or Selection object.

CharacterNumber Required Long. The character number for the specified symbol. This value will always be 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 Optional Variant. The name of the font that contains the symbol.

Unicode Optional Variant. True to insert the unicode character specified by CharacterNumber; False to insert the ANSI character specified by CharacterNumber. The default value is False.

See Also

InsertAfter method, InsertBefore method.

Example

This example inserts a double-headed arrow at the insertion point.

With Selection
    .Collapse Direction:=wdCollapseStart
    .InsertSymbol CharacterNumber:=171, Font:="Symbol", Unicode:=False
End With
This example inserts a bullet and a tab stop at the beginning of the first paragraph in the selection.

Set myRange = Selection.Paragraphs(1).Range
With myRange
    .Collapse Direction:=wdCollapseStart
    .InsertSymbol CharacterNumber:=183, Font:="Symbol", Unicode:=False
    .MoveStart Unit:=wdCharacter, Count:=1
    .InsertAfter vbTab
End With