Flying Chips
Technical User
Hello people,
I have small query while working with MS Publisher document. Visible property isn't working. Here is my simple code.
Set ObjPbl = CreateObject("Publisher.Application")
ObjPbl.Visible = True
Set objApp = ObjPbl.Open ("C:\PubFiles\pubint.pub")
WScript.Sleep (5000)
ObjPbl.Quit
Getting following error."object doesn't support this property or method: objPbl.visible".
I tried the other way of doing it.
Set objShell = WScript.CreateObject("WScript.Shell")
intReturn = objShell.Run ("C:\PubFiles\pubint.pub")
WScript.Sleep (5000) ' wait doc to open
objShell.Run "taskkill /im mspub.exe"
In this I am able see pub document opening the file but sleep function isn't working in this case. It is just launching the document and immediately process is getting killed
Appreciate your help in resolving this. Thanks in advance.
I have small query while working with MS Publisher document. Visible property isn't working. Here is my simple code.
Set ObjPbl = CreateObject("Publisher.Application")
ObjPbl.Visible = True
Set objApp = ObjPbl.Open ("C:\PubFiles\pubint.pub")
WScript.Sleep (5000)
ObjPbl.Quit
Getting following error."object doesn't support this property or method: objPbl.visible".
I tried the other way of doing it.
Set objShell = WScript.CreateObject("WScript.Shell")
intReturn = objShell.Run ("C:\PubFiles\pubint.pub")
WScript.Sleep (5000) ' wait doc to open
objShell.Run "taskkill /im mspub.exe"
In this I am able see pub document opening the file but sleep function isn't working in this case. It is just launching the document and immediately process is getting killed
Appreciate your help in resolving this. Thanks in advance.