locked
Where are outbound message rules saved? RRS feed

  • Question

  • I have an inbound message rule set in outlook and can see the rule in Inbox's PR_RULES_TABLE. However, I can't find where outbound message rules are saved. Where are they?
    Tuesday, June 14, 2011 8:37 PM

Answers

  • Thanks Dmitry.

    I found the info I needed. I was looking for outbound, client-side rules. As I'm sure you know, those are stored in the Inbox's associated contents table in a message with subject "Outlook Rules Organizer" and message class IPM.RuleOrganizer in the property 0x68020102. Now the problem is to figure out the data structure. That'll be the subject of my next post.

    Thanks again.

    • Marked as answer by Bruce Song Wednesday, June 22, 2011 2:44 AM
    Monday, June 20, 2011 7:01 PM
  • Hi Chuck Bohling,

    I noticed that you have found the information what you need and you open a new thread:

    http://social.msdn.microsoft.com/Forums/en-US/outlookdev/thread/d1cbdc2e-b63d-4fe6-b062-d6ceb16b2abd

    Thank you for all the members' active contributions. I will close this thread and mark your reply as the answer so that people can concentrate on your new thread and give you the suggestions about your new problem.

    Thank you for your understanding.

    Best Regards,


    Bruce Song [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Chuck Bohling Wednesday, June 22, 2011 5:24 PM
    Wednesday, June 22, 2011 2:42 AM

All replies

  • All outbound rules are client side, so they are processed and executed by Outlook itself.
    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Tuesday, June 14, 2011 11:03 PM
  • I need to process the message created by a "move a copy to a folder" action of an outbound rule. I'm using OOM and the _Rules collection from a _Store. I get the _Rules using _Store::GetRules. That works fine if exchange is online but if it's offline, the call fails. Yet the outbound rule is applied if I create a message and send it. So basically, using OOM or MAPI, I need to get the rule and the destination folder of the action. Any thoughts on how I might do that if exchange is offline? I could traverse the entire mailbox folder hierarchy I suppose but that sounds like overkill.

    Tuesday, June 14, 2011 11:23 PM
  • Dear Chunk,

    I think if exchange is offline, we can't get the rules:http://msdn.microsoft.com/en-us/library/bb207562(office.12).aspx

    Calling GetRules can be an expensive operation in terms of performance on slow connections to an Exchange server.

    You need to connect to the server. Hope this helps.

    Regards,


    Be happy.
    Thursday, June 16, 2011 11:07 AM
  • Thanks for the reply. Unfortunately, I am using Store::GetRules but that call fails if outlook (with exchange) is offline.
    Thursday, June 16, 2011 5:52 PM
  • So do you have any idea where the outbound rules are stored? Or how to access them? Does outlook use a non-mapi interface to get them?
    Thursday, June 16, 2011 5:58 PM
  • Dear Chuck,

    As far as I know, we can get the rules via the code snippet:

    Set colRules = Application.Session.DefaultStore.GetRules()

    You can refer to this article:

    http://blogs.msdn.com/b/nayan/archive/2009/04/07/outlook-rules.aspx

    Try to test on your machine. Hope this helps.

    Regards,


    Be happy.
    Friday, June 17, 2011 8:01 AM
  • Thanks for the reply. That's basically what I'm doing, except in C++. If exchange is offline, the GetRules call fails with 0x80020009. If it's online, then the call works. That's not too surprising since outlook won't let you access rules if exchange is offline.
    Friday, June 17, 2011 6:01 PM
  • Extended MAPI call to open the PR_RULES_TABLE will also fail, so I guess there isn't much you can do.
    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been

    Saturday, June 18, 2011 7:04 PM
  • Thanks Dmitry.

    I found the info I needed. I was looking for outbound, client-side rules. As I'm sure you know, those are stored in the Inbox's associated contents table in a message with subject "Outlook Rules Organizer" and message class IPM.RuleOrganizer in the property 0x68020102. Now the problem is to figure out the data structure. That'll be the subject of my next post.

    Thanks again.

    • Marked as answer by Bruce Song Wednesday, June 22, 2011 2:44 AM
    Monday, June 20, 2011 7:01 PM
  • Hi Chuck Bohling,

    I noticed that you have found the information what you need and you open a new thread:

    http://social.msdn.microsoft.com/Forums/en-US/outlookdev/thread/d1cbdc2e-b63d-4fe6-b062-d6ceb16b2abd

    Thank you for all the members' active contributions. I will close this thread and mark your reply as the answer so that people can concentrate on your new thread and give you the suggestions about your new problem.

    Thank you for your understanding.

    Best Regards,


    Bruce Song [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Chuck Bohling Wednesday, June 22, 2011 5:24 PM
    Wednesday, June 22, 2011 2:42 AM