Shanan212
asked on
Running Visio Macro from VBS File
Hi,
I have the following inside a VBS/VB Script. This code runs in regular environment but when inside a VBS file, it is not running
At the moment I am triggering it with a batch file - this code is tested to run 'hi world' function
Any help on resolving/pointing in the right direction is appreciated!
I have the following inside a VBS/VB Script. This code runs in regular environment but when inside a VBS file, it is not running
Option Explicit
MacroExample
Sub MacroExample()
Set AppVisio = CreateObject("visio.application")
Dim vsoDoc As Visio.Document
Set vsoDoc = AppVisio.Documents.Open("\\edcfs2\share2\nathsh\XenApp\Desktop\Drawing1.vsd")
vsoDoc.ExecuteLine ("PageSel")
Set vsoDoc = Nothing
End Sub
At the moment I am triggering it with a batch file - this code is tested to run 'hi world' function
cscript \\edcfs2\share2\nathsh\XenApp\Desktop\Test\Temp\filename.vbs
Any help on resolving/pointing in the right direction is appreciated!
vbscript and VBA are not the same they are related but not the same
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks!