I want to check if an Outlook folder exists, if it doesn't then create it & if it does then carry on with other code. I can create the folder as a sub folder of the Inbox but once it is created I get an error because it is still looking to create when it's already created.
I have tried to capture the error but still no joy.
Can anyone help?
Dim objOutlook = New Outlook.Application Dim objNS As Outlook.NameSpace = objOutlook.GetNamespace("MAPI") Dim objEmail As Outlook.MailItem Dim objFolder As Outlook.MAPIFolder Dim objNewFolder As Outlook.MAPIFolder If objNewFolder Is Nothing Then objFolder = objNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox) objNewFolder = objFolder.Folders.Add("Service Reports", Outlook.OlDefaultFolders.olFolderInbox) End If