Saving message properties only locally (Outlook)

How can an Outlook add-in set a MAPI property (for example, body content) in a message, but only save it in the local cache (and not send it back to the exchange server)? I saw this with several encryption add-ons.

I am open to using almost any API that could do the trick.

Thanks!

+4
source share
1 answer

So, I discovered this on MSDN. How to manage a message in OST without causing synchronization in Exchange cached mode Stephen Griffin first spoke about this back in 2005 here .

I have not yet had the opportunity to test it, but it looks like you can change the OST and not start synchronization. The trick requests a message using IID_IMessageRaw, not IID_IMessage, as is usually done.

The only problem you will encounter is that it requires the use of extended MAPI and therefore C ++. The tags are in the VSTO question list, so I'm not sure what the requirements might be.

The given example:

HRESULT HrOpenRawMessage ( LPMDB lpMSB, ULONG cbEntryID, LPENTRYID lpEntryID, ULONG ulFlags, LPMESSAGE* lpMessage) { ULONG ulObjType = NULL; HRESULT hRes = lpMDB->OpenEntry( cbEntryID, lpEntryID, IID_IMessageRaw, ulFlags, &ulObjType, (LPUNKNOWN*) lpMessage)); return hRes; } 
+1
source

Source: https://habr.com/ru/post/1301154/


All Articles