I want to use send emails via Outlook as described here. It works fine as long as I have already opened Outlook. So for example if Outlook is minimized and I execute my code
I didn't like the idea to use Thread.Sleep for 5 seconds, so I've found another solution, that worked for me:
All you need is get Inspector object for newly created MailItem
Outlook.Application oApp = new Outlook.Application();
Outlook.MailItem oMsg = (Outlook.MailItem)oApp.CreateItem(Outlook.OlItemType.olMailItem);
Outlook.Inspector oInspector = oMsg.GetInspector;
Answer was published in Google groups originally for Outlook 2007 (but it worked for me with Outlook 2010)