InsertSymbol Method
Returns a TextRange object that represents a symbol inserted into the specified text range.
expression**.InsertSymbol**(FontName, CharNumber, UniCode)
*expression * Required. An expression that returns a TextRange object.
FontName Required String. The font name.
CharNumber Required Long. The Unicode or ASCII character number.
MsoTriState
MsoTriState can be one of these MsoTriState constants. |
msoCTrue Doesn't apply to this method. |
msoFalse Default. The CharNumber argument represents an ASCII character number. |
msoTriStateMixed Doesn't apply to this method. |
msoTriStateToggle Doesn't apply to this method. |
msoTrue The CharNumber argument represents a Unicode character. |
Example
This example inserts the Registered Trademark symbol after the first sentence of the first paragraph in a new text box on the first slide in the active presentation.
Sub Symbol()
Dim txtBox As Shape
'Add text box
Set txtBox = Application.ActivePresentation.Slides(1) _
.Shapes.AddTextbox(Orientation:=msoTextOrientationHorizontal, _
Left:=100, Top:=100, Width:=100, Height:=100)
'Add symbol to text box
txtBox.TextFrame.TextRange.InsertSymbol _
FontName:="Symbol", CharNumber:=226
End Sub
Applies to | TextRange Object
See Also | InsertAfter Method | InsertBefore Method | InsertDateTime Method | InsertSlideNumber Method