Link to home
Start Free TrialLog in
Avatar of davidascott
davidascott

asked on

Importing contacts information from Excel to Outlook

I would like to import some data from Excel 2003 (XP OS) into Outlook 2003.  I would like to import that data and automatically add them to my 'contacts' with the 'catagory' 'galleries' assigned to them.  I would also like to be able to vary the 'catagory name' if I run the same routine in the future.

The following column Headings can be found on the first row (row A) from left to right;

1. Gallery Name (col A)
2. Contact Name (col B)
3. Address 1 (col C)
4. Address 2 (col D)
5. Town (col E)
6. City (col F)
7. County (col G)
8. Post Code (col H)
9. Telephone (col I)
10. Mobile (col J)
11. Website (col K)
12. Email address (col L)
13. Specialism & Style (col M).....this should go in the 'notes' area in the contact file for each person/gallery

The spreadsheet can be viewed/downloaded from;

http://www.davidascott.com/LondonOnly.xls

Hope someone can help??
Thanks,
David

Avatar of David Lee
David Lee
Flag of United States of America image

Hello again, David.

You're either up late or awake early.  This seems pretty easy.  I'll get the code up shortly, unless someone else beats me to it.

Cheers!
Avatar of davidascott
davidascott

ASKER

Hi David,

I knew you would be burning midnight oil......I'm afraid it's up early this morning/evening.....look foward to hearing from you.

Best,
David
ASKER CERTIFIED SOLUTION
Avatar of David Lee
David Lee
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
David,

That's great....except for one small detail....the macro only picks up the 'city' and 'post code' in the 'address' box.  Could you tweak the code for me?

Thanks,
David

PS that has saved me at least two days worth of form entering....and not to mention the cost of my time...I was going to have to input at least five of these types of list!!
Good evening, David.

I'll be glad to tweak the code.  Where else do you want the 'city' and 'postal code' to go?

Thanks for sharing how this macro helped you out!  

-- David
Hi David,

City and post code are put in exactly the right place....in the address box....the only tweak needed is to also add the 'address' (lines 1 and 2) plus 'town' and 'county' information to this box as well, taken from the LondonOnly.xls file.

Hope this clarifies?

Best,
David
Oops.  Now, I see what you're talking about.  Replace this line of code

    .BusinessAddress = excSheet.Cells(intRow, 3) & vbCrLf & excSheet.Cells(intRow, 4)

with this line of code

    .BusinessAddressStreet = excSheet.Cells(intRow, 3) & vbCrLf & excSheet.Cells(intRow, 4)
David,

Almost there.....the 'town' is now being added but we still need to enter 'address 1' and 'address 2' details into the address box as well.

Thanks for your help.
David
Hmmm.  I'm a little stumped.  When I look at the import on my system those fields are filled in.  Here's a link to a screen capture of what I see for one record: http://www.mindspring.com/~d_lee/DAS.jpg

I picked a record where both Address1 and Address2 are filled in.
Hi David,

The macor didn't like the fact that when you provided the tweak for me, I just simply 're-ran' the macro.  I then decided to give the catagory a new name....works fine.

Thanks very much,
David
You're welcome, David.  
David,
This Macro is almost perfect for me and I would be glad if you could help me changing just one thing.


I would like to use a custom  contact form with some more fields. Could you please point out where the changes could be made on this macro.
Ex: Fields Past work, Education, native language, etc., in a custom contact form named Application

 
Hi, linktranslation.

For each of your custom properties you'll need a line like this

        .UserProperties.Item("Past work").Value = excSheet.Cells(intRow,x)

Where the name of the user property, "Past work" in this example, matches the name of your property.  You can insert these lines anywhere between the

    With olkContact

    End With