Dynamic Shape Names

D

Derrick

Hello,
I have a visio diagram that maps out the cubicles in our company, this map
is also getting published to a web page using the Visio converter, but when
running a search for a cubicle the result comes back with a non-specific name
(such as sheet.2156). I'm pulling data from a database to fill in some shape
data, so I was wondering if there was a way to change the nameID to something
friendlier (such as the username of the person sitting in the cube).
Thanks in advance
 
M

mikeFin

I am not sure if this helps but:

You could change the nameID by selecting the Element, right click -> Format
-> Special.

As you say that you pull the data from a DB, you might have a lot of
elements. So you could do it with a VBA macro. Could look like:

For i = 1 To ActiveDocument.Pages(1).Shapes.Count
Set vsShape = ActiveDocument.Pages(1).Shapes(i)
vsShape.Name = vsShape.Cells("Prop.Username")
Next

It is assumed, that the Username is stored as a ShapeData called "Username".
 

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