SmartTag opens shape data on another shape

Started by scott, December 01, 2008, 09:27:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

scott

I have two shapes on a page, Shape A and Shape B. Shape A includes a SmartTag with action = DOCMD(1312) to open the shape data window. However, if Shape B is selected when I mouse over Shape A and and click on the SmartTag entry, it's Shape B whose data is displayed. If no shape is selected, I get a message box that no shape data exists -- I assume this is reporting on an attempt to open the shape data for the page. I've attached a doc with two shapes as described.

For various reasons, I don't want to change Shape A's behavior to that the SmartTag only appears when Shape A is selected. Is there a shapesheet formula I can add to shift focus to the shape containing the SmartTag before the DOCMD(1312) is executed?

Seems like I must be missing something really obvious about this but I haven't found it.

I know I can call a procedure to do the job but would really like to accomplish this inside the shapesheet.

Thanks...

Paul Herber

If the required result is just to open the shapedata window then can you not just remove the smart tag reference and have it on the right-click menu?

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

https://www.paulherber.co.uk/

scott

Good thought, Paul. But my ultimate goal is to have the SmartTag on a group with separately selectable parts (members first) and want to have the SmartTag always open the group's shape data. So it's not quite as simple as the diagram I posted.

Plus, once I got started, it bothered me that an action on one shape could trigger display of the shape data dialog on another. That would be fine if that's what I wanted but it isn't.

As a workaround unless something else surfaces, I've used =CALLTHIS(GetSmartTagShapeData) and
Sub GetSmartTagShapeData(shp As Shape)
    ActiveWindow.Select shp, visDeselectAll + visSelect
    Application.DoCmd (1312)
End Sub


Other ideas welcome!