Results 1 to 2 of 2
2007-05-02, 15:29 #1
- Join Date
- May 2007
- Thanked 0 Times in 0 Posts
Problem: VB / Visio 2003 / IE6 (English/Visio/2003)
Me <== about one day's experience programming VB
I've been working on a Visio diagram containing layers. I wanted to be able to view this diagram from the Web and to be able to dynamically show and hide different layers. I found some snippet code on the Web, inserted some Controls into my Visio diagram, and wrote (copied) some VB to change the document attributes.
Works like a charm... in Visio.
When I drop the file into Internet Explorer, it comes up in Design mode, and I can't find any option to switch it into Run Mode so that users can push the buttons that show and hide the proper layers. Thinking that this might be some sort of security thing, I did some Googling, and have generated a self-signed cert. The good news was that IE prompted me whether or not to Enable macros. The bad news is that I clicked "Enable" and, voila!... er, um, Design mode again.
More Googling and such raises some other questions. My VB contains a line like
Set LayersObj = ActivePage.Layers
ActivePage is apparently an attribute of the Visio global object. A developer's guide at MSDN states that "Note: The Visio global object is available only when you are writing code in the VBA project of a Visio document." So, if I drop a .vsd file into IE would the VB be running in a context where the global object is available? Or would I somehow have to navigate through the object model to figure out what the 'ActivePage' is?
...is it possible to do what I'm trying to do? show my Visio document in a read-only mode with some buttons to show different layers?
...if so, where am I going wrong?
2007-05-03, 01:02 #2
- Join Date
- Jan 2001
- Melbourne, Victoria, Australia
- Thanked 248 Times in 230 Posts
Re: Problem: VB / Visio 2003 / IE6 (English/Visio/2003)
This sounds more like a job for Flash. I don't know if you can do this from Visio but I wouldn't have thought that it would be possible. If your source must come from Visio then I would recommend some research on SVG formats - perhaps you can create dynamic graphics in an SVG format but this format may not be well supported by the target browsers.
Did you get the file into a browser by 'Saving as Web Page' or did you save to a a graphic format?Andrew Lockton, Chrysalis Design, Melbourne Australia