# Import/Export contact list in Outlook



## galland1928 (May 10, 2007)

Our sales department currently has to manage two contact lists, one in Excel and one in Outlook. When dealing with thousands of customers, you can see how this can get very time consuming so I'm trying to figure out a way to automate this process somewhat. 

The difficulty of this arises because they have unique requirements for column headers so importing is time consuming, and matching data is very time consuming.

My question is, is there a way to export from Outlook to Excel and automatically create the columns (and unique column names), and when needed, import into Outlook automatically putting the data in the right fields.

We use Outlook 2003 in a Exchange server 2003 environment. 

If anyone has any other idea's let me know.


----------



## Zack Barresse (Jul 25, 2004)

Hi there, welcome to the board!

Do you not want to import duplicates then? If that is ok with you, just do an import from your Excel file. The difficult part is mapping the fields. That of course depends on how you have your Excel file structured. If it is from an original Outlook export then you are sitting pretty. I wonder why though. Why keep up with two lists? If you have your Excel file with the structure you need you can update it and periodically import and choose not to overwrite duplicates. In any case, I'm not really sure what you need help with.


----------



## Rollin_Again (Sep 4, 2003)

Can you post a sample workbook showing the column headers and what contact fields each column corresponds to. What you want to do can be done through a macro but as Zack has already mentioned you can easily import the data without the need for code once you map the fields names. 

Regards,
Rollin


----------



## galland1928 (May 10, 2007)

Hey firefytr, thanks.

Nope, we don't want duplicates.

Well I think it's the historic, why does sales/marketing always go against the grain it seems. They have always historically managed an excel list because it is easy for them to manage the contacts whether it be current customers, leads, etc; and also because there are several fields that they've added (such as Cust #, sales #'s, region code, and about 10 other unique names) that don't match with what Outlook natively has in it.

The problem is when they want to send an email out to all customers that meet a certain criteria, it's difficult to do without those contacts already being in Outlook so that is why we need to import it. Another problem is mapping fields, while I think it is easy, many of our reps would have no clue what to do, and we would have the occasional person who mapped the wrong fields.

The ideal solution would be if we could use a macro in Excel to import contacts into Outlook when needed, and use a macro in Outlook to export contacts to Excel when needed and automatically mapping the fields in the process. I'm not sure if I'm explaining this right so...


----------



## Rollin_Again (Sep 4, 2003)

I'll work on a macro for you if you can provide me a sample Excel file showing the column headers and which Outlook fields they represent.

Regards,
Rollin


----------



## galland1928 (May 10, 2007)

Hey Rollin, here is the field map. Let's see if I attached it right.


----------



## Rollin_Again (Sep 4, 2003)

Galland,

I need to know which columns each of the yellow fields is associated with. Is it possible to email me the actual spreadsheet the sales dept uses. You can remove the actual data and include only a blank worksheet with the column headers.

Regards,
Rollin


----------



## galland1928 (May 10, 2007)

Hey Rollin,
In that spreadsheet, the yellow fields correspond with the blue fields above them. So if you look at the spreadsheet, Cust. No. corresponds with Suffix and lead source corresponds with Company.

The yellow fields represent the fields and order of the sales reps contact list and the blue fields represent the fields from Outlook.


----------



## Rollin_Again (Sep 4, 2003)

I understand what you are saying but I need to know exactly how each contact record is stored in the spreadsheet. Does each individual contact record span the entire row? Will the First Names all be listed in column A, Last Names listed in Column B, etc.

Regards,
Rollin


----------



## galland1928 (May 10, 2007)

Sorry, does this help?


----------



## Rollin_Again (Sep 4, 2003)

That's what I need. Will work on it a little later if I can still see straight 

Rollin


----------



## galland1928 (May 10, 2007)

Hey Rollin,
Were you able to get a chance to write something for this?


----------



## Rollin_Again (Sep 4, 2003)

I've got some code written but am unable to resolve the following:


Address2 --> You've indicated that this should map to BusinessStreet2 but I don't see an Outlook field called BusinessStreet2

Ortho Acct --> You have not indicated in the Excel file which Outlook field this should map to.

Lead Source --> You have indicated this should map to "Company" in Outlook, however the closest match is "Companies" or "Company Name" 

Regards,
Rollin


----------



## galland1928 (May 10, 2007)

Hey Rollin,

Sorry about that. Will this work?

Address --> Business Address
Address 2 --> Business Address Street

Ortho Acc --> Children

Lead Source --> Company Name


----------



## Rollin_Again (Sep 4, 2003)

Galland,

I've written some code that will export contacts directly from the Excel file to Outlook. The only problem with the code is that it will create duplicate contacts. There are two options for dealing with this.

The first options is to delete the existing contacts folder in Outlook before processing the Excel file. The result will be a new Contact's folder containing only the new records from the Excel file.

The second option would be to loop through each existing record in the Outlook contacts folder and check it against the new record to be added from the Excel file. The problem with this is that the code will be extremely slow and you must develope the logic to determine if the records are duplicates. 

You may be better off allowing duplicate records and then using a third party program to remove duplicate automatically.

Regards,
Rollin


----------



## Ze Marduk (Jan 25, 2008)

heeey Rollin_Again i'm new in this forum and i found it very useful and i've a problem to solve....

well i've a xls or scv file ( the format doesnt matter )
and i've to import that file to the outlook contacts, i've tried the code that you have posted already, but there shows an error "there was a problem opening the file", i put the path to the file, in my case "c:\bd.scv" and i dont know what to do, im a noob vb coding so i need or your help pleaseee, lets say that i just have 2 columns i.e. name, phone, if can help me with that i'll be very thankful with uuuuuu


----------



## Rollin_Again (Sep 4, 2003)

You shouldn't need any code to import the contacts. You should be able to simply click *FILE --> IMPORT/EXPORT * and then select the option *IMPORT FROM ANOTHER FILE OR PROGRAM* and then point to the Excel or CSV file. Outlook will ask you to map the field names before importing the info.

Regards,
Rollin


----------



## natertots (Jul 16, 2008)

Rollin_Again said:


> I've written some code that will export contacts directly from the Excel file to Outlook. The only problem with the code is that it will create duplicate contacts.


I would LOVE to get ahold of this code if you still have it!!
Thanks!


----------



## Rollin_Again (Sep 4, 2003)

natertots said:


> I would LOVE to get ahold of this code if you still have it!!
> Thanks!


Can you post your sample excel workbook? You can just replace any sensitive info with dummy data since I only need to see the data layout. I can't find the code I wrote previously but I can write it again 

Regards,
Rollin


----------

