本示例检查所选内容中的倾斜格式并清除在所选内容中存在的倾斜格式。

If Selection.Type = wpsSelectionNormal Then
    mySel = Selection.Font.Italic
    If mySel = wpsUndefined or mySel = True Then
        MsgBox "There's italic text in selection.Click OK to remove."
        Selection.Font.Italic = False
    Else
        MsgBox "No italic text in the selection."
    End If
Else
    MsgBox "You need to select some text."
End If