Outlook 2000 help 
Author Message
 Outlook 2000 help

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




Thu, 19 Dec 2002 03:00:00 GMT  
 Outlook 2000 help
Thank you. I am new. I will chill on the posting.
How do I put the code in "ThisOutlookSession"? I am very new to coding. I
know how to get to the VB editor, then what do I do? Please don't laugh, you
were new to one time also. I will learn fast though. Thank you friend. Do I
open the VB Editor while in my inbox? Any help is appreciated.


Fri, 20 Dec 2002 03:00:00 GMT  
 Outlook 2000 help
Alt+F11 will open the VBA environment.

Expand the list of modules in the project window (usually on the left) and
you'll see ThisOutlookSession.

--
Sue Mosher
Author of
  "Teach Yourself Microsoft Outlook 2000 Programming in 24 Hours"
  "Microsoft Outlook 2000 E-mail and Fax Guide"

Outlook and Exchange solutions at http://www.slipstick.com


Quote:
> Thank you. I am new. I will chill on the posting.
> How do I put the code in "ThisOutlookSession"? I am very new to coding. I
> know how to get to the VB editor, then what do I do? Please don't laugh,
you
> were new to one time also. I will learn fast though. Thank you friend. Do
I
> open the VB Editor while in my inbox? Any help is appreciated.



Fri, 20 Dec 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. REQ: Outlook 2000 help

2. howe can I get my hotmail accounts to my outlook 2000 help

3. Building Apps MS Outlook 2000- Help Desk custom

4. Outlook 2000 Help Desk

5. REQ: Outlook 2000 help

6. Outlook 2000 help

7. form of outlook xp to outlook 2000 sp3

8. Mosher Outlook 2000 Code wont run in Outlook 2002

9. Changes in the Item.GetInspector.CommandBars from Outlook 2000 to Outlook XP

10. outlook 2000 and outlook 97 display differently

11. CDO vs Outlook 2000 Object Library?? (Outlook Newbie)

12. Prob : Adding contacts for Outlook 2000 and Outlook 97

 

 
Powered by phpBB® Forum Software