PDA

View Full Version : Solved: Forward Email when recieved on a Specific Date and with specific Subject Line



t277
11-28-2012, 10:23 AM
Hello. I hope someone might be able to help me out.

I recieve an automated email daily with an attachment. I want Outlook to automatically forward this email to an outside party. However, I don't want them to recieve the daily email. I just one particular day of the week for this to happen.

(I have tried Outlook Rules, but it does not allow me to specify forwarding only on a particular day that it has been recieved.)

The Subject Line is always: "Backorders"
The Specific Day is on: Sunday

Please reply with any suggestions! I appreciate it!

skatonni
12-04-2012, 06:19 PM
You have to leave Outlook on.


Sub SundayBackorders(newItem As MailItem)
' Mail received "With specific words in the subject" run script
Dim newFwd As MailItem
If Weekday(Now) = 1 Then

Set newFwd = newItem.Forward
newFwd.To = "some address"
newFwd.Send

Else
Debug.Print "Not Sunday"

End If
Set newFwd = Nothing
End Sub

t277
12-05-2012, 06:10 AM
Works perfectly! Thank you!!!