Cannot access rules after profile corruption RRS feed

  • Question

  • I have created a new profile - at least I think so - after an corruption of it. Using the Mail (32-bit) control applet.

    Now I'm facing the issue, that my rules have somehow survived, but accessing it in VBA gives inconclusive results:

    Dim OutlookStore As Outlook.Store
    Dim OutlookRules As Outlook.Rules
    Dim OutlookRule As Outlook.Rule
    Set OutlookStore = Application.Session.DefaultStore
    Set OutlookRules = OutlookStore.GetRules
    MsgBox OutlookRules.Count 
    For Each OutlookRule In OutlookRules
    Next OutlookRule

    The message box returns 11, which is the actual number of rules as in the Rules & Alerts dialog of Outlook.

    But the For Each loop throws instantaneously an automation error (987b4010f).

    Clues are welcome.

    p.s. it's Outlook 2010.

    Monday, February 17, 2014 8:57 AM

All replies

  • Hello Stefan,

    Did you confire a new *.pst file?

    Most probably rules were configured to use folders that don't exist at at the moment? Is this the case?

    Monday, February 17, 2014 9:18 AM
  • Yes, a new *.pst was created. The folders for the rules still exists as - I should have mentioned it earlier - the mailbox is an Exchange account.
    Monday, February 17, 2014 10:57 AM
  • Actually, I don't see any info that indicate that you use the Exchanger server in the profile. What results do you get in Outlook wizards page? Do you see the rules in Outlook?

    Most probably your rules have been corrupted too. You must delete and recreate all your rules anew. To clean the rules you can use the following command:

    "C:\Program Files\Microsoft Office\Office11\Outlook.exe" /Cleanrules

    Monday, February 17, 2014 1:07 PM
  • Gosh, I had hopes to avoid that.

    btw, the rules are fully accessible and editable in the Rules & Alerts dialog in Outlook. But they don't work there either (but no error messages).

    Monday, February 17, 2014 2:56 PM
  • Hi, cleaning the rules did not work. After some fiddling with it:

    It seems that the address books are the problem. While they are visible under contacts, they are not usable in the rules.

    Tuesday, February 18, 2014 8:38 AM
  • The rules would have been stored in the mailbox, so as long as you use the same mailbox the rules would be available even if they didn't work.

    When you created a new profile, did you copy the existing one or create a new one from scratch? You'd need one created from scratch.

    Which address books aren't usable? Are they from contacts folders or from the GAL? Are they available in code from the AddressLists collection?

    How are you connected to Exchange, cached or online mode? If cached I'd recommend deleting your OST file when Outlook is closed and let it be rebuilt the next time you start Outlook. It's possible there was OST corruption in addition to profile corruption.

    Ken Slovak MVP - Outlook

    Tuesday, February 18, 2014 4:06 PM