S
Shelby
Hi,
how do I add a ContactItem to a specific AddressList?
I have populate a ListBox with user's Address Book.
User will select the specific Address Book and an AddressEntry will be added
into that AddressList.
So do I add the entry like this:
AddressList = oNs.AddressLists.Item(UserSelectedIndex)
myentry = AddressList.AddressEntries.Add("SMTP", "testtest",
"(e-mail address removed)")
myentry.Update()
(If I add it this way, I do not have access to other properties such as
CompanyName, Birthday etc etc)
Or like this:
sCtact = oApp.CreateItem(Outlook.OlItemType.olContactItem)
sCtact.FullName = "Test 123"
sCtact.CompanyName = "His Company Name"
sCtact.Birthday= "His birthday"
sCtact.Email1Address = (e-mail address removed)
sCtact.Close(Outlook.OlInspectorClose.olSave)
(If I add it this way, it will not be added to user's specified address
book)
Thanks.
how do I add a ContactItem to a specific AddressList?
I have populate a ListBox with user's Address Book.
User will select the specific Address Book and an AddressEntry will be added
into that AddressList.
So do I add the entry like this:
AddressList = oNs.AddressLists.Item(UserSelectedIndex)
myentry = AddressList.AddressEntries.Add("SMTP", "testtest",
"(e-mail address removed)")
myentry.Update()
(If I add it this way, I do not have access to other properties such as
CompanyName, Birthday etc etc)
Or like this:
sCtact = oApp.CreateItem(Outlook.OlItemType.olContactItem)
sCtact.FullName = "Test 123"
sCtact.CompanyName = "His Company Name"
sCtact.Birthday= "His birthday"
sCtact.Email1Address = (e-mail address removed)
sCtact.Close(Outlook.OlInspectorClose.olSave)
(If I add it this way, it will not be added to user's specified address
book)
Thanks.