macro to spell check entire document
i'm ocr-ing doc , there lot of spelling errors. need macro replace words first option spell check proposes. need macro separates superscripts words space, since word superscript count misspelled word , it's not.
i need macro ignore words capitalized.
also, wrong with
<cite>answers.microsoft.com</cite>
that website not working. wanted post question there didn't work, have use website.
this should it:
sub spelling2() dim wd as range dim oldtxt as string dim newtxt as string dim sugg as spellingsuggestions dim addspace as string application.screenupdating = false for each wd in activedocument.words oldtxt = wd.text if not application.checkspelling(word:=oldtxt, ignoreuppercase:=true) then set sugg = application.getspellingsuggestions(oldtxt) if sugg.count <> 0 then newtxt = application.getspellingsuggestions(oldtxt).item(1) if right(oldtxt, 1) = " " then addspace = " " else addspace = "" wd.text = newtxt & addspace end if end if next wd application.screenupdating = true end sub
Microsoft Office > Word IT Pro Discussions
Comments
Post a Comment