CodePlexProject Hosting for Open Source Software
Home Outlook_ExampleOverview Outlook_Example01_VB
' list inbox folder in outlook ' taken from Example01.vb ' Private Sub Example01Main() ' start outlook Dim outlookApplication = New Outlook.Application() ' get inbox Dim outlookNS As Outlook._NameSpace = outlookApplication.GetNamespace("MAPI") Dim inboxFolder As Outlook.MAPIFolder = _ 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 Dim items As Outlook._Items = inboxFolder.Items Dim item As COMObject = Nothing For Each item As COMObject In inboxFolder.Items ' not every item in the inbox folder is a mail item If (TypeName(item) = "MailItem") Then Dim mailItem As Outlook.MailItem = item Dim newItem As ListViewItem = listViewInboxFolder.Items.Add(mailItem.SenderName) newItem.SubItems.Add(mailItem.Subject) End If Next 'close outlook and dispose outlookApplication.Quit() outlookApplication.Dispose() End Sub
Last edited Jun 13, 2012 at 10:36 AM by SebastianDotNet, version 8
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