In MS word,

U clear formatting for the selected text by clicking the "Clear Formatting"
from the "Styles and Formatting" box
How can I achieve this in VBA

activedocument.paragraphs(1). ??
I cant find .clearFormatting

Thanks

Re: Clear Style and Formatting by Helmut

Helmut
Fri Mar 09 02:15:40 CST 2007

Hi vbaNOOB,

clearformatting applies
to the find-, replace- and the selection-object.

Either you select the paragraph

or use

ActiveDocument.Paragraphs(1).Range.Font.Reset

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"

Re: Clear Style and Formatting by Helmut

Helmut
Fri Mar 09 02:21:02 CST 2007

hmm,

you might have to reset the paragraphs style
to "normal" in addition.

--

Helmut Weber, MVP WordVBA


Re: Clear Style and Formatting by Klaus

Klaus
Sat Mar 10 19:41:56 CST 2007

"Helmut Weber" <nbhymsjxdgcn@mailinator.com> wrote:
> hmm,
>
> you might have to reset the paragraphs style
> to "normal" in addition.


And if you want to replicate whatever Word does perfectly:
WordBasic.ClearFormatting

(I'm not sure what it does exactly, either)

Regards,
Klaus