Export (0) Print
Expand All
Expand Minimize

Range.ModifyEnclosure Method (Word)

Published: July 16, 2012

Adds, modifies, or removes an enclosure around the specified character or characters.

expression .ModifyEnclosure(Style, Symbol, EnclosedText)

expression Required. A variable that represents a Range object.

Parameters

Name

Required/Optional

Data Type

Description

Style

Required

Variant

The style of the enclosure. Can be any WdEncloseStyle constant.

Symbol

Optional

Variant

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

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.

This example replaces the current selection with the number 25 enclosed in a circle.

Selection.Range.ModifyEnclosure wdEncloseStyleLarge, _ 
 wdEnclosureCircle, "25"

Community Additions

ADD
Show:
© 2014 Microsoft