本示例在所选内容周围添加一个文本框,然后改变该文本框线型。

If Selection.Type = wpsSelectionNormal Then
    Selection.CreateTextbox
    Selection.ShapeRange.Line.DashStyle = KsoLineDashDot
End If