Underline 属性

       

该属性返回或设置应用于字体或区域的下划线的类型。WdUnderline,可读写。

expression.Underline

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

示例

本示例给活动文档中的第四个单词添加双下划线。

ActiveDocument.Words(4).Underline = wdUnderlineDouble

本示例给所选内容添加单下划线。

If Selection.Type = wdSelectionNormal Then
    Selection.Font.Underline = wdUnderlineSingle
Else
    MsgBox "You need to select some text."
End If