To be honest, I don't know for sure that you can't dismiss the message with
the ole server, however, I found the a post in MSDN, PSS 307292, which
references using a timer to detect when Word has stopped responding.
It's not the most graceful way to handle it, but it also takes care of other
error messages and problems that may occur while working with Word.
HTH
> I have a VB.NET Service Program that performs a Mail Merge
> with template documents and the merge data. When a merge
> field is present in the Template Document but not present
> in the header fields I receive the "Invalid Merge Field"
> Error (Dialog Box). How can I trap this error in code
> using the World Mail Merge Object Model?
Peter Jamieson - 24 Oct 2003 21:31 GMT
Generally speaking the most you can do to prevent alerts is set
Application.DisplayAlerts = wdAlertsNone
but it may not help in the specific case being discussed. AFAIK this sort of
behaviour has long been a problem with Word whatever development environment
you are using and your suggestion is probably the only approach likely to
work.
--
Peter Jamieson
MS Word MVP
> To be honest, I don't know for sure that you can't dismiss the message with
> the ole server, however, I found the a post in MSDN, PSS 307292, which
[quoted text clipped - 11 lines]
> > Error (Dialog Box). How can I trap this error in code
> > using the World Mail Merge Object Model?