Outlook Email Rule execution through shortcut keys (VBA codes)

Status
Not open for further replies.

nbm1515

New Member
Outlook version
Outlook 2016 64 bit
Email Account
Office 365 Exchange
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
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
P VBA to add email address to Outlook 365 rule Outlook VBA and Custom Forms 0
O Outlook 2016 This rule will only run when you check your email in Outlook.... Using Outlook 4
A Forward Outlook Email by Filtering using Macro Rule Outlook VBA and Custom Forms 44
A Creating an outlook rule to forward an email with a specific message Using Outlook 1
Mary B Outlook 2013: Rule for copying new email to folder & marking that copy as read Using Outlook 1
N Outlook alert/memo/rule when an email does not arrive Using Outlook 3
D Outlook Desktop App Email Software Using Outlook 0
J Outlook macro to run before email is being send Outlook VBA and Custom Forms 0
D Send email from Outlook Alias using Mac? Using Outlook 0
T Why do Outlook Desktop 2021 tasks from my wife's email show up in my task pane? Using Outlook 2
R Legacy Outlook on Mac Email Cache Using Outlook 0
S Create Outlook Task from Template and append Body with Email Body Outlook VBA and Custom Forms 4
farrissf Outlook 2016 Optimizing Email Searches in Outlook 2016: Seeking Insights on Quick Search vs Advanced Search Features Using Outlook 0
D Outlook VBA forward the selected email to the original sender’s email ID (including the email used in TO, CC Field) from the email chain Outlook VBA and Custom Forms 2
S Email Macros to go to a SHARED Outlook mailbox Draft folder...NOT my personal Outlook Draft folder Using Outlook 2
R Outlook 365 How to integrate a third-party app with Outlook to track email and sms? Using Outlook 2
F Want to add second email to Outlook for business use Using Outlook 4
kburrows Outlook Email Body Text Disappears/Overlaps, Folders Switch Around when You Hover, Excel Opens Randomly and Runs in the Background - Profile Corrupt? Using Outlook 0
J Outlook 365 Outlook Macro to Sort emails by column "Received" to view the latest email received Outlook VBA and Custom Forms 0
M Outlook Macro to save as Email with a file name format : Date_Timestamp_Sender initial_Email subject Outlook VBA and Custom Forms 0
L Fetch, edit and forward an email with VBA outlook Outlook VBA and Custom Forms 2
M "Attachment Detacher for Outlook" add in, does it update the server copy of the email? Using Outlook 1
D Gmail mail is being delivered to a different email inbox in Outlook App 2021 Using Outlook 2
Albert McCann Outlook 2021 Outlook Display of HTML Email from two senders is glitchy Using Outlook 0
richardwing Auto forward email that is moves into a specific outlook folder Outlook VBA and Custom Forms 5
J Recommendations for Outlook Duplicate Email Remover Using Outlook 6
S Outlook 365 Can I change the possible range of highlighting colours when writing an Outlook email? Using Outlook 1
X Open Hyperlinks in an Outlook Email Message (Help with Diane's solution) Outlook VBA and Custom Forms 3
e_a_g_l_e_p_i Email notifications changed with Outlook 2021 Using Outlook 8
glnz How to retrieve or redo Verizon.net email password without affecting Outlook connection? Using Outlook 1
M Outlook 365 refuses to send email Using Outlook 0
K Closing external IMAP email... Outlook 2013 Using Outlook 0
S HTML Code Embedded in String Within Open Outlook Email Preventing Replace(Application.ActiveInspector.CurrentItem.HTMLBody From Working Outlook VBA and Custom Forms 4
D Wrong email address in Outlook 2003 "From" tab in new outgoing emails Using Outlook 4
C Outlook 2007 Removing then adding account restores junk email processing Using Outlook 0
F Wishlist Outlook suddenly began synchronizing deleted items every time I delete a single email. Using Outlook 2
HarvMan Toggle between calendar and email in Outlook 365 Using Outlook 12
F Email being marked as Spam by Gmail and not being visible in Outlook Using Outlook 5
G Save and Rename Outlook Email Attachments Outlook VBA and Custom Forms 0
M How to setup outlook after importing old account information - Entering email account info creates with "(1)" after the account! Using Outlook 1
D Outlook launch email showing new unread email in reading pane Using Outlook 11
K Outlook adds space to rows in HTML email signatures viewed on mobile Using Outlook 1
M HTML email signature in Outlook Using Outlook 3
M Respond to Outlook Email Outlook VBA and Custom Forms 0
U Outlook locking up when replying to Email Using Outlook 7
S Unable to extract text from an Outlook email message Using Outlook 2
P Sending email from outlook IMAP to GMAIL where embedded images are added as attachment Using Outlook 1
P i-Phone 6s Plus receiving 2 notifications from Outlook email Using Outlook 1
C WARNING - DO NOT USE AN OUTLOOK.COM ADDRESS FOR GOOGLE ACCOUNT RECOVERY EMAIL Using Outlook 10
M Outlook, send to > mail recipient - results in plain text email Using Outlook 1

Similar threads

Back
Top