We have a custom data base application that merges with Word 2000 to produce
documents. The documents contain fields that are populated from the databse
and converted to text when the data and documents are meged together. Once a
document is produced, the Word spellcheck will not check any text that has
come from the fields in the database. I have set up a macro to run when the
documents merge to try and rectify the spellcheck problem, however this only
results in the spellcheck checking the first incorrect word and then stating
that the spellcheck is complete even though we know there are further
mispelled words in the document.
The code for the macro is as follows:
Selection.WholeStory
Selection.LanguageID = wdEnglishAUS
Selection.NoProofing = False
Application.CheckLanguage = True
After the document merges, the macro runs automatically and then we run the
spellcheck manually with the result that only the first mispelled word is
checked.
Any suggestions?
thanks,
Cindy M. - 07 Sep 2006 09:57 GMT
Hi =?Utf-8?B?SnVsZXM=?=,
Don't use "Selection", but a range that includes the entire "main story"
Dim rng as Word.Range
Set rng = ActiveDocument.Content
rng.LanguageID 'and so on
> We have a custom data base application that merges with Word 2000 to produce
> documents. The documents contain fields that are populated from the databse
[quoted text clipped - 16 lines]
> spellcheck manually with the result that only the first mispelled word is
> checked.
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)