Outlook COM Add-In not moving messages immediately.

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
 
D

Dmitry Streblechenko \(MVP\)

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
 
G

Gorath

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
 

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