Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trapping Mail Merge Errors

Status
Not open for further replies.

stephenk

Programmer
Mar 12, 2001
21
AU
I have an application which automates the merge of Word documents and data. I want to check errors before running the merge and one error in particular sometimes occurs as follows:

It is possible for somebody to remove a particular field from the header source and not remove references to that field in the merge document. When I go to execute the merge (or even check the merge), I am shown a dialog box telling me that the Merge Field that was removed is not found in the header source and gives the option of removing it or replacing it.

I do not want this box to appear but rather just remove the field from the document. How could this be acheived? (Using either VBA or VB).

As an alternative, I have noticed the Word sometimes writes an error to the merged document stating "Error! the merge field was not found..." or something similar. I can live with this but I dont want the dialog box to appear.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top