identify when shapes are created from External Data window

S

Scott

Our code does some processing when certain shape types are dropped onto the
page. We would like to take slightly different actions when shapes are
automatically created as a result of the user dragging rows from the External
Data window onto the drawing page. Consequently, we need to determine whether
a shape was dropped by dragging it from the External Data window versus some
other means.

Would the ShapeLinkAdded event be a good way to trap this condition? Does
this same event fire if the user does Autolinking instead of manually
dragging a data row onto the page? If so, is there a way to differentiate
between the two?

Any other suggestions for a way to uniquely identify that a shape was
created by dragging a data row onto the page?

Thanks
 
M

Mark Nelson [MS]

ShapeLinkAdded fires when an existing shape is linked to a data row, not
when a new shape is dropped and linked simultaneously. Use the EnterScope
event to tell you what is happening. When responding to EnterScope, call
Application.IsInScope to ask whether you are in the scope of "Link Row to
Shape". If yes, check to see whether you are also in the scope of "Drop on
Page". If also yes, this is the drag from External Data window scenario.

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
 
S

Scott

Mark,

Thanks -- that did the trick!

Scott

Mark Nelson said:
ShapeLinkAdded fires when an existing shape is linked to a data row, not
when a new shape is dropped and linked simultaneously. Use the EnterScope
event to tell you what is happening. When responding to EnterScope, call
Application.IsInScope to ask whether you are in the scope of "Link Row to
Shape". If yes, check to see whether you are also in the scope of "Drop on
Page". If also yes, this is the drag from External Data window scenario.

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top