Spell check fields from a data base

J

Jules

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,
 
C

Cindy M.

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
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.

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 :)
 

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