I am aggregating and parsing a good deal of data in excel spreadsheets and I'm working up an automated reporting system that exports data to preformatted Publisher documents. Since this macro will be given to others to use, I need to ensure that it works properly with its partner files no matter what. It is possible that after the first instance of my macro, a user could create their own publisher document, at which time that new document would become the Publisher.Applicaiton.ActiveDocument object.
Word VBA has a command that allows one to specify a document and activate it; Word.Application.Documents("DocumentName.doc").Activate, however I have not had much luck finding an equivalent command in Publisher's library.
Is there a command that enables me to define in absolutely certain terms which Publisher document is active? If there is not, is there a way to assign a Publisher document a specific variable such that I am able to operate on it whether or not it is the ActiveDocument?
http://i.imgur.com/rk2Suux.png
This is basically the logic flow of what I'm trying to assemble here, again so that there is a 100% guarantee that the files I want acted on are the ones acted on.
I'm still pretty new at VBA, so thanks for the assistance.
Cheers
frail
Bookmarks