Set objModule = (olModuleContacts)įor i = 1 To Here's the code: Sub NavigationFolderFind()
I used the following code and it works beautifully! From niton's comment I found the last option in the following link most helpful. (Note - I know this code doesn't get the data into a CSV - just the Macro Enabled book. Is there a way to specify the shared folder and get data from it? Set row = ThisWorkbook.Worksheets("ExportedContacts").Range("a2:G2")įor Each olItem In olItems 'This Line throws an automation error Set olFolder = olNS.GetSharedDefaultFolder(olRecipient, olFolderContacts) Set olRecipient = olNS.CreateRecipient("Matt Prater") I've tried using the NameSpace.GetSharedDefaultFolder("Matt Prater", olFolderContacts) method in the code below, but the folder is not the default contact folder for Matt. We are using Office 365 - not the web app. Note - all users are Microsoft Exchange users with exchange accounts. As documented everywhere, you can't easily export from such a folder with the Outlook Export wizard. It shows up in our outlook on the contacts pane under Shared Contacts in the format Sharing Username - Folder Name (example Matt Prater - Matt's File). One user created it and shared it with other users. The contact folder is not a default contact folder for any user. I'm trying to create a Macro Enabled Workbook to make it automated. In our company we have a shared Outlook contact folder that we need to regularly export to a csv file.