Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-26-2013, 10:15 AM
big0 big0 is offline Run_All_Inbox_Rules Windows 7 64bit Run_All_Inbox_Rules Office 2010 64bit
Novice
Run_All_Inbox_Rules
 
Join Date: Jun 2013
Posts: 10
big0 is on a distinguished road
Exclamation Run_All_Inbox_Rules

I used the code below in Windows XP Outlook 2007 with no issues. When I moved to Windows 7 and Outlook 2010, I keep receiving an error.

The error:
run time error '-244055551 (f1740201)':
Automation error

I tried to research the many different web sites, but have not found a solution to my issues. Please assist

big0

Sub A_Run_All_Inbox_Rules()
' Macro Ready Message Box
MsgBox "Ready All Inbox Rules will be executed.", vbCritical


Dim st As Outlook.Store
Dim myRules As Outlook.Rules
'Dim myRules As Outlook.Rules
Dim rl As Outlook.Rule
Dim count As Integer


Dim ruleList As String
' On Error Resume Next
' get default store (where rules live)
Set st = Application.Session.DefaultStore
' get rules
Set myRules = st.GetRules
' iterate all the rules
For Each rl In myRules

' determine if it’s an Inbox rule
If rl.RuleType = olRuleReceive Then
' if so, run it
rl.Execute ShowProgress:=True
count = count + 1
ruleList = ruleList & vbCrLf & rl.Name
End If
Next
' Macro Done Message Box
MsgBox "Rules have been ran succesfull ", vbCritical

Set rl = Nothing
Set st = Nothing
Set myRules = Nothing
End Sub
Reply With Quote
  #2  
Old 07-22-2013, 12:58 PM
big0 big0 is offline Run_All_Inbox_Rules Windows 7 64bit Run_All_Inbox_Rules Office 2010 64bit
Novice
Run_All_Inbox_Rules
 
Join Date: Jun 2013
Posts: 10
big0 is on a distinguished road
Default

Requesting assistance on resolving my macro issue.
Reply With Quote
Reply

Thread Tools
Display Modes


Other Forums: Access Forums

All times are GMT -7. The time now is 04:09 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft