handling drop in visio VBA

G

GilesT

Hi,

Im trying to create a document where I can drag a .jpg file onto a page and
then to handle a 'drop' event, which will create a visio shape and add the
filename into a property of that shape.

Does anyone know how I can handle the drop before visio creates an ole
object for the .jpg.

thanks

Giles.
 
J

JuneTheSecond

Drop method is mainly used to drop master shapes from stencil to drawing page.
To import jpg files Import method or OpenEx method might be used.
 
A

Andy

You can use the ShapeAdded event on the document , page or application
to catch the jpeg being dropped onto the page.

Andy
 
G

GilesT

hi JuneTheSecond,

Thanks for the reply. - Im looking for an Event to handle a drag/drop
Event, not a method.

cheers,

Giles
 
G

GilesT

Hi Andy,

Thankyou, - I have tried using the ShapeAdded event, and that will work,
however really I was looking to try and find an event that fires Before an
object is created. - The problem is that when visio creates an OLE object
from the .jpg drop it seems to take a Long time to do it. Any Ideas?

cheers,

Giles
 
A

Andy

I've not come across any way of catching it before the drop with an
event. However, Visio 2003 does seem to provide some hooks into the
OLE drag and drop mechanism and is discussed in Graham Wideman's
excellent book, Visio 2003 Developer's Survival Pack. Although I have
no idea whether or not this can do what you want.
 

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