Drag&Drop event Word

D

dpomt

Hello,

I would like to handle drop event in Word add-in. As I did not find a
suitable event, I have thought about using
ApplicationEvents4_DocumentChangeEventHandler. But unlike the correspondig
event handler for Excel (AppEvents_SheetChangeEventHandle), it has NO
parameters and I hence d o not know how to retrieve information about dropped
text.

Any suggestions?

Thanks,
dpomt
 
D

David Thielen

Hi;

We fought this battle too and could never find a way to determine
where the mouse was over the Word document. Very frustrating.

What we ended up doing was creating a IDataObject derived object and
passing that to DoDragDrop. It would only return an RTF object. So
that let us drop formatted text on Word. And if we ever find a way to
know the mouse position, we can use that same IDataObject to return
that it only supports a data class Word does not know if over a
location we don't want to drop on.

What would be best is if Word could call us with an event when in
DragDrop mode telling us where the mouse is, and we return if a
copy/move is ok there. And then a 2nd event on the drop so we can
process it if we want.

This is one of our top 3 wishes for the Office API. But we've been
asking for this for 3 years with no luck so far...


Hello,

I would like to handle drop event in Word add-in. As I did not find a
suitable event, I have thought about using
ApplicationEvents4_DocumentChangeEventHandler. But unlike the correspondig
event handler for Excel (AppEvents_SheetChangeEventHandle), it has NO
parameters and I hence d o not know how to retrieve information about dropped
text.

Any suggestions?

Thanks,
dpomt


david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
D

dpomt

Hello David,

thanks for your precise reply.

What I want to do is to change D&D behavior when D&D an image from explorer
to word. The behavior of Word is to embed the image - I want to insert only a
reference/link to the image. I did not find any possiblity to let Word link
the image. When doing a D&D with right mouse button, Word displays a context
menu with "link here", but it's grayed out.
If you have any suggestions how I could achive to get a linked image when
doing D&D from explorer to Word - either by cahnge some Word settings or by
implemting an add-in - this would be very helpful.

Thanks and best regards
dpomt
 

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