|
-
May 12th, 2006, 05:30 AM
#1
Thread Starter
Member
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?
-
May 12th, 2006, 07:23 PM
#2
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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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 
-
May 15th, 2006, 03:20 AM
#3
Thread Starter
Member
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.
-
May 15th, 2006, 03:33 AM
#4
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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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 
-
May 15th, 2006, 04:08 AM
#5
Thread Starter
Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|