Opening Visio document with a parameter

J

jarlen

Hey

I have a visio sheet, which includes a search function. This search function
searches through a database, and Visio then builds a diagram from the search
result.

On top of that I've built a web interface to manage the database that Visio
searches. In this diagram I've included links to the Visio diagram, so that
you can open the diagram with a click. Now I've want to send the search
parameter to the Visio diagram to be opened. Is this possible? To open a
Visio document, together with a parameter, that the document puts into a
macro?
 
A

AlEdlund

Since this is a 'macro', is it safe to assume that it was written in vba? If
that is the case, yes, visio can examine how it was opened and if there are
command line operands with it.
al
 
J

jarlen

Yes, it is written in VBA via the Visual Basic Editor which is accompanying
the Visio installation.
Do you have any references as to where I can learn more about the subject of
command line operands and the such?

I'm just thinking, if I am to use command line operands as I suggest, can I
still just include the visio document as a link in my admin website
interface, or do I need to place the document in a shared directory, and open
it through some kind of C# run command (the admin interface is built in C#,
the document macro in VBA).
 
J

jarlen

Ok, I'm able to open the Visio document via C# with something like:
IVisio.ApplicationClass visio = new IVisio.ApplicationClass();
IVisio.Document doc = visio.Documents.Open("documentName.vsd");

I just need a way to make the doc run a macro with my specified parameter.
Any suggestions? Google doesn't know much about Visio
 
A

Al Edlund

I forgot where it was. There is a command line parser example in the visio
sdk. The visual basic example is close enough to vba that it shouldn't cause
you any problems.

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