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.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Chris BottomleySoftware Quality Lead EngineerCommented:
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.

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 = ""
'            .Display
        End With
    End If
    Set NewForward = Nothing
End Sub

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
chaoticmasterAuthor Commented:
I dont think it can be done without VB. So this works. Thanks.
Chris BottomleySoftware Quality Lead EngineerCommented:
Glad it helped

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.