J
JahMic
I keep getting a MAPI_E_NOT_FOUND whenever I try to access a New Mail
Item's PR_BODY tag via the Item's OnWrite event.
Basically, on the user side, I just open a new mail window and type in
some text in the body. Just to be sure, I make sure it's plain text
(shouldn't make a difference right?)
I have tried it through both HrGetOneProp and OpenProperty (brief
sample below). Even OutlookSpy shows it as blank. The frustrating
thing is that going through the OutlookModel.Body Property gets it for
me... Well, along with the security warning.
Any ideas?
Thanks, J
HRESULT ResultCode = HrGetOneProp(pMapiMessage, PR_BODY, &lpProps);
if (FAILED(ResultCode))
{
ResultCode = (pMapiMessage->OpenProperty(
PR_BODY,
(LPIID)&IID_IStream,
STGM_READ,
0,
(LPUNKNOWN*)&lpStream);
if (ResultCode == MAPI_E_NOT_FOUND)
{
// hmmmn, bummer.
}
Item's PR_BODY tag via the Item's OnWrite event.
Basically, on the user side, I just open a new mail window and type in
some text in the body. Just to be sure, I make sure it's plain text
(shouldn't make a difference right?)
I have tried it through both HrGetOneProp and OpenProperty (brief
sample below). Even OutlookSpy shows it as blank. The frustrating
thing is that going through the OutlookModel.Body Property gets it for
me... Well, along with the security warning.
Any ideas?
Thanks, J
HRESULT ResultCode = HrGetOneProp(pMapiMessage, PR_BODY, &lpProps);
if (FAILED(ResultCode))
{
ResultCode = (pMapiMessage->OpenProperty(
PR_BODY,
(LPIID)&IID_IStream,
STGM_READ,
0,
(LPUNKNOWN*)&lpStream);
if (ResultCode == MAPI_E_NOT_FOUND)
{
// hmmmn, bummer.
}