#1
|
|||
|
|||
supress mail merge error document
Hello,
Im working on a mail merge vba script to merge documents individually. I get hung up on some documents with errors. When Word encounters a field error a separate document pops up that says "A Field Calculation error occurred in record x" Quite honestly, I dont care about the calculation issues. I just need this error document to dissapear. How can I prevent this error document from popping up? I've tried looking into the mail merge objects but I cant seem to find any way to work with the error document object. Any help is appreciated. |
#2
|
|||
|
|||
Solved
Just solved it.
It all has to do with the Code:
.execute = False Code:
ActiveDocument.MailMerge.execute = False Code:
ActiveDocument.MailMerge.execute = True I was able to turn off display alerts which turned off the message box. I put Code:
Application.DisplayAlerts = wdAlertsNone Code:
Application.DisplayAlerts = wdAlertsAll |
#3
|
||||
|
||||
You really should address the cause of the field calculation errors instead of trying to hide the warning.
Putting: Application.DisplayAlerts = wdAlertsNone "at the beginning of the VBA Macro" kills a mailmerge main document's links to its data source, turning it into an ordinary document and there'll be no mailmerge to execute.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
error document, mail merge, vba |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mail Merge Error | mklindquist0815 | Mail Merge | 1 | 07-14-2017 08:36 PM |
mail merge error in vba | texas1014 | Word VBA | 2 | 03-08-2017 03:25 PM |
vba error when trying to do a mail merge | texas1014 | Mail Merge | 1 | 03-08-2017 03:23 PM |
Mail merge error? | SRE | Outlook | 0 | 01-11-2010 05:54 PM |
Error Message in Mail Merge | A Bhavani | Mail Merge | 0 | 11-26-2008 12:08 PM |