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

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