Skip to content

Latest commit

 

History

History
51 lines (30 loc) · 1.15 KB

Word.Selection.CreateTextbox.md

File metadata and controls

51 lines (30 loc) · 1.15 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Selection.CreateTextbox method (Word)
vbawd10.chm158663179
vbawd10.chm158663179
Word.Selection.CreateTextbox
e3c567ee-949f-5e87-43c2-633cdae334b0
06/08/2017
medium

Selection.CreateTextbox method (Word)

Adds a default-size text box around the selection.

Syntax

expression. CreateTextbox

expression Required. A variable that represents a Selection object.

Remarks

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.

Example

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

See also

Selection Object

[!includeSupport and feedback]