Any way to overwrite (not merge) Outlook contacts when importing from a file

contactsexportimportmicrosoft-officeoutlook-2010

I'm trying to create a contact list for Outlook 2010 that will contain contact information for every person in my company. I intend on keeping the list current, which means I will be manually adding new employees to the contact list, and removing contacts who no longer work here.

The contact list will reside in its own subfolder within the Outlook Contacts folder.

I want to periodically export this contact list as a .csv file, and allow the other employees in the company to import it into Outlook on their own computer, thus providing them with a comprehensive and up-to-date company contact list.

The problem is, Outlook 2010 only wants to merge contact lists, not overwrite them. This means that any contacts who are no longer with the company will not be removed from the contact lists on employee stations.

Is there any way to force Outlook 2010 to overwrite the contact list?

Oh how I long for the days of Outlook 2003 and its tidy .pab files.

Best Answer

This really isn't the right way to do this. What you want is to get your contacts from an LDAP server -- either Exchange or another one you set up. (the linked article is for Outlook 2007, but similar info is available for 2010).

This ensures everyone has up-to-date contacts all the time (as long as they can talk to the LDAP server) and that changes get received by everyone in a timely fashion.


If for some reason you can't use LDAP (why?) you can write a PowerShell script that deletes all the contacts and then imports the new list.
Something like this should work for the delete bit:

olSession = (New-Object -ComObject Outlook.Application).Session
$olSession.Logon('Outlook') #Outlook is the profile name
$myContacts = $olSession.GetDefaultFolder($contactsFolder).Items

foreach ($Contact in $myContacts) {
    $Contact.Delete()
}

and the import could be scripted right after it (or done however you do them now).

Disclaimer: I'm a unix guy and I know dick-all about PowerShell - This was modified from a script I found [here](http://www.powershellneedfulthings.com/?p=35), and is entirely untested.

Related Topic