View Single Post
  #2   Report Post  
Peter Jamieson
 
Posts: n/a
Default

Assuming you are using Word 2002 or later, you will probably need to use
Word's MailMerge events, specifically the MailMergeBeforeRecordMerge event,
to inspect the value of the field before merging it.

The only other suggestion I can make is that your VB program could do a
preliminary pass through the data to construct and validate all the file
names before actually starting the merge.

Peter Jamieson

"Gary via OfficeKB.com" wrote in message
...
Hi,

I have a VB program that we use to send emails to customers. We use a
letter_name field in the database which is used in a IncludeText field to
get the appropriate letter. I need to be able to trap the "Error! Not a
valid filename." error and stop the merge if the IncludeText field can not
find the filename. Any suggestions?

Thanks

Gary

--
Message posted via http://www.officekb.com