Page 1 of 1

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

Posted: Mon Aug 24, 2009 2:11 pm
by cancerion
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

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

Posted: Mon Aug 24, 2009 4:10 pm
by Ciege
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.

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

Posted: Mon Aug 24, 2009 4:40 pm
by Support Team
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

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

Posted: Mon Aug 24, 2009 5:07 pm
by Ciege
Not sure I would say "as always" but I have a pretty good percentage going so far! :D

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

Posted: Mon Dec 14, 2009 1:09 pm
by cancerion
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

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

Posted: Mon Dec 14, 2009 3:49 pm
by Ciege
Please show the code you have written for the select, drag, drop so we can see if something stands out.