Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.
Dim objOutlook As Object 'Outlook.Application Dim OutlookNameSpace As Object dim MailboxFolderNumber as Integer On Error GoTo Err_ImportEmails_Click Set objOutlook = GetObject(, "Outlook.application") Set OutlookNameSpace = objOutlook.GetNamespace("MAPI") MailboxFolderNumber = 3 FindMailboxFolder: Set Inbox = OutlookNameSpace.Folders(MailboxFolderNumber).Folders("Inbox").Folders("New Entries") . . . Exit_ImportEmails_Click: Set objOutlook = Nothing Set OutlookNameSpace = Nothing Exit Sub Err_ImportEmails_Click: If Err.Number = -2147221233 Then MailboxFolderNumber = MailboxFolderNumber + 1 GoTo FindMailboxFolder Else MsgBox Err.Number & vbCrLf & Err.Description, , "ImportEmails_Click" End If Resume Exit_ImportEmails_Click
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.