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
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