How to suppress any (error) messages during Ms Word 2002 MailMerge?

C

Chamara Ratnaweera

Hi !

In my application, mailmerge needs to be performed without any user
interaction.
However when there's any error with source data or any grammer mistake
in the Word template, there may be message boxes poped up. I need to
suppress these message boxes and log those errors run time.

Can anybody tell me how to do that?

I'm using Office XP (2002) Word API in a C#.NET application.

Thanks in Advance !
 
R

Ram

I am trying to do the same thing and I tried
wrdApp.DisplayAlerts = Word.WdAlertLevel.wdAlertsNone

but does not fix source data problems and such.

Can anyone please help?

Thanks,
Ram
 
C

Cindy M -WordMVP-

Hi Chamara,
In my application, mailmerge needs to be performed without any user
interaction.
However when there's any error with source data or any grammer mistake
in the Word template, there may be message boxes poped up. I need to
suppress these message boxes and log those errors run time.
Suppressing messages in Word is a bit of a hit-and-miss proposition. The
general rule is: figure out what errors can occur, and do your best to
avoid generating them.

For the grammar and spelling, it would be test to
- store the user's option setting
- turn automatic checking off
- perform your actions
- restore the user's settings

Once you've figured out what kind of data source errors could occur, use
ADO(.NET) to query the data before opening the main merge document. If
the problem can occur, abort the opening until the data is correct.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
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