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
"Andy Fish" <ajfish[ at ]blueyonder.co.uk> wrote in message news:O7PJ%23dzKGHA.3200[ at ]tk2msftngp13.phx.gbl...
[Quoted Text] > 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 > >
|