Client side email forwarding in Microsoft Outlook

For security reasons the forwarding of emails to external destinations is often disabled server side in Microsoft Exchange. If you really still want / need to do this then here is how:

  • Add the following VBA code in the Visual Basic editor of Outlook (Alt-F11). Be sure to change to the address where you want the mail to go and also adjust the days and times when you want forwarding to occur. Comment out the line “myattachments.Remove 1” if you want to forward attachments as well:

Sub AutoForwardEmail(Item As Outlook.MailItem)

Dim myFwd As Outlook.MailItem

Dim currentWeekDay As String

Dim currentHour As Integer

currentWeekDay = WeekdayName(weekDay(Date), False, vbSunday)

currentHour = hour(Time)

If currentWeekDay = “Saturday” Or currentWeekDay = “Sunday” Or currentHour < 9 Or currentHour > 17 Then

Set myFwd = Item.Forward

Set myattachments = myFwd.Attachments

While myattachments.Count > 0

myattachments.Remove 1


myFwd.Recipients.Add “


End If

Set myFwd = Nothing

End Sub

  • Enable Macros in Outlook (Tools -> Macro -> Security) and then restart Outlook:

  • Tell Outlook to run this code for each inbound message (Tools -> Rules and Alerts -> New Rule -> Check Messages when they arrive -> Next -> YES -> Checkbox “Run a Script” -> Then select the script you just created e.g.  “AutoForwardEmail”:

  • Make sure that Outlook is running and connected to Exchange for this to work!