Set Rule for Out of Office (OoO) in Microsoft Outlook on Wednesdays
To set an Out of Office (OoO) rule in Microsoft Outlook that applies only on Wednesdays, follow these steps:
Open Microsoft Outlook and click on "File" > "Account Settings" > "Account Settings."
In the Account Settings window, select the email account for which you want to set the OoO rule and click on "Change."
Click on the "Mail" tab, then select "Automatic Replies (Out of Office)" and click on "Settings."
In the Automatic Replies settings, check the box that says "Send automatic replies" and set the start and end times for your OoO message.
To set the rule for Wednesdays, click on "Exception" and select "Custom."
In the Custom Exception section, select "Specific days" and check the box for "Wednesday."
Set the OoO message for Wednesdays by filling in the "Inside my organization" and "Outside my organization" fields.
Click "OK" to save the changes.
Code Example
Sub SetOoOWednesday()
Dim olApp As Outlook.Application
Dim olNamespace As Outlook.Namespace
Dim olMailbox As Outlook.MAPIFolder
Dim olAutoReply As Outlook.AutoReply
Set olApp = New Outlook.Application
Set olNamespace = olApp.GetNamespace("MAPI")
Set olMailbox = olNamespace.GetDefaultFolder(olFolderInbox)
Set olAutoReply = olMailbox.AutoReply
With olAutoReply
.EnsureVisible
.ReplyType = olAutoReplyTypeInternalAndExternal
.ReplyTime = olBusinessHours
.ExceptionTime = olExceptionTimeCustom
.ExceptionType = olExceptionTypeSpecificDays
.ExceptionDays = olDayWednesday
.Subject = "I'll be out of the office on Wednesdays."
.Body = "Dear [Recipient],
I will be out of the office on Wednesdays. If your message requires immediate attention, please contact [Alternate Contact].
Thank you for your understanding.
Best regards,"
.SendUsingEditor = True
End With
Set olAutoReply = Nothing
Set olMailbox = Nothing
Set olNamespace = Nothing
Set olApp = Nothing
End Sub