Edit Contact using EntryID

Q

Question Boy

Hello,

I have the entryid for a contact item and am trying to find out how I can
use the Entryid to retrieve the contact item to update data and save it.
Below is an bit of my code to create a contact

Set olCon = olApp.CreateItem(olContactItem)
If IsMissing(olContactEntryID) Then
'Create a new Contact Item
With olCon
'Build Contact Item Information
'******************************
.CompanyName = sCompanyName
.FirstName = sFirstName
.LastName = sLastName
.BusinessAddressStreet = sBusinessAddressStreet
.BusinessAddressCity = sBusinessAddressCity
.BusinessAddressState = sBusinessAddressState
.BusinessAddressCountry = sBusinessAddressCountry
.BusinessAddressPostalCode = sBusinessAddressPostalCode
.BusinessTelephoneNumber = sBusinessTelephoneNumber
.BusinessFaxNumber = sBusinessFaxNumber
.WebPage = sWebPage
.Email1Address = sEmail1Address
.Save 'Actually save the new
created Contact
End With
Else
'Update an existing Contact Item

End If

Could someone help me get started with the Else part where I have supplied a
valid EntryID to update.

Thank you,

QB
 
K

Ken Slovak - [MVP - Outlook]

If you have the EntryID then you can use NameSpace.GetItemFromID() to get a
reference to the item.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top