ModifyEnclosure Method
Adds, modifies, or removes an enclosure around the specified character or characters.
expression.ModifyEnclosure(Style, Symbol, EnclosedText)
expression Required. An expression that returns a Range object.
WdEncloseStyle
WdEncloseStyle can be one of these WdEncloseStyle constants. |
wdEncloseStyleLarge |
wdEncloseStyleNone |
wdEncloseStyleSmall |
WdEnclosureType
WdEnclosureType can be one of these WdEnclosureType constants. |
wdEnclosureCircle Default. |
wdEnclosureDiamond |
wdEnclosureSquare |
wdEnclosureTriangle |
EnclosedText Optional Variant. The characters that you want to enclose. If you include this argument, Microsoft Word replaces the specified range with the enclosed characters. If you don't specify text to enclose, Microsoft Word encloses all text in the specified range.
Remarks
For more information on using Word with Asian languages, see Word features for Asian languages .
Example
This example replaces the current selection with the number 25 enclosed in a circle.
Selection.Range.ModifyEnclosure wdEncloseStyleLarge, _
wdEnclosureCircle, "25"
Applies to | Range Object