CreateTextbox Method 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