Visio Guy

Visio Discussions => Programming & Code => Topic started by: goldnhue on April 30, 2011, 11:59:44 PM

Title: How to populate shape.Text when a custom property value changes
Post by: goldnhue on April 30, 2011, 11:59:44 PM
I have added a custom properties to Visio shapes, for which I am prompted when the shapes are dropped on a page.  One of the custom properties is a "name" field.  Whenever the "name" value is changed, I would like the shape.text value to be automatically updated as well ... (more specifically, I want what is displayed below the shape to reflect the custom "name" field value)

Can anyone point me the right direction on how to approach this?       

Thank you in advance.   
Title: Re: How to populate shape.Text when a custom property value changes-SOLVED
Post by: goldnhue on May 01, 2011, 12:21:50 AM
I found the answer ... you already posted it here:  http://www.visguy.com/2009/05/06/top-twelve-text-tips/

Just to share your answer if others want to know ...

If you want to display data stored behind your shape in the shape's text, it's as easy as inserting a field. Here's the short list of what to do:

1.Select a shape that has shape data fields
2.Hit F2 to get into text-edit mode
3.Go to: Insert > Field
4.Select Shape Data or User-defined cells (or other info about the shape or document) in the Category column
5.Choose the info you want and specify formatting

Thanks again for all the great work you do!