Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
populating list box with contacts
I am trying to populate a list box in excel with the FirstName object of my
outlook2000 contacts; then when the user selects a FirstName, I retrieve items like email address for the contact they selected and store to a cell in the sheet. I feel like Edison working on the light bulb. Any help would be greatly appriciated. Thanks, George |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
populating list box with contacts
"GeorgeFD29" wrote: I am trying to populate a list box in excel with the FirstName object of my outlook2000 contacts; then when the user selects a FirstName, I retrieve items like email address for the contact they selected and store to a cell in the sheet. I feel like Edison working on the light bulb. Any help would be greatly appriciated. Thanks, George I have the following code working - talking to outlook. However, whenever I try to return the email address of the contact, I get 'object doesn't support this property or method' thanks for any help. Dim OLF As Outlook.MAPIFolder Dim olContactItem As Outlook.ContactItem Dim ToContact As Recipient Set OLF = GetObject("", "Outlook.Application").GetNamespace("MAPI").GetDef aultFolder(olFolderContacts) Set itms = OLF.Items If itms.Count = 0 Then MsgBox "No contacts to add to drop-down list" Exit Sub End If For i = 1 To itms.Count Set itm = itms(i) strContactName = itm.LastName & ", " & itm.FirstName & " " & itm.MiddleName strEmail = itm.email Next |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I export contacts from Excel back to Outlook Contacts? | Excel Discussion (Misc queries) | |||
Exporting Contacts list to Excel | Excel Discussion (Misc queries) | |||
.AddItem list and populating combobox with created list | Excel Discussion (Misc queries) | |||
Moving contacts from one list to another | Excel Discussion (Misc queries) | |||
Populating dropdown list 2 with data depending upon what was selected in list 1 | Excel Programming |