Dim app As Outlook.Application Dim ns As Outlook.NameSpace Dim siFolder As Outlook.Folder = Nothing app = New Outlook.Application() app = CreateObject("Outlook.Application") ns = app.GetNamespace("MAPI") Dim olFolders As Outlook.Folders = ns.Folders If CType(sender, Button).Tag.ToString = "Inbox" Then siFolder = CType(ns.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox), Outlook.Folder) Else siFolder = CType(ns.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox).Parent.folders("Sub Folder Name"), Outlook.Folder) End If System.Diagnostics.Process.Start("outlook")
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)