executing code in an embeded visio control

G

gast67

I embeded the Visio control on a VB form and set the Src-property to a valid
file.
The drawing content will be shown.
The vsd file contains source code in DocumentOpened() method.
Loading the visio drawing into the vb form, the code won't be executed.
If I start Visio application and load the drawing, this code will be
executed.

Any help would be appreciated!
Phil
 
A

Al Edlund

AFAIK, you are correct, the code will not be executed, by design...


Porting Existing Visio Solutions
When you are porting your code from an existing Visio client application
solution to the Visio control, include these design considerations in your
planning.

a.. Port VBA code. You must port all existing VBA code into a COM add-in,
or more preferably, your host application. You can keep most of your same
algorithms and logic, as long as it makes sense working within the control's
SDI architecture.
http://msdn2.microsoft.com/en-us/library/aa168480(office.11).aspx

al

From: "gast67" <[email protected]>
Subject: executing code in an embeded visio control
Date: Monday, April 02, 2007 5:03 PM

I embeded the Visio control on a VB form and set the Src-property to a valid
file.
The drawing content will be shown.
The vsd file contains source code in DocumentOpened() method.
Loading the visio drawing into the vb form, the code won't be executed.
If I start Visio application and load the drawing, this code will be
executed.

Any help would be appreciated!
Phil
 
G

gast67

al,
thanks for your reply.
Do you have experience in detail, writing a COM Add-In for Visio?

Is it possible to do it using VB6?

Which references must be included?

Which interfaces must be implemented?



I started writing an Add-In, but run into an error "Types incompatible",
while Visio2007 is starting with my fresh COM add-in.



Thank you!

Phil
 
A

Al Edlund

The visio sdk has examples of how to write code with vb6, there are also
examples of writing to the visio control over on msdn.
al
 

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