Outlook COM Add-In not moving messages immediately.

  • Thread starter Thread starter Gorath
  • Start date Start date
G

Gorath

Hi all,

I wrote an Outlook COM Add-In that adds new custom toolbar to Outlook.
This toolbar has a button to move selected messages to "Deleted Items"
folder. It's kind of Outlook "Delete" button. However, for some
unknown reason, when I clicked the button to move selected messages to
"Deleted Items" folder, they still stayed in the current folder. But,
once I moved to some other folder, and came back to it, all the
selected messages were successfully moved to "Deleted Items" folder.

I don't understand why there is such delay. Does it have something to
do with Outlook settings, or Exchange server settings? Or, simply
there is a bug in my code. But, my logs show no error. I am using
"IMAPIFolder::CopyMessages" to move messages.

Thanks
 
How do you retrieve IMAPIFolder? Since your code is a COM addin, why not use
OOM and call MailItem.Move() instead of using Extended MAPI?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
That's good idea! I will try it today.
Thanks!

Dmitry Streblechenko \(MVP\) said:
How do you retrieve IMAPIFolder? Since your code is a COM addin, why not use
OOM and call MailItem.Move() instead of using Extended MAPI?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top