I'm not sure why the Rules Wizard isn't working for you/boss, but since your
curious...
Option Explicit
Private WithEvents olInboxItems As Items
Private Sub Application_Startup()
Dim objNS As NameSpace
Set objNS = Application.GetNamespace("MAPI")
' instantiate objects declared WithEvents
Set olInboxItems = objNS.GetDefaultFolder(olFolderInbox).Items
Set objNS = Nothing
End Sub
Private Sub Application_Quit()
' disassociate global objects declared WithEvents
Set olInboxItems = Nothing
End Sub
Private Sub olInboxItems_ItemAdd(ByVal Item As Object)
On Error Resume Next
Dim oFrwMsg As Outlook.MailItem
If TypeName(Item) = "MailItem" Then
Set oFrwMsg = Item.Forward
oFrwMsg.Send
End If
Set Item = Nothing
End Sub
Place the code in "ThisOutlookSession" and keep in mind that it will fail if the
new security update has been applied.
--
/Neo
PS - Could you do me a favor next time and limit your post to 2 or 3 groups max?
Thanks.
Quote:
> I need a code to autoforward messages as they arrive in the inbox of outlook
> 2000.
> Is this possible?
> Just put that address in the code and I will edit it to the correct email.
> Thank you all.
> I am trying to learn programming and am havingt a hell of a time.
> This is for my boss at work. He will really be pleased if it can be done.
> Thanks in advance,
> Chris