Results 1 to 5 of 5

Thread: Application_NewMailEx event not firing

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2005
    Posts
    45

    Question Application_NewMailEx event not firing

    I am using the above event to intercept new emails so I can process them. What I am finding is that the event will not fire after the initial send/receive when you logon but is OK after that. I am using Outlook 2003 in cached exchange mode with a hosted server. Macro security is set to low.

    I've tried it without being in cached mode but it is still the same and the standard NewMail event also does the same thing. I tried to use a rule to do what I want which is to return a reply email to the sender if they send their email to a particular domain, but I find that it works once and then not again until I restart Outlook, hence the reason for VBA. I suppose I could use a combination of both but that would be a real pain to setup on 30 users machines.

    Anybody else had the same problem?

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Application_NewMailEx event not firing

    You could place a manual code call to fire the Application_NewMailEx event from the Application_MAPILogonComplete event. MAPILogonComplete only fires once when Outlook starts up and never again unless you close Outlook and re-open it.

    Only issue will be that the NewMailEx takes an Item or EntryID parameter.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Member
    Join Date
    Sep 2005
    Posts
    45

    Re: Application_NewMailEx event not firing

    Unfortunately, I tried that and the MAPI logon fires before the first send/receive so there will not be any new mails to process at that point.

    Looking round on the net, I think that the problem lies with the fact that when mail arrives at the server and Outlook is not connected, then when you do connect up later the mail is not considered new anymore and the event doesn't fire. Sounds about right for Microsoft logic!

    Think I'm on a loser here. Thanks for the idea anyway RobDog.

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Application_NewMailEx event not firing

    Is the Option set for "Perform a a send and receive for the group when Outlook starts" in the Options of Outook? Maybe if you turn it on it may help?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  5. #5

    Thread Starter
    Member
    Join Date
    Sep 2005
    Posts
    45

    Re: Application_NewMailEx event not firing

    Do you mean "Send immediately when connected", if so it was already on. I turned it off to experiment and it still did the receive part.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width