Solved

MS Outlook 2013 and Message Rules

Posted on 2014-02-14
3
361 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 79

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

PHP contact form that lets the user to contact the company through email contact form. A button is fixed at the bottom of site, on clicking a new window will open where a user can send the email.
Large Outlook files lead to various unwanted errors and corruption issues. Furthermore, large outlook files can also make Outlook take longer to start-up, search, navigate, and shut-down. So, In this article, i will discuss a method to make your Out…
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…

863 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

24 Experts available now in Live!

Get 1:1 Help Now