Hello.
Sub LectureContacts()
Set olApp = CreateObject("Outlook.Application")
Set olns = olApp.GetNamespace("MAPI")
Set olfFolder = olns.GetDefaultFolder(10)
ligne = 2
On Error Resume Next ' contacts incomplets
For Each i In olfFolder.Items
Cells(ligne, 1) = i.FirstName
Cells(ligne, 2) = i.LastName
Cells(ligne, 3) = i.Email1Address
Cells(ligne, 4) = i.Categories
ligne = ligne + 1
Next i
On Error GoTo 0
[A1].Sort Key1:=[A1], Header:=xlYes
End Sub
http://boisgontierjacques.free.fr/fichiers/jb-outlook.zip
JB
http://boisgontierjacques.free.fr/
Thank You dlw: I exported contacts from outlook to excel and it worked fine
except in the address field, there are separation marks after the street
address, after the state, and after the zip code. When I did field mapping, I
used address only. Not seperate fields for street, state, and zip. I would
prefer that the complete address be in the same field, but why are those
marks there, and is it possible to ge rid of them? Thank you much
--
Bob Levin
- Afficher le texte des messages pricidents -