[This is now documented here:]

If you’re like me, you spend your time using Depends to see what kinds of new and exciting functions are exported every time there’s a new release of Outlook. Ok – so I don’t really do that, but development did ask me to document one of those functions. Here we go:


Performs post-send categorization on a mail item based on its PidTagConversationId.

Exported by:

Called by: Client
Implemented by: Outlook
HRESULT WINAPI HrProcessConvActionForSentItem(
    SBinary const *pmbinStoreEid,
    SBinary const *pmbinMsgEid,
    SBinary const *pmbinConvID,
    DWORD dwFlags)



[in] The PidTagEntryId of the store (or the PidTagStoreEntryId of the mail item).  Cannot be NULL or invalid.


[in] The PidTagEntryId of the mail item.  Cannot be NULL or invalid.


[in] The PidTagConversationId of the mail item.  Cannot be NULL or invalid.


[in] A bitmask of the following flags (recommend value is 0).  Unknown flags will result in E_INVALIDARG. The following flag can be set: 
PCAFSIF_MSGEID_IS_SEARCH_KEY (0x00000001) – The pmbinMsgEid argument is actually the PidTagSearchKey of the message.  This is more expensive and should be avoided if a PidTagEntryId is available.

Return Value

S_OK on success, or a FAILED HRESULT on failure


Categories are considered personal information and should not be transmitted outside the user’s mailbox.  This function should be called on the Sent Item copy (or equivalent) of the mail item only after the mail item has been sent.

This function can only be called in process with Outlook.exe, such as from a COM Add-In. Attempts to call this function out of process will cause an access violation exception.

[update: 8/23/2010] Got confirmation from dev that this function is in-proc only after my attempt to add it to MFCMAPI caused a crash.

Comments (5)

  1. George Strutt says:

    Is there a way to force Conversation Actions to get applied to incoming mail messages? I am implementing a custom MAPI store (wrapped PST) and am unable to get the conversation actions to run automatically on incoming mail.

  2. Sure – just run it. You're the store provider – run HrProcessConvActionForSentItem on the incoming messages.

  3. George Strutt says:


    So i notice that there are two methods being exported from Outlook.exe:

    HrProcessConvActionForSentItem@16 and HrProcessConvActionForSentItem

    Which one should be used?

    Also I tried them both but unfortunately the conversation action did not get applied to the incomming message. Here is what I did:

    1. Created new message in store and set the properties PidTagConversationIndex and PidTagConversationIndexTracking on it.

    2. Called SaveChanges() on the message (using the KEEP_OPEN_READWRITE flag).

    3. Called HrProcessConvActionForSentItem() on the message.

    Is this enough for do I need to do any extra steps?

  4. Use the one without the @. I didn't get a chance to test this function out and see exactly what it does. The documentation indicates that it applies to sent items, not received, so maybe that's why you're not seeing any changes.

  5. George Strutt says:

    Looks like I was not using the correct value for PidTagConversationId. The method works for conversation action of type 'Add Category'.

    That said the code does NOT seem to work for the 'Ignore' or 'Move to folder' conversation actions.

Skip to main content