Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Jun 2001
    Location
    Perth, Western Australia, Australia
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Importing Contacts from Excel (2003)

    I have been doing this for a while now and it works really, especially when I figured out the mapping and other tricks. i now am able to import all new contacts from an Excel spreadsheet with very little trouble. The issue I have is that my new Contacts always come through with the 'File as:' name in the format Last,First even though my default setting for new contacts is First,Last.
    This means I have to go through and adjust each new Contact. Is there a way I can fix this? I've tried lots of mapping variations but so far no luck

  2. #2
    New Lounger
    Join Date
    Jun 2001
    Location
    Perth, Western Australia, Australia
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Importing Contacts from Excel (2003)

    Thanks for your help JohnBF. The macro worked fine, although I had to remove the second option of
    .FileAs = .FirstName; .MiddleName; .LastName; .Suffix
    as this returned a syntax error. I guess this was because i don't use Middle names or Suffixes in my Contacts.
    Again, thanks a million - you've saved me many boring hours of editing.

  3. #3
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Importing Contacts from Excel (2003)

    Oops, that line of code needs correction, I'll fix it.
    -John ... I float in liquid gardens
    UTC -7ąDS

  4. #4
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Importing Contacts from Excel (2003)

    If you don't find a mapping solution, this macro should work, BUT please test it on a subset of your data first. As written, it works only on the selected Contacts in any Contact View Window, but it's easy enough to select the first and shift-click the last to select all:

    Sub ContactFileasFirstLast()
    Dim itm As Object
    Dim lngC As Long

    If TypeName(Application.ActiveWindow) = "Explorer" Then
    For lngC = 1 To ActiveExplorer.Selection.Count
    On Error Resume Next
    Set itm = ActiveExplorer.Selection(lngC)
    If Not itm Is Nothing Then
    With itm
    If .Class = olContact Then ' skip Distribution Lists
    ' if this doesn't work
    .FileAs = .FullName
    ' use this
    ' .FileAs = .FirstName & " " & .MiddleName & " " & .LastName & " " & .Suffix
    .Save
    End If
    End With
    End If
    Next lngC
    End If
    Set itm = Nothing
    End Sub
    -John ... I float in liquid gardens
    UTC -7ąDS

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •