Visio.Shape

R

Rad

Hello,

How can I, or how does the code look like to create an instance of
Visio.Shape in VBScript? Dim vsoShape AS Visio.Shape

Below is what I wrote in VBScript:
' Set the variable (runs new instance of VISIO).
Set oVISIO = CreateObject("visio.Application")
set newdoc1 = oVISIO.Documents
Dim nShape
nShape = oVISIO.Document.Shape

I keep getting an error on nShap as it is not supported?
What is wrong with my code?

Thanks.
Rad
 
J

JuneTheSecond

I would like to write as;
' Set the variable (runs new instance of VISIO).
Set oVISIO = CreateObject("visio.Application")
set newdoc1 = oVISIO.Documents.add("")
Dim nShape
set nShape = oVISIO.Activepage.drawline(0.0,0.0,2.0,2.0)
 
Top