In my program I create Outlook.exe process and send message with pre-populated contain. After sending message or closing message window I need to know whether or not user sent m
Firstly, Outlook is a singleton - if outlook.exe is already running, launching the second instance will simply transfer control to the first instance. Secondly, you are hardcoding the outlook.exe file location.
Use the Outlook Object Model (use a COM bridge) - create an instance of the Outlook.Application
COM object, create new message using Application.CreateItem(0)
, populate the message properties (subject, Body, Recipients, etc,.) and either call MailItem.Send
or display the message using MailItem.Display
and trap the MailItem.Send
event.