Syncing Shapes in Visio

For a while now, I’ve been trying to figure out how to copy text, etc. from one page to another page in Visio. I found the basics in one of the Boxes & Arrows tutorials, which squeezed down comes to the following:

The key is the SHAPETEXT command in Visio, which pulls the text from one shape and puts it into another. For example, if you wanted to keep your annotation and footnotes synced up, you would:

  1. 1) Determine which shape will be your source and which will be the destination. Name both of your shapes by going to Format | Special, and entering in a name in the “Name” field.
  2. Choose the SOURCE shape, and go to INSERT | FIELD. Choose “Custom Formula” and enter the following:=SHAPETEXT(“shape name”!TheText)

    where “Shape Name” is the name you gave the SOURCE. Now, if you type something in your SOURCE, it will automatically show up in the DESTINATION.

  3. Alternately, instead of naming everything, you can use the ID of the source shape:=SHAPETEXT(Shape.ID!TheText)

    where ID is replaced by the ID for the SOURCE shape you are referencing (ID is found by going to Format | Special). Remember, this only works if the items are on the same page; however, you can copy and paste the SET of them and do the same thing over and over (within the same page).

But that article didn’t talk to how you would associate text across different (or multiple) pages. After scouring around, I found something on Microsoft’s site that led me in the right direction. To associate between different pages, you have to change the formula slightly. For example, let’s say you want to have a set of data update on a bunch of pages the same way it would via a template, instead of changing the same text umpteen times on different pages. To do that, create your shapes and name them (or get the IDs), then use this code:

=SHAPETEXT(Pages[Page Name]!Sheet.ID!TheText)

In this case, put in the Page Name (the text) of the original shape, and the ID of that shape. Then, every time you update the source, the text will update in the destination as well. Unfortunately, you can’t copy and paste the destination shape, but at least you can assign the SHAPETEXT command to the shape on each page once and be done with it. Likewise, if you cut and paste/move the existing shape, it will lose its reference.

I still haven’t figured out how to get entire shapes to be duplicated, but I’m working on it.

Facebooktwitter

3 Responses to “Syncing Shapes in Visio

  • the blog looks healthy again! Visio is FUN to work with, like a lot of MS apps. And by fun, I of course, mean not fun.

  • hey…where’s your blogitron button? :-/

  • RE: Hence the post – I actually got Visio to work.

    As for Blogitron – that’s what I was loading up when the system crashed… trying it again now.

Leave a Reply