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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top