Problem in changing ContactItem.Email1DisplayName

  • Thread starter Yuan Nan via OfficeKB.com
  • Start date
Y

Yuan Nan via OfficeKB.com

Hi All,
I want to change ContactItem.Email1DisplayName value, but the program
does not function. No matter how I set this field in my code, the
Email1DisplayName is always set to "Name (Mail Address)" like "yuan nan
([email protected])".
My code writed like this:

Set objApp = Application
Set objNS = GetNamespace("MAPI")
Set objFolder = objNS.GetDefaultFolder(olFolderContacts)
Set objContactItem = objFolder.Items.Add(2)
objContactItem.Email1DisplayName = "yuan nan"
objContactItem.Email1Address = "(e-mail address removed)"
objContactItem.Save
 
S

Sue Mosher [MVP-Outlook]

Did you try changing the address, then the display name, in other words,
reversing the order? Outlook version?
 
Y

Yuan Nan via OfficeKB.com

I have tried reversing the order, but it still doesn't function.
I use Outlook 2003.
 

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