Dragging email into Listbox

Add-in Express™ Support Service
That's what is more important than anything else

Dragging email into Listbox
 
L Thrower




Posts: 21
Joined: 2016-07-17
Hello, hopefully, this is an easy question.
due to the following https://social.msdn.microsoft.com/Forums/en-US/9c11bb28-e73b-43cd-bc8b-80a61f7258d7/folderbeforeitemmove-bugs-in-outlook-365-on-windows-desktop?forum=outlookdev I am having to refactor our add-in.
So since we cannot use a custom PST. I had to think of an alternative for users to drop emails into a list.

Is their a way to find which listItem an email is dropped on within a ListBox or is their another control that I could use?

Just trying to think of alternatives to using a PST since the bug is a show stopper.
Posted 15 Jun, 2020 15:10:15 Top
L Thrower




Posts: 21
Joined: 2016-07-17
also, the drag event just needed to get a reference on what email to import to our utility. I do not need to move or create a new listItem. The ListBox will just display categories.
Posted 15 Jun, 2020 15:16:29 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hello L,

From https://answers.microsoft.com/en-us/msoffice/forum/all/office-for-windows-insider-fast-release-notes-may/8bb83fe4-9d2a-4b2e-91c8-b6996f7d6b05:

Outlook

Notable fixes

We fixed an issue where the Folder.BeforeItemMove event didn't fire correctly when a user moved items between folders.


Not sure that I understand the Listbox thing. Is that listbox shown on your form?

Check how to process drag-n-drop at https://www.add-in-express.com/creating-addins-blog/2012/03/26/outlook-task-pane-drag-drop/.


Andrei Smolin
Add-in Express Team Leader
Posted 16 Jun, 2020 00:01:42 Top
L Thrower




Posts: 21
Joined: 2016-07-17
that's wonderful news! I will take a look at the update.
Yes, I was hoping to drag onto a list of some sort in our form to and capture which line item it was dropped onto.
Ill take a look at the link you provided
Posted 16 Jun, 2020 07:44:46 Top
L Thrower




Posts: 21
Joined: 2016-07-17
Well, the move event is now firing!! that's great! Now to figure out why canceling the move isn't working in that scenario.
Posted 16 Jun, 2020 09:02:24 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
L Thrower writes:
Now to figure out why canceling the move isn't working in that scenario.


Please let me know about your result.


Andrei Smolin
Add-in Express Team Leader
Posted 16 Jun, 2020 09:31:21 Top
L Thrower




Posts: 21
Joined: 2016-07-17
So far no luck. I removed all code from the BeforeItemMove event and just had e.Cancel = true;
The move event was never canceled. I will go ask about that on the MSDN forum. If you can replicate this issue, maybe you can use your status on the platform to get this new bug looked at by Microsoft.


FYI.. im going to abandon the ListBox and see if our original process with the PST can be fixed since MS released an update fixing the bug.

https://social.msdn.microsoft.com/Forums/en-US/844abf13-0ed1-4495-bbd5-a9ec73a44149/beforeitemmove-ecancel-not-canceling?forum=outlookdev
Posted 16 Jun, 2020 11:20:32 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hello L,

I can't confirm this. On my machine, Outlook cancels the BeforeItemMove event as expected. Outlook 32bit version 2007 Build 13006.20002 Click-to-Run; the Exchange store is connected to Exchange Online.

Make sure you connect to events of a correct folder; check if other events work for you.


Andrei Smolin
Add-in Express Team Leader
Posted 17 Jun, 2020 05:13:09 Top
L Thrower




Posts: 21
Joined: 2016-07-17
just for verification. You can cancel the non selected item we previously talked about?
https://www.add-in-express.com/forum/read.php?PAGEN_1=2&FID=5&TID=15832#nav_start

I verified that we are connecting the event handlers to every store and folders. Do you know of anything that can cause e.cancel not to work?
Posted 17 Jun, 2020 08:17:34 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
I connect to events of the Inbox folder of my default store, I get the BeforeItemove event and cancel it. I don't see the issue any longer.

What store type do you use?


Andrei Smolin
Add-in Express Team Leader
Posted 17 Jun, 2020 08:30:12 Top