How do I make a visio macro easily available to other users

B

BaggiesBoy

I have a VB macro that uses SOAP to connect to a web-based data management
system. This macro works in my current Visio document only. What is the
easiest way to make this available to other users (user community of about 50
people) all creating different Visio schematics. I assume I could develop a
COM add in (can I do this with VB) or is there a way to save my document as a
generic template that everyone can pick up and use?
 
D

David Parker [Visio MVP]

Assuming that you are using Visio 2003 and .Net Framework 1.1, then
recommend vb.net, Visual Studio, Visio 2003 SDK

If you keep it inVBA, then consider placing your code in a stencil which all
users have access to.
 
C

Chris Roth [ Visio MVP ]

Lots of options here, with trade-offs, of course.

COM Add-in is okay, but you might encounter digital-signing annoyances. But
you get nice integration with Visio.

VSL add-in is most tightly integrated, but must be developed in C++ or
Delphi, and can crash Visio if not done properly.

If you don't mind starting a separate program, an .EXE might be the way to
go, but it's clunky in the way it (doesn't) integrate with Visio.

If you save the document as a template, then users get a copy of that doc by
default, super for starting a new drawing. Only drawbacks are security
warnings on startup ("this doc has macros, oooh!") and code proliferation -
each doc has a copy of your vba, and if you want to improve the code, you'll
have all those legacy documents laying around.

It's also possible to put VBA code in a second file, say a stencil. The code
only works if the doc is open, which can be dangerous, but you avoid saving
copies of the code all over the place. It's like loading the stencil is the
same as loading a code-library.

--

Hope this helps,

Chris Roth
Visio MVP
 
M

Michael

With regard to VSLs I have very good experiences with Graham Widemans VSL
'framework'
for Visual Basic (have not gone the .NET route yet...)
 

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