Visio 2007 Addon / Org Chart question

Started by visiostumped, April 18, 2011, 04:51:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

visiostumped

Hi, I just recently developed an org chart application in Visio & VBA using Visio 2003.  However, when I switched to 2007, I encounter the problem where calling the org chart wizard

Addons.ItemU("OrgCWiz")
objAddOn.Run ("/S-INIT")

causes Visio to open up a new drawing instead of keeping the org chart generation inside the old drawing.  (Visio 2003's behavior was generating the chart inside old drawing)  

This wouldn't be so bad except the new drawing doesn't carry over any of my VBA codes and my custom user menu.

I did some manual experiments with the orgchart wizard, and I found that Visio 2007 will open up the new drawing as soon as I click on tools->add-ons->business->org chart wizard.  So I guess this is the behavior of Visio 2007 with regards to addons

The only way I managed to prevent a new drawing is to click on the "organizational chart" menu-->"import organizational data".  This opens up a window exactly like the org chart wizard gui except a new drawing is not created, but is instead added to the current pages.  This leads to believe that there must be some kind of parameter that I can use the Addon.run method that will prevent a new drawing from being created.

So I can see a few ways my problem can be resolved:

a.  Prevent new drawing from being created by one of Visio's options (i tried changing a few options inside the options menu but none helped, but maybe someone is more familiar Visio options can give me some hints)

b.  Maybe when objAddOn.Run ("/S-INIT") is called, there is a parameter that tells the addon that no new drawing should be created

c. Can programmatically call "import organizational data" and still be able to include all of the org chart parameters like "/datasource=", etc.  

Or, my least preferred way:
d. be able to automatically copy/inherit all of my vba code and user menu into the new drawing.

Can anyone help? please! Thank you!

contact_ankit86

Hi,

I am also facing the same problem, i am trying to Run an Addon but it is creating a new drawing, rather i want it to do it on existing drawing / Current Page.

Any Suggestions...?