refresh shapes on multiple pages

P

par

My Visio2003 document has many db linked shapes on several pages. I can
manually refresh and from VBa (newbie) I can use '
Visio.Application.Addons("dbrs").Run "" ' to refresh all shapes on the active
page. But how do I get code to run for all linked shapes on all pages? (I
would like to run this on open, and also from Access VBA)

Also any tips on making updates run faster. I realize that having 200
linked shapes is going to take some time to update, but I'd like to do
everything I can to streamline the process.

thanks!
 
C

Chris Roth [ Visio MVP ]

Dim pg as visio.page
for each pg in Visio.ActiveDocument.Pages
' Do add-on stuff
next pg

--

Hope this helps,

Chris Roth
Visio MVP
 
P

par

That didn't work for me. But I was able to do get the following to work.

Application.ActiveWindow.Page = Application.ActiveDocument.Pages.ItemU(1)
Visio.Application.Addons("DBRS").Run ""
Application.ActiveWindow.Page = Application.ActiveDocument.Pages.ItemU(2)
Visio.Application.Addons("DBRS").Run ""
Application.ActiveWindow.Page = Application.ActiveDocument.Pages.ItemU(3)
Visio.Application.Addons("DBRS").Run ""

Thanks,
Pat
 
C

Chris Roth [ Visio MVP ]

Take two of those lines and stick them in the loop I sent you.
Replace the number with pg.Index

--

Hope this helps,

Chris Roth
Visio MVP
 
P

par

GOT IT. Thanks!

Chris Roth said:
Take two of those lines and stick them in the loop I sent you.
Replace the number with pg.Index

--

Hope this helps,

Chris Roth
Visio MVP
 

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