How do I doubleclick to edit text and automatically update shape data?

Started by ThirdDimension, July 22, 2016, 02:58:41 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ThirdDimension

Hi Everyone,

I am trying to create a text field that can be "editted on the fly" by double clicking on the shape.  I can link the shape property to the text field, but I don't know how to create a user edit relationship.

I would like the user text to update the shape data property.

Can anyone point me in the right direction?

thanks - 3rd D

wapperdude

Add docmd(1312) to bring up shape data UI. 

Here's link to list of docmds:  https://msdn.microsoft.com/en-us/library/office/ff768010.aspx

Note, not all of the listed can be used with shapesheet.  See last column.

Wapperdude
Visio 2019 Pro

ThirdDimension

thanks wapperdude,

Is there a way to use DOCMD(1312) to pop open the properties page on another shape?

I have all my properties on the master shape, but each master has three text boxes that I would like to be able to edit.  DOCMD(1312) works but seems to be the shape properties for the specific text box shape and not the master properties,

wapperdude

Well, yes.  You need to include the path to the shape.  This link shows how to build formulas:  https://msdn.microsoft.com/en-us/library/aa200961(office.10).aspx

However, the double click approach won't know how to distinquish the desired shape from the others.  In theory, each time you double click, you could increment a counter, and that could be used to select the desired shape thru IF/Else statements.  But it's clumsy.  The counter would only cycle thru it's count, requiring a bit of work to start back at the beginning.

Perhaps a better consideration is the right click context menu.  You could set up as many cases as there are subshapes.  Select the desired shape and up pops the desired prop data form.  This is established and controlled by the Actions section in the shapesheet. 

Wapperdude
Visio 2019 Pro