Trying to repair Outlook rules

Status
Not open for further replies.

danno

Member
Outlook version
Outlook 2016 64 bit
Email Account
IMAP
Is there a way to fix a large set of 'broken' Outlook 2010 rules (with VBA, if necessary)? I had a user who had rules that referenced another PST file (moved messages to it by rule depending on a condition). He was trying to restore items back to that secondary PST file, but he closed it in Outlook, renamed that file, then opened the 'backup' PST, restored the missing items back to his default PST file (outlook.pst), closed the other PST file, then renamed that original secondary PST file back.

Now when he opens Outlook, all those rules that reference that secondary PST file shows an 'error' indicator, even though the path and file name of the secondary PST file is the same as before. I'm not familiar with the data structure of the rules sets, so I have no idea how to proceed in trying to fix his rules. He has several hundred rules, so fixing them manually is not an option.

Steps to reproduce the problem:
- load another (2nd) PST file, create rule to move a message there, close the PST file - opened rules - no error showing even though PST file isn't available
- closed and reopened Outlook - now it shows 'error' when I try to open rules
- opened the other PST file - now no error showing opening rules (this step can be skipped - I did that step to find out if simply reopening the same PST file would fix the error and it did)
- opened another (3rd) PST file, created same test folder as the destination of where the rule is supposed to move the message to and then closed both PST files
- renamed the 2nd PST file to something else, then renamed the 3rd PST file to the prev name of the 2nd PST.
- opened Outlook and when I tried to go into Manage Rules, it popped an error message box 'one or more rules contain errors...' and the test rule I had just created now showed 'error' and the rule description no longer showed the destination folder (it had changed to 'specified').
 

danno

Member
Outlook version
Outlook 2016 64 bit
Email Account
IMAP
So there's no VBA that can be written? I would assume that the rules must have some unique identifier embedded within each rule that identifies the PST file and folder (source or destination). Replacing the destination PST file with another one with the same name and path seems to trigger the error.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Rules are not fully exposed in the object model. You can use VBA to create the rules, but not repair them. Unless this happens frequently, writing and testing VBA will take longer than just fixing them.

See http://msdn.microsoft.com/EN-US/library/office/ff867254(v=office.15).aspx for more information about what is supported.

Now, you could use this script to get a list of the rules - http://www.gregthatcher.com/Scripts/VBA/Outlook/GetListOfRules.aspx - then delete them and use VBA to recreate them, but it may not be cost effective.
 

danno

Member
Outlook version
Outlook 2016 64 bit
Email Account
IMAP
Thanks for the help. It's puzzling why Microsoft would decide to withhold the key pieces of the object model to allow one to properly work with rules.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Rules support in the object model were only added in 2007 and they added just the most common features.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
B Outlook 2016 Outlook crashes when trying to print certain emails Using Outlook 5
M outlook 365 trying to finish my sentences Using Outlook 0
A Run-time error '430' on certain emails when trying to set "Outlook.mailitem" as "ActiveExplorer.Selection.Item" Outlook VBA and Custom Forms 2
R Error when trying to forward current email item Outlook VBA and Custom Forms 7
X I have met my waterloo trying to resolve embedded graphics problem with outlook 2007 and now 2016 Using Outlook 1
O The page that you are trying to access cannot be loaded. Using Outlook 0
C Trying to populate an appointment ComboBox from Excel Outlook VBA and Custom Forms 2
T Outlook "A program is trying to access Outlook" Using Outlook 3
S SendFromAccount - Problem trying to test existing value in open email Outlook VBA and Custom Forms 2
N Error 0x80090326 when trying to setup IMAP account on Outlook.com Using Outlook.com accounts in Outlook 1
KURTiS MAXiMUS Trying to appactivate ERP window Outlook VBA and Custom Forms 16
R Trying to extract information between two symbols from outlook subject Using Outlook 2
Danie Lawson Trying to recover calendar Using Outlook 4
L Trying to open contacts pst. file in outlook 365 Using Outlook 3
L Trying to check for the absence of mail. Outlook VBA and Custom Forms 1
M trying to disable junk email filter. completely. Using Outlook 4
S Outlook 2010 trying to default Data file to outlook.com calendar Using Outlook 6
C Trying to move my Business Contact Manager ver. 2003 to BCM ver. 2010 Using Outlook 3
R Trying to sync my Outlook email on iphone Using Outlook 1
A outlook trying to keep sending Using Outlook 1
P Trying to add subject and name to an email using VB Code Using Outlook 3
B Trying to get old emails from a not working computer but having trouble. Using Outlook 6
P Outlook works, but freezes when trying to use calender v2007 (vista prof) Using Outlook 1
K A program is trying to send an e-mail message on your behalf... Using Outlook 1
P Trying to get 'Calendar Name' to appear like 'Subject' and 'Location' in event Calendar Printing Assistant 0
S Trying to have a prompt to ask for text to be added to subject before sending. Using Outlook 3
A Trying to connect to exchange Exchange Server Administration 3
K Wont send or recieve now with new server keeps asking for password when trying Using Outlook 1
D Outlook "Trying to Connect" Exchange Server Administration 1
P Word experienced and error trying to open the file Using Outlook 2
S Trying to install BCM 2010 x64, getting error BCM (Business Contact Manager) 8
D Outlook 2003 - A program is trying to access e-mail addresses Outlook VBA and Custom Forms 5
S Trying to create a UPS from Outlook VBA and Custom Forms 2
T Trying to start Outlook from VBA or VBS not working. Outlook VBA and Custom Forms 4
S how to disable security message in save attachments macro "A programis trying to access e-mail addre Outlook VBA and Custom Forms 5
A Error: 3033 when trying to OpenDatabase using DAO Outlook VBA and Custom Forms 3
U Recovered PST file "Cannot move item" error when trying to move e- Using Outlook 6
D Error trying to connect to database on the server BCM (Business Contact Manager) 1
D Trying to reconnect BCM databases in Outlook 2003 BCM (Business Contact Manager) 1
DariTrevino MIcrosoft Outlook PST file cannot repair Using Outlook 1
A ScanPST finding errors but no Repair button Using Outlook 2
R How To Repair OST File & Export OST File to Outlook PST ? Using Outlook 3
J Office 365 - Online Repair vs. Uninstall Reinstall Using Outlook 1
C scanpst.exe doesn't repair .pst file Using Outlook 1
Diane Poremsky Repair a Large Outlook Personal Folders File (over 2GB) New Slipstick.com Articles 0
Diane Poremsky How to repair a damaged Outlook Personal Folders file (pst) New Slipstick.com Articles 0
S Repair corrupt .PST & .OST files Using Outlook 5
makinmyway ScanPST.exe Missing Repair Button Using Outlook 15
M How do I Repair OST File from corruption and Recover OST data? Using Outlook 3
V pst repeatedly needing repair Using Outlook 2

Similar threads

Top