How to open existing Visio drawing using VB6

J

joevisio

Hi,

I’m trying to open an existing visio drawing using VB6, below are th
codes:

Dim appVisio As Visio.Application
Dim docsObj As Visio.Documents
Dim docObj As Visio.Document
Dim stnObj As Visio.Document
Dim mastObj As Visio.Master
Dim pagsObj As Visio.Pages
Dim pagObj As Visio.Page
Dim shpObj As Visio.Shape
Set appVisio = CreateObject("visio.application")
Set docsObj = appVisio.Documents.Open("C:\header\Precinct3Col.vsd")


The above code would open visio application and the drawing, but i
would give me the following error “type mismatch”.

Any help with the error would greatly appreciate.

Thanks

Jo
 
J

JuneTheSecond

In Set docsObj = appVisio.Documents.Open(,,,,,,
docsObj should be read as docObj.
 
J

John Marshall, MVP

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