Table of contents
Collapse the table of content
Expand the table of content

TextRange.InsertSymbol Method (Publisher)

office 365 dev account|Last Updated: 8/24/2017
3 Contributors

Returns a TextRange object that represents a symbol inserted in place of the specified range or selection.


expression. InsertSymbol( FontName, CharIndex)

_expression_A variable that represents a TextRange object.


NameRequired/OptionalData TypeDescription
FontNameRequiredStringThe name of the font that contains the symbol.
CharIndexRequiredLongThe Unicode character for the specified symbol.

Return Value



If you do not want to replace the range or selection, use the TextRange.Collapse Method (Publisher) before you use this method.


This example inserts a double-headed arrow at the cursor.

Sub Insert Arrow() 
    ActiveDocument.Pages(1).Shapes(1).TextFrame.TextRange _ 
            .Paragraphs(Start:=1, Length:=1).Select
    With .TextFrame.TextRange 
            .Collapse Direction:= pbCollapseStart
            .InsertSymbol FontName:="Symbol", CharIndex:=171
        End With 
End Sub
© 2018 Microsoft