PC Review


Reply
Thread Tools Rate Thread

_MailItem::Move fails

 
 
tnemec78@googlemail.com
Guest
Posts: n/a
 
      9th Jun 2009
During many days of testing of my Outlook add-in I came across an
interesting problem:

Every now and then my call to _MailItem::Move fails. I have no idea
why that is. I only observed that in such situations the Move
operation acts as a copy and it returns a failure status.
See below:

void MoveItem(CComPtr <Outlook::_MailItem> mi, CComPtr <MAPIFolder>
newfolder)
{
HRESULT hr;
CComPtr <IDispatch> ReturnedItem;

hr = mi->Move(newfolder, &ReturnedItem);
if( FAILED( hr ))
{
//here ReturnedItem == 0x00000000 although I can see that
the item *EXISTS* in the new folder
}
// ... more code ...
}

Although the new instance of the item exists, the old one was not
deleted. Despite this the ReturnedItem (ie. the new instance == 0)

Does anyone else have more experience with this issue? I would like to
know more about what can cause this, how to prevent this from
happening. If there is no way to do this then I suppose I only have to
mitigate the impact of this happening.
 
Reply With Quote
 
 
 
 
tnemec78@googlemail.com
Guest
Posts: n/a
 
      9th Jun 2009
when the problem appears hr == 0x8001010F
 
Reply With Quote
 
tnemec78@googlemail.com
Guest
Posts: n/a
 
      9th Jun 2009
when Move fails then hr == 0x8004010F (MAPI_E_NOT_FOUND)
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Msg fails to move to trash after delete, how to move out of inbox Drayke Microsoft Outlook Discussion 1 3rd Nov 2009 06:58 PM
_MailItem and ItemSend see_sharp Microsoft Outlook Program Addins 1 18th Jul 2007 02:54 PM
Outlook::_MailItem and put_DeferredDeliveryTime Sharanga Dayananda Microsoft Outlook Program Addins 2 29th May 2007 11:21 AM
_MailItem -> SaveAs =?Utf-8?B?TU9OMjA1?= Microsoft Outlook 1 22nd Feb 2007 06:01 PM
_MailItem -> SaveAs =?Utf-8?B?TU9OMjA1?= Microsoft Outlook Program Addins 1 22nd Feb 2007 06:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:19 PM.