title: Microsoft.Office.Interop.Outlook with dlls?
body: <p>I have a problem with the dlls I guess.</p>
  
  <pre><code>Microsoft.Office.Interop.Outlook.Application oApp = new Microsoft.Office.Interop.Outlook.Application();
  
                  // Get the MAPI namespace.
                  Microsoft.Office.Interop.Outlook.NameSpace oNS = oApp.GetNamespace("mapi");
  
                  // Log on by using the default profile or existing session (no dialog box).
                  oNS.Logon(Missing.Value, Missing.Value, false, true);
  
                  // Alternate logon method that uses a specific profile name.
                  // TODO: If you use this logon method, specify the correct profile name
                  // and comment the previous Logon line.
                  //oNS.Logon("profilename",Missing.Value,false,true);
  
                  //Get the Inbox folder.
                  Microsoft.Office.Interop.Outlook.MAPIFolder oInbox = oNS.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderInbox);
  
                  //Get the Items collection in the Inbox folder.
                  Microsoft.Office.Interop.Outlook.Items oItems = oInbox.Items;
  
  
                  // Get the first message.
                  // Because the Items folder may contain different item types,
                  // use explicit typecasting with the assignment.
                 // Microsoft.Office.Interop.Outlook.MailItem oMsg = (Microsoft.Office.Interop.Outlook.MailItem)oItems.GetFirst();
                 // Microsoft.Office.Interop.Outlook.MailItem oMsg = (Microsoft.Office.Interop.Outlook.MailItem)oItems;
                  foreach (Microsoft.Office.Interop.Outlook.MailItem mail in oItems) 
  {Activity.StartTime = mail.ReceivedTime;
                                Activity.EndTime = mail.ReceivedTime;
                                  Activity.Details = mail.Subject;
                                 Activity.Notes = mail.Body;}  
  </code></pre>
  
  <p>I am able to access mail.Body , Subject etc but I can not access mail.Sender and mail.SenderEmailAddress 
  Does anybody had this problem? 
  I see here <a href="https://msdn.microsoft.com/en-us/library/office/dn320330.aspx" rel="nofollow">https://msdn.microsoft.com/en-us/library/office/dn320330.aspx</a>
  that it is a mailItem property so I do not know what is going on with my .dll. I have added as Reference C:\WINDOWS\assembly\GAC_MSIL\Office\15.0.0.0__71e9bce111e9429c\Office.dll
  C:\Program Files (x86)\Microsoft.NET\Primary Interop Assemblies\Microsoft.Office.Interop.Outlook.dll
  Do I need to add more .dlls to get access to sender property?</p>