removing the spelling errors from a word document

A

Andy Fish

Hi,

I would like to get a word document saved with the spelling and gramatical
errors removed - not just hidden from the screen but actually not stored in
the document.

I am saving the document as XML and found that if I uncheck "check spelling
as you type" (which automatically checks "hide spelling errors in this
document), then save the document to XML, I still get all the spelling and
gramatical errors recorded in the document itself.

I need a solution that can be implemented either using OLE to word itself,
or processing the XML. Crucially, in the latter scenario, it's vital that
any <w:r>s that were split by a <w:proofErr> are joined back up to make a
single run (which makes me think it may be easier to find some setting in
word itself than doing it by XSLT).

TIA

Andy
 
D

Doug Robbins - Word MVP

Dim i As Long
For i = ActiveDocument.SpellingErrors.Count To 1 Step -1
ActiveDocument.SpellingErrors(i).Delete
Next i


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top