CodePlexProject Hosting for Open Source Software
Home Outlook_ExampleOverview Outlook_Example01
/* list inbox folder in Outlook taken from Example01.csproj */ private void Example01Main() { // start outlook Outlook.Application outlookApplication = new Outlook.Application(); // Get inbox Outlook._NameSpace outlookNS = outlookApplication.GetNamespace("MAPI"); Outlook.MAPIFolder inboxFolder = _ outlookNS.GetDefaultFolder(OlDefaultFolders.olFolderInbox); // setup gui listView1.Items.Clear(); labelItemsCount.Text = string.Format("You have {0} e-mails.", inboxFolder.Items.Count); // we fetch the inbox folder items. foreach (COMObject item in inboxFolder.Items) { // not every item in the inbox is a mail item Outlook.MailItem mailItem = item as Outlook.MailItem; if (null != mailItem) { ListViewItem newItem = listViewInboxFolder.Items.Add(mailItem.SenderName); newItem.SubItems.Add(mailItem.Subject); } } // close outlook and dispose outlookApplication.Quit(); outlookApplication.Dispose(); }
Last edited Jun 13, 2012 at 9:17 AM by SebastianDotNet, version 6
Very nice framework. But there should be much more support for the deployment of Add-Ins (for example a wizzard). The described way ... (more)
This toolkit is absolutely brilliant. I converted a considerable amount of VBA code to automate interactions between MS-Project and ... (more)
Sign in to join this project.
Excel-DNA