1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| Dim objOutlook As Outlook.Application
Dim objcontact As ContactItem
'Crée l'instance Outlook
Set objOutlook = New Outlook.Application
'Crée un élément pour les contacts
Set objcontact = objOutlook.CreateItem(olContactItem)
With objcontact
.LastName = Sheets("Liste").Cells(NuméroLigne, 7) 'Si le nom se trouve en colonne 7
.FirstName = Sheets("Liste").Cells(NuméroLigne, 8)
.BusinessAddressStreet = Sheets("Liste").Cells(NuméroLigne, 10)
.BusinessAddressPostalCode = Sheets("Liste").Cells(Num?roLigne, 13)
.BusinessAddressCity = Sheets("Liste").Cells(NuméroLigne, 14)
.BusinessTelephoneNumber = Sheets("Liste").Cells(NuméroLigne, 16)
.Save
End With |
Partager