DOCMD(1312) go directly to the shape data field

Started by Mouthpear, February 02, 2024, 05:01:13 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mouthpear

Is there a way that when an Action has DOCMD(1312) or any other code that will go directly to the shape data field that you are "selecting", instead of the top/first field.

Select "Insert Text Here"
Image #1

Need it to go directly to that field.
Image #2

Surrogate

Quote from: Mouthpear on February 02, 2024, 05:01:13 AM
Is there a way that when an Action has DOCMD(1312) go directly to the shape data field that you are "selecting", instead of the top/first field.
IMHO: No way!

Mouthpear

Quote from: Surrogate on February 02, 2024, 06:58:06 AM
Quote from: Mouthpear on February 02, 2024, 05:01:13 AM
Is there a way that when an Action has DOCMD(1312) go directly to the shape data field that you are "selecting", instead of the top/first field.
IMHO: No way!

Ok I rephrased it. Is there any other code that can be used to make that happen.

Surrogate

ShapeSheet: No way, just show Shape Data window without any options...
VBA code: No way, SendKeys method dont work with Shape Data window. Because Shape Data window is open as modal window!

Yacine

A silly idea: The sort order and the visibility fields of the prop rows can be filled with formulas instead of fix values.
One could define that when so and so happens then sortorder = 10, otherwise = 100
Or make only the relevant props visible: if so and so visibility = 1, else = 0

But jumping in the generic props window - as Surrogate already wrote - difficult! (aka impossible).
Yacine

wapperdude

#5
This might be possible, to a limited extent, using code, for a couple of the shapesheet sections.  That is, not all section can do this.  The mechanism is to select via cell row name.  See https://learn.microsoft.com/en-us/office/vba/api/visio.cell.rowname.  It still requires, obviously, knowing the row name.

But, if you wanted to invoke the actual Shapedata Window at the specific line, and then proceed using normal User Interface, I don't think this will help.
Visio 2019 Pro