• Outlook instance abnormally quits after Send

    Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » Outlook instance abnormally quits after Send

    Author
    Topic
    #477620

    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!!

    Thanks,

    Tom

    Viewing 0 reply threads
    Author
    Replies
    • #1287026

      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.

    Viewing 0 reply threads
    Reply To: Outlook instance abnormally quits after Send

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: