Forgive me if this is the wrong forum, I am a newbie. I have an access database that contains the mege data that I would like to use in publisher. I have created a form in Access with a button that on execute I would like to use Office Automation and open my Publisher Template and merge the data fields. From access I have included the reference to the Publisher object. I can include the code that I have so far but I am not even sure I am on the right path. Haven't been able to find any examples on programmatically doing publisher's mail merge. Any help or push in the right direction is appreciated.
qbutler wrote: > Haven't been able to find any examples on programmatically doing > publisher's mail merge. Any help or push in the right direction is > appreciated. AJ May has a series of technical articles about Publisher programmability at http://msdn.microsoft.com/en-us/library/bb191021(office.11).aspx Two of these cover Publisher's merge features. -- Ed Bennett - MVP Microsoft Publisher http://ed.mvps.org
"Ed Bennett" wrote: > qbutler wrote: > > Haven't been able to find any examples on programmatically doing > > publisher's mail merge. Any help or push in the right direction is > > appreciated. > > AJ May has a series of technical articles about Publisher > programmability at > http://msdn.microsoft.com/en-us/library/bb191021(office.11).aspx > > Two of these cover Publisher's merge features. > > -- > Ed Bennett - MVP Microsoft Publisher > http://ed.mvps.org > Thanks, I will start with this and see if I can transfer the same logic into access. I want to be able to complet the mail merge from withing access with a button on a form and let it open up Publisher throught automation. Thanks
qbutler wrote: > Thanks, I will start with this and see if I can transfer the same logic into > access. I want to be able to complet the mail merge from withing access with > a button on a form and let it open up Publisher throught automation. This is relatively simple to do. You need to set a reference to the Publisher object library, and then create a new instance of Publisher with: Dim pApp As New Publisher.Application. Then instead of using ThisDocument, either create or open a document and assign it an object. Dim aDoc As New Publisher.Document Set aDoc = pApp.Open(...) (The syntax for the .Open method is documented in the Publisher Object Model Help; available on MSDN or by pressing F1 in Publisher's VBA IDE.) -- Ed Bennett - MVP Microsoft Publisher http://ed.mvps.org
Thanks Ed, I think I'm on my way. I appreciate the help! "Ed Bennett" wrote: > qbutler wrote: > > Thanks, I will start with this and see if I can transfer the same logic into > > access. I want to be able to complet the mail merge from withing access with > > a button on a form and let it open up Publisher throught automation. > > This is relatively simple to do. You need to set a reference to the > Publisher object library, and then create a new instance of Publisher with: > > Dim pApp As New Publisher.Application. > > Then instead of using ThisDocument, either create or open a document and > assign it an object. > > Dim aDoc As New Publisher.Document > Set aDoc = pApp.Open(...) > > (The syntax for the .Open method is documented in the Publisher Object > Model Help; available on MSDN or by pressing F1 in Publisher's VBA IDE.) > > -- > Ed Bennett - MVP Microsoft Publisher > http://ed.mvps.org >