trapping mail merge event

Add-in Express™ Support Service
That's what is more important than anything else

trapping mail merge event
 
Phillippe Allen




Posts: 30
Joined: 2005-11-07
I am trying to write an addin for word for operation on the doc that is created by a mail merge operation. Thuis means that I need to know various things such as the datasource that the document was created from. As near as I can figure, since the created doc does not appear to know this information, the only way to do this is to trap the mail merge event in some way on the source doc and pass this to the addin (ef datasource.filename). How can I do this?
I am using Word2000 but will move to 2003 if that is the only way to solve this.

Regards
Phil
Posted 14 Nov, 2005 22:43:12 Top
Dmitry Kostochko


Add-in Express team


Posts: 2830
Joined: 2004-04-05
Hi Phillippe,

Word XP has some new events related to mail merge operations (OnMailMergeBeforeMerge, OnMailMergeAfterMerge, etc.). But I think you can do some things with your Word 2000. You can try to work with the MailMerge property of the Document interface. One thing I can't figure out is what event in Word 2000 must be trapped. I am afraid there is no such event there.

Posted 15 Nov, 2005 07:11:01 Top
Phillippe Allen




Posts: 30
Joined: 2005-11-07
Dmitry

thanks for your reply. I was afraid that was the case. I could see the events listed in Microsoft's online object model definition but couldnt trap them in the Addin. I have looked at the MailMerge property in the document interface but it appears to only be relevant to the mail merge template. Once mail merge has occured, the resulting document appears to know nothing about the data source it was created from etc.

regards
Phil
Posted 15 Nov, 2005 15:36:45 Top
Dmitry Kostochko


Add-in Express team


Posts: 2830
Joined: 2004-04-05
Hi Phillippe,

In this case you will have to write your add-in using the type library of Word XP or higher and use events relevant to the Mail Merge.

Posted 16 Nov, 2005 07:01:25 Top