Solved

MS Outlook 2013 and Message Rules

Posted on 2014-02-14
3
359 Views
Last Modified: 2014-02-27
On a Windows 7 x64 PC with MS Outlook 2013 for some reason one or two of the many (perhaps two dozen ?) message rules occasionally get unchecked or do not work.  Is there anything evident that would cause this or something we could do to prevent this ?  And/Or any way to programatically through some type of scripting or batch file re-enable all of the Message Rules for a particular user on a daily basis ?  TIA
0
Comment
Question by:LGroup1
3 Comments
 
LVL 78

Assisted Solution

by:David Johnson, CD, MVP
David Johnson, CD, MVP earned 100 total points
ID: 39860994
the pst file must be local to the machine and not on a network share
0
 
LVL 76

Accepted Solution

by:
David Lee earned 150 total points
ID: 39865384
Hi, LGroup1.

The code below will enable all rules each time Outlook starts.  Follow these instructions to add the code to Outlook.

1.  Start Outlook
2.  Press ALT+F11 to open the VB editor
3.  If not already expanded, expand Microsoft Office Outlook Objects and click on ThisOutlookSession
4.  Copy the code from the Code Snippet box and paste it into the right-hand pane of Outlook's VB Editor window
5.  Edit the code as needed.  I included comment lines wherever something needs to or can change
6.  Click the diskette icon on the toolbar to save the changes
7.  Close the VB Editor
8.  Click File and select Options
9.  When the Outlook Options dialog appears click Trust Center then click the Trust Center Settings button
10. Click Macro Settings
11. Select either of the two bottom settings (i.e. "Notifications for all macros" or "Enable all macros (not recommended; potentially dangerous code can run)".  The choice of which to chose is up to you.  If you select "Notifications", then you'll be prompted at times to enable macros. If you pick "Enable all" then there's a chance that a malicious macro could run.  It's a question of how much risk you want to assume.
12. Click Ok until the dialog-boxes have all closed
13. Close Outlook
14. Start Outlook.  Outlook will display a dialog-box warning that ThisOutlookSession contains macros and asking if you want to allow them to run.  Say yes.

Private Sub Application_Startup()
    EnableAllRules
End Sub

Sub EnableAllRules()
    Dim olkRules As Outlook.Rules, olkRule As Outlook.Rule
    Set olkRules = Session.DefaultStore.GetRules
    For Each olkRul In olkRules
        olkRul.Enabled = True
    Next
    olkRules.Save
End Sub

Open in new window

0
 

Author Closing Comment

by:LGroup1
ID: 39892811
Perfect, thanks all !
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Use email signature images to promote corporate certifications and industry awards.
If you don't know how to downgrade, my instructions below should be helpful.
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now