Edit Contact using EntryID

  • Thread starter Thread starter Question Boy
  • Start date Start date
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
 
If you have the EntryID then you can use NameSpace.GetItemFromID() to get a
reference to the item.
 
Back
Top