在Outlook的联系人文件夹下能否创建同名联系人?

答案是肯定的:可以创建同名甚至是同名同Email地址的联系人。

我在联系人文件夹下创建的一个Test文件夹用来存放测试所创建的联系人。大家有兴趣可以试试。

Sub AddNewContact()
    Dim objNameSapce As Outlook.NameSpace
    Dim objMAPIFolder1 As Outlook.MAPIFolder
    Dim objMAPIFolder2 As Outlook.MAPIFolder
    Dim objNewContact As Outlook.ContactItem
    
    Set objNameSapce = Application.Session
    Set objMAPIFolder1 = objNameSapce.GetDefaultFolder(olFolderContacts)
    Set objMAPIFolder2 = objMAPIFolder1.Folders("test")
    Set objNewContact = objMAPIFolder2.Items.Add()
    
    objNewContact.Email1Address = "******@microsoft.com"
    objNewContact.FullName = "A***en"
    objNewContact.Save
    
    Set objNewContact = Nothing
    Set objMAPIFolder2 = Nothing
    Set objMAPIFolder1 = Nothing
    Set objNameSapce = Nothing
    
End Sub


你可能感兴趣的:(文件夹)