Thsi test in c# works for me on an opened Outlook instance (Outlook 2016, Windows 10) =>
Microsoft.Office.Interop.Outlook.Application oOutlookApp= null;
if (Process.GetProcessesByName("outlook").Count() > 0)
{
oOutlookApp = Marshal.GetActiveObject("Outlook.Application") as Microsoft.Office.Interop.Outlook.Application;
if (oOutlookApp != null)
{
Microsoft.Office.Interop.Outlook.MAPIFolder selectedFolder = oOutlookApp.ActiveExplorer().CurrentFolder;
if (oOutlookApp.ActiveExplorer().Selection.Count > 0)
{
Object selObject = oOutlookApp.ActiveExplorer().Selection[1];
if (selObject is Microsoft.Office.Interop.Outlook.MailItem)
{
Microsoft.Office.Interop.Outlook.MailItem mailItem = (selObject as Microsoft.Office.Interop.Outlook.MailItem);
string sSender = mailItem.SenderName;
string sTo = mailItem.To;
System.Windows.Forms.MessageBox.Show("Sender : " + sSender + Environment.NewLine + "To : " + sTo + Environment.NewLine, "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}
}