Expand Minimize

Selection.CreateTextbox Method (Word)

Published: July 16, 2012

Adds a default-size text box around the selection.

expression .CreateTextbox

expression Required. A variable that represents a Selection object.

If the selection is an insertion point, this method changes the pointer to a cross-hair pointer so that the user can draw a text box.

Using this method is equivalent to clicking the Text Box button on the Drawing toolbar. A text box is a rectangle with an associated text frame.

This example adds a text box around the selection and then changes the text box's line style.

If Selection.Type = wdSelectionNormal Then 
 Selection.CreateTextbox 
 Selection.ShapeRange(1).Line.DashStyle =msoLineDashDot 
End If

Community Additions

ADD
Show:
© 2014 Microsoft