Outlook VBA rule setting

fahadakbar

Board Regular
Joined
May 15, 2014
Messages
63
Hello,

I need help in setting a rule in Outlook through VBA.

I want to create a rule so that when an email arrives

1) from a specific person , say Adam@abc.com
2) specific subject , say hello
3) arrives with in workdays of the week (Monday to Friday)

then

Start an application (.exe file on c drive)

I can do all this by using "rules" option, except the timing condition (3rd , Monday-Friday)
so i need a vba code that can do the entire thing

Thank you so much for the help !
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Re: VBA rule setting

Maybe create 2 mail rules

1) That adds a category to the mails as they come in based on the content in the header, e.g. if Mon Or Tue Or Wed or Thu or Fri then add category "Run Application"

then run;
2) Run application for all mails in inbox with "Run Application" as there mail category if its from Adam@abc.com and has the subject you specify
 
Upvote 0

Forum statistics

Threads
1,214,523
Messages
6,120,031
Members
448,940
Latest member
mdusw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top