Disabling Drop Events

C

Chuck Cobb

I have some code that copies a complete Visio page from one document to another. It does it by creating a new page in the destination and then copying and pasting all the shapes from the source into the destination

It works fine except when the source page has a shape with a DropEvent defined in it. For example, an Off-Page Reference has a drop event defined that opens a dialog box. When I attempt to copy and paste it from the source to the destination, the Drop Event fires when I paste it in the destination which really screws up my code, because Visio is waiting for the user to respond to the Drop Event before doing anything else

Is there an easy way to disable drop events

Thanks

Chuck
 
D

dani

Hi Chuck

do you need to catch other events during the copy operation?
If not, then you can simple disable events.

--> Application.EventsEnabled = 0

and when you're done, enable them again.
This is the same as enabling/disabling automation events in the advanced
options of Visio.

Daniel
 

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