Any suggestions - drag & drop

D

David Thielen

Hi;

My Add-in is written in C#, not VSTO.

I have to write code where I drag from one of my windows to Word and when I
drop in Word - I have to handle that drop with my code (ie it's not just an
insert of some text).

Any suggestions of things to do/watch out for/same code?
 
P

Peter Huang [MSFT]

Hi

I have browsing through the word vba document, it seems that it did not
expose the event to handle the drag/drop operation.
So far as a workaroud, I think we may try to show a modeless/model winform
per your scenario to handle the drag/drop, and then call back into the
Addin function to do some action on the winword via OM.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
D

David Thielen

OMG - no drop event from Word when the object is dropped? Are you sure? This
is a giant problem if so (and a giant hole in their object model). Can you
please check?
 
P

Peter Huang [MSFT]

Hi

I have browsing through all the event exposed by word 2003 in the VBA help
with no luck.
Anyway, I will try to double check that.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
D

David Thielen

Thank you and please let me know if the answer comes back negative too. But I
can't believe they forget something this significant.

thanks - dave
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=,
But I
can't believe they forget something this significant.
I don't know if "forgot" is the correct term, but there are
certainly NO events connected to drag-and-drop in the Word
object model. If anything, you'd need to resort to the
Windows API.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:)
 
D

David Thielen

How about "missed significant very useful event" <g>?

Any ideas on how to work around this? My problem is what I want dropped is
different if the drop location is inside a table vs not in a table.
 
P

Peter Huang [MSFT]

Hi

I have confirmed with office team engineer, word did not expose drag/drop
event for us to customize.
Also when we drag something, (e.g. Text )onto word, word will handle the
drag/drop automatically and we will not be notified that the drag/drop
occured, so we will not know where it drops.

For your scenario, you may try to contact MSPSS directly to see if they
have any other idea.
http://support.microsoft.com
Thanks for your understanding!

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=,
How about "missed significant very useful event" <g>?
Good one said:
Any ideas on how to work around this? My problem is what I want dropped is
different if the drop location is inside a table vs not in a table.
Keeping in mind that I have no idea what I'm talking about...

Would there be any way to have what's being dragged be put "silently" on the
Clipboard. Then you could possibly use a WindowSelectionChange event to
figure out where the target area is? (Teach the user to drag and click?)

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

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