WPS 基础接口 > 文字 API 参考 > Font > 属性 > Font.Underline 属性
返回或设置应用于字体的下划线类型。可读写 WdUnderline 类型。

语法

表达式.Underline

表达式   必选。一个代表 Font 对象的变量。

示例

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

示例代码
if(Selection.Type == wdSelectionNormal){
    Selection.Font.Underline = wdUnderlineSingle
}
else{
    MsgBox("You need to select some text.")
}


请参阅