Hi All,
I looking for suggestion for my following VBA code to execute all predefine MS outlook email rules. I have observed email rules can be executed by pressing shortcut keys (Alt+ h + rr + l + r + e + o + c ). However, my following VBA programme does not work well and it leave rule list window open at last. So not sure its works or not.
It would be great help if someone can look into code and help me to execute all email rules through short cut keys
Following VBA macro code open outlook email rule window > select all rules > press run now button > then close rule window > give notification message alert at last
Outlook VBA Code:
Sub SpecialCharExample()
SendKeys "%(h)", True
SendKeys "%(rr)", True
SendKeys "%(l)", True
SendKeys "%(r)", True
SendKeys "%(e)", True
SendKeys "%(o)", True
SendKeys "%(c)", True
SendKeys ("%{TAB}")
SendKeys "%{F4}", True
SendKeys ("{ENTER}")
' tell the user what you did
ruleList = "All rules were executed against the Inbox " & vbCrLf & ruleList
MsgBox ruleList,
End Sub
I looking for suggestion for my following VBA code to execute all predefine MS outlook email rules. I have observed email rules can be executed by pressing shortcut keys (Alt+ h + rr + l + r + e + o + c ). However, my following VBA programme does not work well and it leave rule list window open at last. So not sure its works or not.
It would be great help if someone can look into code and help me to execute all email rules through short cut keys
Following VBA macro code open outlook email rule window > select all rules > press run now button > then close rule window > give notification message alert at last
Outlook VBA Code:
Sub SpecialCharExample()
SendKeys "%(h)", True
SendKeys "%(rr)", True
SendKeys "%(l)", True
SendKeys "%(r)", True
SendKeys "%(e)", True
SendKeys "%(o)", True
SendKeys "%(c)", True
SendKeys ("%{TAB}")
SendKeys "%{F4}", True
SendKeys ("{ENTER}")
' tell the user what you did
ruleList = "All rules were executed against the Inbox " & vbCrLf & ruleList
MsgBox ruleList,
End Sub