Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I ran across a post on Super User that addressed a question about Outlook email forwarding. One user provided a script to utilize.

Sub AutoForwardAllSentItems(Item As Outlook.MailItem)
Dim strMsg As String
Dim myFwd As Outlook.MailItem

Set myFwd = Item.Forward

myFwd.Recipients.Add ""
Set myFwd = Nothing 
End Sub

This worked good for me, but how would it work if I want to just automatically forward email in a specific folder only? The folder already has email auto directed to it upon receipt. Any ideas?

share|improve this question
@DaveM Check the formatting next time, please. – slhck Feb 16 '12 at 18:31

Assuming that you are redirecting the email into the folder using a rule, you could run this script in the same rule, so it would only apply in the same conditions.

Otherwise the macro can be altered to look for unread messages in the current folder and forward them. You'd then just manually run the macro (give it a shortcut to make it easy) periodically whilst in that folder and it'll do the forwards for you.

Sub ForwardUnreadInFolder()
  Dim CurItem As Outlook.MailItem
  Dim myFwd As Outlook.MailItem
  Dim strMsg As String

  Set CurFolder = Application.ActiveExplorer.CurrentFolder
  Set AllItems = CurFolder.Items
  NumItems = CurFolder.Items.Count

  For i = 1 To NumItems


    Set CurItem = AllItems.Item(i)

    If (CurItem.UnRead) Then

        Set myFwd = CurItem.Forward
        myFwd.Recipients.Add ""
        Set myFwd = Nothing

    End If


   MsgBox "Done"
End Sub
share|improve this answer
Thanks. Yes I first tried the copying to another folder but realized the separate rule for the script forwarded all msgs first. . then copied. SO i did change the rule to move a copy of emails to a folder and had the rule run the script after that . . but it continued to auto forward every email before moving any to the folder. All emails in the new folder show as unread and NOT forwarded. Was hoping this could be automated without having to manually run macros or other, since if I am not at the computer nothing can get forwarded. Thank you for the reply. – Ian Feb 16 '12 at 21:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .