How to drag & drop a mail item from Inbox to Personal folder

Ask general questions here.
cancerion
Posts: 30
Joined: Tue Jun 16, 2009 6:15 pm

How to drag & drop a mail item from Inbox to Personal folder

Post by cancerion » Mon Aug 24, 2009 2:11 pm

Hi,

Can you please give me a snippet to drag and drop a message from Inbox Supergrid to Outline Item Personal folder or ‘Sent Item’ folder for OL2k3/OL2k7?

As well as I need to drag a document form Local drive (for e.g C) to Outlook New message.

We use our monitor resolution as 1280*1024.

Please provide a small snippet to perform these operations.

Thanks,
Sachin

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: How to drag & drop a mail item from Inbox to Personal folder

Post by Ciege » Mon Aug 24, 2009 4:10 pm

1st, you need to find the location of the from and to positions. I.E. get a pointer to the object you are going to move and to the object where you are going to move it.

2nd, Move the mouse to the from object:

Code: Select all

HDTableCell.MoveTo();
3rd, Click the object:

Code: Select all

Mouse.ButtonDown(MouseButtons.Left);
4th, Move the mouse to the new location:

Code: Select all

Mouse.MoveTo(HDTableCellEND, Location.UpperCenter);
Finally, release the mouse button:

Code: Select all

Mouse.ButtonUp(MouseButtons.Left);
In the above example code, HDTableCell and HDTableCellEND are my from and to objects. You will need to replace those objects with your own.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: How to drag & drop a mail item from Inbox to Personal folder

Post by Support Team » Mon Aug 24, 2009 4:40 pm

Ciege got it perfectly right - as always :-)
BTW, the Ranorex Recorder should generate the same code for you if you record the drag & drop operation once and let the recorder generate code for it.

Regards,
Alex
Ranorex Support Team
.
Image

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: How to drag & drop a mail item from Inbox to Personal folder

Post by Ciege » Mon Aug 24, 2009 5:07 pm

Not sure I would say "as always" but I have a pretty good percentage going so far! :D
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

cancerion
Posts: 30
Joined: Tue Jun 16, 2009 6:15 pm

Re: How to drag & drop a mail item from Inbox to Personal folder

Post by cancerion » Mon Dec 14, 2009 1:09 pm

Hi,

I am still not able to drag and drop an item from inbox to personal folder.My screen resolution is 1280*1024.I am using Outlook default settings.

It selects the supergrid ,but doesn't perform drag and drop.
Please provide a small snippets.

Thanks,
Sachin

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: How to drag & drop a mail item from Inbox to Personal folder

Post by Ciege » Mon Dec 14, 2009 3:49 pm

Please show the code you have written for the select, drag, drop so we can see if something stands out.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...