You can use
Selection.ClearFormatting
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi, I use Dragon Naturally Speaking commands to call VBA subroutines to apply various paragraph and character styles in Word. I have 20 working macros of this form:
Sub FormatRed()
Selection.Style = ActiveDocument.Styles("Intense Emphasis")
End Sub
I would like to make a subroutine that uses "Clear All" instead of Intense Emphasis, but Word seems to protest that there is no such style. In other words, the "Clear All" operation is not represented as a style in the known style list. It's only available as some kind of a direct call to some subroutine somewhere.
Is there any way I can use a VBA call to clear formatting as if I manually clicked Clear All at the top of the Styles pane?
I've looked on the net, looked through the Intellisense on ActiveDocument.*, and searched the forums, but have found nothing.
The reason I want a voice-driven Clear All command is that setting the format to Normal does not always undo tricky formatting under the hood. Normal "kind of" applies normal, but in some cases, it cannot undo what is already there.
Thank you. Here's hoping you know something that I can't find.. :-)
***Post moved by moderator to appropriate forum category.***
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
You can use
Selection.ClearFormatting
It works!!
Thank you!