2011-07-06, 12:23 #1
- Join Date
- Feb 2001
- Richland, Washington, USA
- Thanked 0 Times in 0 Posts
Outlook instance abnormally quits after Send
Access 2007 SP2
Outlook 2007 SP2
I'm opening Outlook from Access VBA, composing an e-mail message, and then sending it. If I watch Processes in Task Manager, the instance gets created fine and I step throught the code to the .Send command. When I execute that command, Outlook terminates (it disappears from the Task Manager Processes list). If I open Outlook from the desktop, it's apparent that the e-mail did get sent before Outlook terminated. Since I want to send multiple e-mails, this presents a headache -- I don't want to re-create the Outlook object for each message!
Curiously, if Outlook is already open before I execute this "send e-mail" code (I check for an existing instance in the code and open a new instance only if an existing instance is not found), everything works fine. It's only when I have to create the instance of Outlook in VBA that the "disappearing Outlook" problem described above raises its ugly head.
Any thoughts on what might be causing (and how to avoid it!) this would be greatly appreciated!!
Subscribe to our Windows Secrets Newsletter - It's Free!
Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!
+ Get this BONUS — free!
Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!
2011-07-07, 20:45 #2
- Join Date
- Aug 2001
- Evergreen, CO, USA
- Thanked 42 Times in 42 Posts
I think we will need to see your code as to how you create the instance of Outlook when it isn't already open. There are at least a couple of methods for creating a new instance, and they have different behavior when doing things in Outlook. Also another question - the Outlook connected to Exchange? If so Outlook behaves in a different manner when sending.Wendell