how to run a macro from automation client

M

ms

hi all,

is there any possibility to run a macro from automation client?

in word or excel there is a "run" method, but it seems that it's not
implemented in visio :/

any suggestions?

ms
 
C

Chris Roth [Visio MVP]

Hi MS,

You can get a list of add-ons from the application property and call
..Run on them:

http://msdn.microsoft.com/en-us/library/ms427930.aspx

But I don't think this approach will work for VBA macros. You might be
able to get at them by automating the VBA project via Application.VBE.

If the Visio document is opened in the Visio viewer or in the Visio
ActiveX control, however, the VB project might not be accessible.


--
Hope this helps,

Chris Roth
Visio MVP


Visio Guy: Smart Graphics for Visual People

Articles: http://www.visguy.com
Shapes: http://www.visguy.com/shapes
Dev: http://www.visguy.com/category/development/
Forum: http://www.viguy.com/vgforum
 
J

Jon Fournier

Have you tried the .ExecuteLine method of the document containing the macro?
You basically just enter the name of the macro with any arguments and the
document will execute the macro...
 

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