Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Developer Outlook Addins > PostItem to 're...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 1616 of 1746
Post > Topic >>

PostItem to 'read' MailItem

by JahMic <jahmic@[EMAIL PROTECTED] > Nov 14, 2007 at 05:02 AM

I'm trying the workaround to save a 'read' MailItem as suggested by
Dmitry and others as follows:

_PostItemPtr	NewPostItem;
NewPostItem = m_Explorer->Application->CreateItem(olPostItem);

NewPostItem->Attachments->Add(NewFileName, olByValue, 1, NewFileName);
// Some additional changes

NewPostItem->MessageClass = _T("IPM.Note");
NewPostItem->Save();

_bstr_t ThisEntryId = NewPostItem->EntryID;
NewPostItem->Close(olSave);

MapiNameSpace	= m_Explorer->Application->GetNamespace(L"MAPI");
_MailItemPtr	NewMailItem	= MapiNameSpace->GetItemFromID(ThisEntryId);
NewMailItem->Display();

However the NewMailItem object is always null.  Any ideas why, or
better yet, how to fix this?

Thanks, J
 




 2 Posts in Topic:
PostItem to 'read' MailItem
JahMic <jahmic@[EMAIL   2007-11-14 05:02:36 
Re: PostItem to 'read' MailItem
"Dmitry Streblechenk  2007-11-14 11:54:25 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 9:17:23 CST 2008.