Refresh shape properties for all pages

Hi,
I have a drawing I created using the Organization Chart wizard...based
on a database which contains all the data and Visio maintains a link
between the two.  That's all fine and works well, but I would like to
know if there is a way to update the ENTIRE drawing all at once instead
of page by page.  In other words, if a change is made in my database, I
want to be able to update all the pages, otherwise, I would have to
right-click on each page in my document (I have 20) and pick "Refresh
Shape Properties."

Is there a way to do this for all pages (perhaps using VBA)?  Thanks

0
fcinelli (5)
11/7/2006 3:25:09 PM
visio 3638 articles. 1 followers. Follow

2 Replies
939 Views

Similar Articles

[PageSpeed] 46

Hi fc,


You could do it with VBA code. First we need the name of the add-on:

- Select nothing on the page
- Choose Window > Show ShapeSheet.
- Look for the Actions section
- Look for a formula in the row that says "Upated Shapes" - something llike 
RUNADDONWARGS...
- You'll need the add-on name and the arguments for the code snippet 
below...

VBA Code:

------------------------

dim sAddonName as string
dim sAddonArgs as string
dim pg as Visio.Page

sAddonName = "FigureThisOutFromShapeSheet"
sAddonArgs = "FigureThisOutFromShapeSheet

For Each pg in Visio.ActiveDrawing.Pages
    visio.Application.Addons(sAddonName ).Run(sAddonArgs)
Next pg

------------------------

-- 
Hope this helps,

Chris Roth
Visio MVP

Free Visio shapes:
  http://www.visguy.com/category/shapes
Visio programming info:
  http://www.visguy.com/category/programming/
Other Visio resources:
  http://www.visguy.com/visio-links/

<fcinelli@gmail.com> wrote in message 
news:1162913107.469778.320410@m7g2000cwm.googlegroups.com...
> Hi,
> I have a drawing I created using the Organization Chart wizard...based
> on a database which contains all the data and Visio maintains a link
> between the two.  That's all fine and works well, but I would like to
> know if there is a way to update the ENTIRE drawing all at once instead
> of page by page.  In other words, if a change is made in my database, I
> want to be able to update all the pages, otherwise, I would have to
> right-click on each page in my document (I have 20) and pick "Refresh
> Shape Properties."
>
> Is there a way to do this for all pages (perhaps using VBA)?  Thanks
> 


0
Chris
11/7/2006 4:02:30 PM
Thanks Chris but I found a solution and it works rather well (for me at
least):
-----
Dim pg As Page

For Each pg In ThisDocument.Pages
ActiveWindow.Page = pg.Name
Visio.Addons("Database Refresh").Run ""
Next
-----
It cycles through each page and refreshes all the shapes...exactly what
I want.  When the document opens, I ask the user if he/she wants to
refresh the shapes, if yes, the above procedure is called.  I have
something similar for updating the records in the database, just change
"Database Refresh" to "Database Update".

Thanks again...hopefully someone can use this if they run into a
similar issue.

0
fcinelli (5)
11/7/2006 4:28:56 PM
Reply:

Similar Artilces:

adding multiple pages for a publisher e-newsletter/e-announcement
Lately I have been creating e-newsletter publications in publisher 2003 and so far they have all been a single page. Now, I need more room and was wondering if all I have to do is insert a page. Will all pages show up in an email of the publication or just the first page? (The computer i'm on right now won't allow me to send a publication as an email message, so I can't really check). Does anybody know how sending a multiple page publication as an email message work? lanosh wrote: > Lately I have been creating e-newsletter publications in publisher 2003 and > so fa...

Changing page orientation
Can ANYONE tell me how to change the page orientation in a publication? I need several of the pages in my document to display in the landscape format. HELP Hi Danni (dfishel@eocr-inc.com), in the newsgroups you posted: || Can ANYONE tell me how to change the page orientation in a || publication? I need several of the pages in my document to display || in the landscape format. HELP Sorry Danni, but that is not an option. Workarounds: 1. Have two publications - one for the portrait pages, one for the landscape pages 2. Rotate all objects 90 degrees on the portrait page (you can select all ...

Missing "Edit Page" under "Site Actions"
I am using WSS3.0 with Project Server 2007. Both apps are patched with sp2 and Feb CU. On each of my pages, while logged in as the site administrator, the "Edit Page" option does not appear in the "Site Actions" drop down menu. The only option I have is Site Settings. I verified that I am listed as a site collection Admin, is there anywhere else i should look? ------=_NextPart_0001_7C71EB48 Content-Type: text/plain Content-Transfer-Encoding: 7bit Hello, Edit page option will be disabled on any page when another user has checked-out that particular pa...

Shapes used as selectors
I am using shapes with assigned macros as the selectors for my Sumproduct criteria. So I have rectangle shapes with each person's name on them and when I click on them they name is input into a criteria field on another page. It works well, but is there any way to have the shape highlight or change looks once I click on it so you can see which criteria has been selected? Thanks! ...

Excel XP: Page Setup Issue
How can I create different page setup options for each worksheet in a workbook? As I change the page setup within one worksheet it changes all of them. Is there a way to do this? Am I missing something obvious Thanks in advance Joe Mathis "Joe Mathis" <jmathis@designworkshop.com> wrote in message news:845FBE98-1D78-49BD-865A-6B3A397A41B9@microsoft.com... > How can I create different page setup options for each worksheet in a workbook? As I change the page setup within one worksheet it changes all of them. Is there a way to do this? Am I missing something obvious? > >...

Workbook Properties
Hi. I have an Excel spreadsheet. The Created date is different on the General and Statistics tabs. One is from 2001 and the other date is from 2004. The document was given to someone else to archive and then returned. Is that why the differences in dates are appearing? Is the date from 2001 the original creation date and the date from 2004 when I was given it back? The document was renamed by the other person. Thank you. Experimenting a bit it appears that the Statistics tab created date refers to when the file was created in Excel (File, New). The created date on the General...

Use Refresh/Requery
I have a subform that I use to update information - for example an end date - a summary of which transactions are accessed by clicking a control button opening another form and subform. I want the user to be able to click the control button and see the summary form with the information updated without first having to click out of the record. I have tried using refresh and requery in all sorts of locations but to no avail. The user has to click out of the record and then click on the control button to see the other form/subform displayed correctly. Any ideas, anyone? grahamswindon@talktalk...

Getting 2nd page of a .PDF file
I have a .pdf file that has 2 pages....I can get the first page using the Insert Object and selecting the Adobe file....It always gives me only the first page... thanks dave Delete the first page of the PDF after you insert it. You cannot reverse this action in Acrobat. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "dave schurr" <daveschurr@discussions.microsoft.com> wrote in message news:22B75E6C-913B-417D-99E8-28CE823EDA42@microsoft.com... >I have a .pdf file that has 2 pages....I can get the first page u...

Glue/Lock cells to external data before refresh
I have a spreadsheet with a table of data which has been imported from an Access Database. If new records have been added on the database, then when I refresh the data in Excel it will add these new lines onto the spreadsheet. I need to be able to put certain comments in my spreadsheet against lines of data from the database. However, if new lines are inserted when I refresh the data, the comments can end up being next to the wrong record. Is there any way to keep my lines of comments attached to a particular record of external data, so they will move when the record does? ...

Re: Account Won't Show Up on Home Page as a Favorite
For some reason this message appears to have been deleted from the server. I'm reposting it. Kevin "Kevin Campbell" <kcampbel@nospam.midmaine.com> wrote in message news:... > I have a Home Equity Line of Credit account that, for some reason, will not > show up on my list of favorite accounts on the Home page in Money 2003. In > the account details I have the Add to Favorites checkbox checked and under > the Favorite Accounts menu item it does show up. Also, when I am in the > account register view and I click on the account name to drop the list of > ac...

Print a Poster as an A4 page
Hi, can anyone tell me how to print a poster publication on just one A4 size sheet? Thank you. Pippy <Pippy@discussions.microsoft.com> was very recently heard to utter: > Hi, can anyone tell me how to print a poster publication on just one > A4 size sheet? Download and install PrimoPDF from www.primopdf.com. Set the paper size in the PrimoPDF driver (File > Page Setup > Printer and Paper > Properties) to the size of your poster. Set the Page Size in Publisher to Full Page. Print to the PrimoPDF printer. You will get a PDF file of one page containing the entire of you...

asp.net page with framework 2.0 andajax
I initially made an ASP.NET page and after I added AJAX code by entering the page is the initial declaration <% @ Register Assembly = "System.Web.Extensions, Version = 1.0.61025.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35 " Namespace = "System.Web.UI" TagPrefix = "asp"%> then I have write the ScriptManager in this page. In the web.config page i have write the tag <add assembly = "System.Web.Extensions, Version = 1.0.61025.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35 "/></ assemblies>. Now w...

inserting/merging pages
Trying to find out how I can add (2) 5.5W X 8.5H pages on 1 file with (2) 8.5W X 8.5H pages on a different file? All have the same background. I can not insert new page from page 2 that is 8.5X8.5 because it will be the same size and it does not let me make changes in page setup. Hence the reason I created pages 3 & 4 in a new file. ...

getting property problems
Hi, I have a little program to work out how to get certain information from my companies LDAP. - Connecting to the LDAP is not a problem. - I want to search all entries with the filter is (&(ou=ENN)(eriIsManager=Y)) the ou property holds the company name and the other one is to select only those who are a manager. - the time needed by the FindAll is taking about 20 sec for 20 results, I find it a bit long. - when I want to show the number of results found on my form with .count it takes a really long time (in minutes!). - after that I want to read the uid property from the...

How do I delete pages in Excel? Keeps printing blank pages at end.
I'm printing charts in Excel. Some of them are adding blank pages at the end of the charts. How do I get rid of these? Several ways: 1) Change the location of the chart to have its own sheet. Do this by right clicking the chart, go to "Location" and putting it on it's own sheet. Then you should be able to print it by itself without any white stuff. 2) Make sure that the page breaks are defined well. Go to View -> Page Break Preview . From there, you can move around the blue lines to determine your page breaks. Then, when you're printing it, make sure that you c...

Purchase orders
Is there any way to have purchase orders print size matrixe horizontally instead of vertically? I can place an order for fiv style of shoes and the PO will be four pages long because of th large number of different sizes in the matrix. If the size matri could print horizontally, the PO would be about a third of a singl page. I'm talking about Quicksell. But what about RMS also? Do you need t buy a third party program for another $1,000 to make this happen ...

RSS feed page gives script error
I get the following error when clicking on the RSS item in Outlook 2007. Does anyone know what it means and how I can get rid of it? An error has occurred in the script of this page. Line 16 Char 1 Error Object expected Code 0 Url http://office.microsoft.com/client/outloorss.aspx?ns=OUTLOOK&lcid=1033 Do you want to continue running scripts on this page? Yes No Thank you for any help you can give me! It's actually a failure on the page and not within Outlook. You can disable the page though or set it to another address if you like. To do this; Right click on...

Home page will not stay changed, it reverts back to MSN>
I log onto Google, go to internet opetions and set as my home page. When I close that page and open IE again MSN is my home page again. I tried locking the tool bar did not help. Am I dumed to us MSN as my home page? HELP Chet <Chet@discussions.microsoft.com> wrote: > I log onto Google, go to internet opetions and set as my home page. > When I close that page and open IE again MSN is my home page again. I > tried locking the tool bar did not help. > > Am I dumed to us MSN as my home page? How is this in any way related to Outlook? -- Brian Tillman ...

Copying Multiple Pages
I was wondering if you can copy multiple pages of a Publisher document (Office 2003) at the same time and paste them into another document / or merge two documents together. Many thanks for your time Open the Office clipboard from the Edit menu, you will be able to collect 24 items. Be aware if your text boxes are linked you will not get the paste you want. Break the link, all the text will be shifted to the first text box even though you will not be able to see all of it. Create new text boxes in your new publication, link them again. -- Mary Sauer MSFT MVP http://office.microso...

What's this web page feature called?
On the yahoo home page, if the mouse pointer hovers over items in the "My Favorites" list, a floating window opens up. http://m.www.yahoo.com/?r0=1258393277 Or www.yahoo.com which takes you to the first link. What's that feature called? I'm trying to find a way to disable it in IE 8. No clear responses since yesterday. I'm hoping maybe someone here has enough page design knowledge to just provide a bit of vocabulary. This group deals with Windows XP issues, the internetexplorer.general group would be a better place to ask. -- -- &qu...

how can i print cards on a single page and edit side two and make.
This isn't. Post your message in this bit, describe it in the top bit. That way, you see the entire message rather than just the start. -- Ed Bennett - MVP Microsoft Publisher ...

Microsoft CRM 3.0 Excel Report Data Refresh
We recently rolled out a new PC for a user and now when they try to refresh various CRM based Excel reports the data connection cannot be established. Is there an additional installation from CRM for this automatic update to work on the new PC? ...

'REFRESH' Button In Access 2007 Form
Hello, I am working on a database in Access 2007 partially to accomplish a goal, but also to get familiarity with the new version of Access (I have done quite a bit of work in the previous versions). Despite doing a lot of Access work, I am not much of a code burner though I can usually understand and cannibalize someone else's code. I haven't found specifically what I am looking for in some searches and thought someone here would be able to knock out what I am looking for in a few minutes where it would take me a lot longer to struggle through it. I have some unbound sub-forms all...

Retreaving a Page from a Master Web Site
I am hosting nine web sites. One for each high school. www.adams.edu www.cooledge.edu www.fillmore.edu www.washington.edu And so on the master site is www.canutillo.edu I have a very large set of graphics is www.canutillo.edu\Maps\TxMap.asp so I do not want to copy it to every school site. I want to access that map in every site but I am having trouble with my a finding my map Right Now I have a href = www.canutillo.edu/Maps/TxMap in each of my high school sites, but I cannot get it to point to the right directory. Can anyone give me the correct scri...

Printing a report with consecutive pages
Hi I currently have a report that runs several pages. For each record, I want it to print consecutive pages, e.g Page 1, Page 2, Page 3. At the moment, when I print, it prints Page 1 for all records and does not print page 2 at all. Is there a way to print only one record? Thank you in advance. I find your question ultra confusing. If you want to print out only one record, you might want to look at the solution at http://www.mvps.org/access/reports/rpt0002.htm. If that's not what you want, please try explain so us old guys can understand what you have and wh...