value is different from what shows in stencil and shape sheet

Started by goldnhue, April 26, 2011, 04:16:04 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


I'm creating a custom stencil.  I copied the Bus Stop symbol from another Visio stencil and dragged it onto my custom stencil, then renamed it (i.e., right click on item in the stencil, edit properties, master properties.  Also tried just right click and rename).

The new name appears on the stencil and in the window header when I show shape sheet.  However, when I try to grab the name of the stencil object in VBA (i.e.,, it still shows as the old name.  What am I doing wrong?


What happens if you drop the shape from the original stencil to a page. Rename it. Than put that renamed shape in your new stencil. What happens than?

Maybe there is a difference between the name as shape and the name as master???


Interesting, the property does change if you do it before putting it on the stencil, but not if you change the name while it is on the stencil.   (I had to turn on developer mode, then select the Developer tab and click the Shape Name button to rename it.) 

Is there a programmatic way to set the property to correspond with the displayed name while it's on the stencil?   


You could look into the shape.Name vs. shape.NameU issue discussed in some threads here in this forum.
Or you coul research if there is sth. like a master.Name property.

I don't have Visio at the moment, so I can't check it out myself.

Paul Herber

I have a utility that will sort this out for you at Amongst all the various features there is a Stencil Report which will correct the Name and NameU of all the shapes in the open stencils. Be careful though as some stencils may rely on the Name and NameU being different.

Electronic and Electrical engineering, business and software stencils for Visio -


Thanks much. 

While the shape is on the stencil, both Name and NameU pull from the old name, not the new.  But oddly, when I drop the shape on the drawing page, it pulls the new name instead of the old. 

Too fluky for me, so I'm just going to have people change the name and run the script while it's on the drawing page, then drag it onto the stencil when all is done.

Thanks again for your help.