Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

MS Outlook 2013 and Message Rules

Posted on 2014-02-14
3
Medium Priority
?
377 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 84

Assisted Solution

by:David Johnson, CD, MVP
David Johnson, CD, MVP earned 400 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 600 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

824 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