ModifyEnclosure Method

Microsoft Word Visual Basic

expression.ModifyEnclosure(Style, Symbol, EnclosedText)

expression    Required. An expression that returns a Range object.

Style    Required Variant. The style of the enclosure. Can be any WdEncloseStyle constant.

WdEncloseStyle can be one of these WdEncloseStyle constants.
wdEncloseStyleLarge
wdEncloseStyleNone
wdEncloseStyleSmall

Symbol    Optional Variant. The symbol in which to enclose the specified range. Can be any WdEnclosureType constant.

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"