DashStyle 属性

       

返回或设置指定线条的虚线线型。MsoLineDashStyle,可读写。

expression.DashStyle

expression   必需。该表达式返回“应用于”列表中的一个对象。

示例

本示例为活动文档添加蓝色虚线。

Dim docActive As Document

Set docActive = ActiveDocument

With docActive.Shapes.AddLine(10, 10, 250, 250).Line
    .DashStyle = msoLineDashDotDot
    .ForeColor.RGB = RGB(50, 0, 128)
End With