Cannot run RUNADDON in Visio 2003 Professional

R

Rose

I have a pretty large org chart (33 pages so far) that I want to have fully refreshed on opening the file (and ideally, also on demand)

Even though I have set every page to "refresh on open", only the page that is active when the file open is being refreshed

I have therefore tried setting up a macro that loops through all my pages and executes RUNADDON("Database Refresh"). The loop is working great, but the RUNADDON function is not recognised - "Sub or Function not defined" is what I get

This is driving me crazy because I am sure there is a simple answer to it - HELP please

Note I can manually refresh page by page, using the Refresh Add-on, or right-clicking on the page and selecting refresh
 
A

Al Edlund

Ran into it when I was doing some timeline stuff. The runaddon format
changed

Set objApp = Visio.Application
Set objAddOn = objApp.Addons.Item("TheAddonName")

do some setup stuff

Application.DoEvents
objApp.AlertResponse = 1 ' do alert response if you
expect a prompt
objAddOn.Run ("/cmd=3") ' the unique command is optional
objApp.AlertResponse = 0

your mileage may vary,

Al
Rose said:
I have a pretty large org chart (33 pages so far) that I want to have
fully refreshed on opening the file (and ideally, also on demand).
Even though I have set every page to "refresh on open", only the page that
is active when the file open is being refreshed.
I have therefore tried setting up a macro that loops through all my pages
and executes RUNADDON("Database Refresh"). The loop is working great, but
the RUNADDON function is not recognised - "Sub or Function not defined" is
what I get.
This is driving me crazy because I am sure there is a simple answer to it - HELP please!

Note I can manually refresh page by page, using the Refresh Add-on, or
right-clicking on the page and selecting refresh.
 
R

Rose

LOL, yes, my mileage does vary

It seems I am now getting further than before but the .Run won't execute, it seems to want some parameters (error 450), and , despite searching low and high for a description of the DBRS function, I can't find anything anywhere

Perhaps someone from Microsoft can post a working bit of sample code, with explanation of the possible parameters?
 

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