kilgour
06-10-2010, 08:11 AM
I am attempting to Open a saved publisher document from VBA code in Excel. What am I missing from the following code?
Dim pubApp As Publisher.Application
Dim pubDoc As Publisher.Document
Set pubApp = New Publisher.Application
Set pubDoc = pubApp.Documents.Add
pubApp.Open ("C:\Male.pub")
When I run this code, a new publisher window opens with a new document but does not load the required file. Could someone please let me know how I would do this?
Once the publisher document is open I am wanting to replace a text box already in it with some text from the excel file. Is this possible and if so could somebody please write some sample code that would do this?
Many thanks,
Paul
Dim pubApp As Publisher.Application
Dim pubDoc As Publisher.Document
Set pubApp = New Publisher.Application
Set pubDoc = pubApp.Documents.Add
pubApp.Open ("C:\Male.pub")
When I run this code, a new publisher window opens with a new document but does not load the required file. Could someone please let me know how I would do this?
Once the publisher document is open I am wanting to replace a text box already in it with some text from the excel file. Is this possible and if so could somebody please write some sample code that would do this?
Many thanks,
Paul