-
Using NewItemEX to forward mail
Hi. I just got Outlook 2007. In my older, Outlook 2003, I have the following code:
Public WithEvents outApp As Outlook.Application
Sub Initialize_Handler()
Set outApp = Application
End Sub
Private Sub outApp_NewMailEx(ByVal EntryIDCollection As String)
Dim arr() As String
Dim i As Integer
Dim m As MailItem
On Error Resume Next
arr = Split(EntryIDCollection, ",")
For i = 0 To UBound(arr)
Dim x As MailItem
Set m = Application.Session.GetItemFromID(arr(i))
Set x = m.Forward
x.Subject = m.Subject
x.To = xxx@yyy.net
x.Send
Next
End Sub
Problem is, this snares all the junk mail before the junk mail filter has had a chance to examine it.
Is there a way in 2007 to only forward email after the junk mail filter has processed it?
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules