Can I trap publisher mailmerge events from within a VB.Net application??

M

Mark

I'd like to develop a VB.NET application that creates a Publisher 2003
application object, opens a document and performs a mailmerge. However, I
need to update a database for each record that is "mailmerged". Is this
possible? Does publisher throw an event for each record that is merged? Or
am I on the wrong track.

The reason VB.NET is part of the equation is because I want them to do this
from within their main application (which is written in VB.NET).

Thanks for any assistance.

Mark
 
E

Ed Bennett

Ed looks left. Ed looks right. No-one is there. Furtively, Ed picks up
a note from Mark said:
I'd like to develop a VB.NET application that creates a Publisher 2003
application object, opens a document and performs a mailmerge.
However, I need to update a database for each record that is
"mailmerged". Is this possible? Does publisher throw an event for
each record that is merged? Or am I on the wrong track.

Yes. The Publisher 2003 object model can be read through at c:\Program
Files\Microsoft Office\Office11\1033\VBAPB10.CHM by default.

You will need to use COM interop to create references to MSO.DLL and
MSPUB.TLB, and qualify the object names more than you would in VB6 or VBA.

Look for the MailMergeAfterRecordMerge and MailMergeBeforeRecordMerge
events.
 

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