Microsoft.Office.Interop.Outlook.Application oApp = new Microsoft.Office.Interop.Outlook.Application(); Microsoft.Office.Interop.Outlook.MailItem oMsg = (Microsoft.Office.Interop.Outlook.MailItem)oApp.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem); MessageBox.Show(oMsg.SenderName.ToString()); // here is the error MessageBox.Show(oMsg.SenderEmailAddress.ToString()); // here is the error
Set myOlApp = CreateObject("Outlook.Application") Set myNamespace = myOlApp.GetNamespace("MAPI") Set myFolder = myNamespace.GetDefaultFolder(olFolderInbox) myFolder.Display Set myItem = myFolder.Items(2) myItem.Display
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)