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