How do I automatically forward an outlook email received during specific hours?

I need to forward emails received in outlook between 5am and 7am from a specific user to another person in the organization. Email that arrive outside of that time should not be forwarded.

Outlook 2003.
chaoticmasterAsked:
Who is Participating?
 
Chris BottomleyConnect With a Mentor Commented:
An outlook rule running a VBA script would do that .. if VBA is acceptable?

If so the following will send but by commewnting out .send and uncommenting .display you can see if it what you want.  Specifically if the receive date is between 5.00 and 6:59:59 inclusive it will be processed and what you need to do is create a new rule for all incoming ... or sender x or whatever and as the action run the script timedForward.

Chris
Sub timedForward(Item As MailItem)
Dim NewForward As Outlook.MailItem
      
    If Item.Class = olMail Then
        If Hour(Item.ReceivedTime) < 5 Or Hour(Item.ReceivedTime) >= 7 Then Exit Sub
        Set NewForward = Item.Forward
        With NewForward
            .Subject = "Auto-Forward: " & Item.Subject
            .To = "fred@fred.com"
'            .Display
            .Send
        End With
    End If
      
    Set NewForward = Nothing
End Sub

Open in new window

0
 
chaoticmasterAuthor Commented:
I dont think it can be done without VB. So this works. Thanks.
0
 
Chris BottomleyCommented:
Glad it helped

Chris
0
All Courses

From novice to tech pro — start learning today.