Using OleCreateInstance to open Microsoft Publisher (OpenInsight 32-bit Specific)
At 28 OCT 2010 01:25:29AM Gordon Heidtman wrote:
Hi all
I use the following code to create an instance of Word and it works fine:
oWrd=OleCreateInstance("Word.Application")The same logic works for Excel, Access and Powerpoint but for some reason I just cannot get it to work with Publisher as below:
oPub=OleCreateInstance("Publisher.Application")I would appreciate any help pointing out my error.
At 28 OCT 2010 03:07AM Eric wrote:
Here's a thread which shows what to do in VB.
At 28 OCT 2010 03:24AM Gordon Heidtman wrote:
Thanks Eric
I have now managed to get Publisher to open but have run into another issue in that I cannot open publisher files in the same way which I do for Excel or word. As an aside, is there a way to run Macro's for Publisher?
At 28 OCT 2010 03:55AM Gordon Heidtman wrote:
ok I managed to get it working. As far as I understand it, Publisher works slighty different from the others in that you can only have one document open at a time. As such you need to use the application object to open the document.