After you have each "insert merge field" placed in their own cell in row 1, use the "next record" field in row 2, column one. "Insert merge field" items placing each item in their separate column in the table created.ħ. Select the "dummy" Excel mail merge document to use the column headers.Ħ. You want your table to consume the entire page (not just a few lines)ĥ. Insert a table with the same number of columns you need to export from Outlook. In Word, create a mail merge document using the "normal word document" mail merge optionĤ. Save the "dummy" Excel mail merge document.ģ. I did not include any data in the columns under the headers.Ģ. I wanted to use 6 columns from the Outlook contacts and named 6 columns in Excel exactly how they are labeled in Outlook. I created a "dummy" mail merge source document in Excel. My level of permissions on the shared contacts is "publishing editor"ġ. Even though it's a lengthy process, you can save your Word main merge document and use it in the future for exporting shared contacts without recreating the entire process. It's a little bit of a process,īut I was able to accomplish it. Below are the steps I followed to accomplish the process. I know I'm pretty late with responding to this, but wanted to post how I did it if someone else is searching for a way to export shared contacts to Excel. Set oLo = (xlSrcRange, Cells(1, 1).CurrentRegion,, xlYes)
If > 0 Then ActiveSheet.ListObjects(1).DeleteĪrray("Name", "Company", "Address", "City", "State", "Zip", "Phone", "Email") Set olFolder = olA.GetNamespace("MAPI").GetSharedDefaultFolder(olRecipient, olFolderContacts) Set olRecipient = olNS.CreateRecipient(sAccountName) GetContacts("Craig Hatmaker") Sub GetContacts(sAccountName As String)ĭim olNS As Namespace '(v=office.12).aspxĭim olRecipient As Recipient '(v=office.12).aspxĭim olFolder As MAPIFolder '(v=office.12).aspx
The following example, when run from the VBE's immediate window in Excel will retrieve all contacts from the account
EXPORT OFFICE 365 CONTACTS TO EXCEL CODE
For those okay with VBA, this code pulls contacts from an Outlook shared folder (or the personal folder) into an Excel Table.