![从 Outlook 中的联系人组中删除联系人](https://linux22.com/image/1528425/%E4%BB%8E%20Outlook%20%E4%B8%AD%E7%9A%84%E8%81%94%E7%B3%BB%E4%BA%BA%E7%BB%84%E4%B8%AD%E5%88%A0%E9%99%A4%E8%81%94%E7%B3%BB%E4%BA%BA.png)
最近有一位同事从我们公司辞职了,我需要将她从
所有联络小组在我的 Outlook 中。
任何建议都将不胜感激!
有没有简单的方法可以做到这一点?
答案1
从所有组中删除一个联系人需要 VBA 宏。
此类宏在文章中有详细说明 如何通过 Outlook VBA 从所有联系人组快速删除特定联系人。
本文详细介绍了如何通过“开发人员”选项卡/Visual Basic 安装这样的宏,以及如何稍后通过工具栏中的“运行”图标运行该宏。
如果该文章后来消失,VBA 宏详细说明如下:
Sub RemoveSpecificContactfromAllGroups()
Dim strSpecificContact As String
Dim objTempMail As Outlook.MailItem
Dim objRecipient As Outlook.recipient
Dim objContactsFolder As Outlook.Folder
Dim objItem As Object
Dim objContactGroup As Outlook.DistListItem
Dim objContact As Outlook.ContactItem
Dim nprompt As Integer
strSpecificContact = InputBox("Input the fullname or email address of the specific contact to be removed from all contact groups:")
Set objTempMail = Outlook.Application.CreateItem(olMailItem)
Set objRecipient = objTempMail.Recipients.Add(strSpecificContact)
objRecipient.Resolve
If objRecipient.Resolved = True Then
Set objContactsFolder = Outlook.Application.Session.GetDefaultFolder(olFolderContacts)
For Each objItem In objContactsFolder.Items
If TypeOf objItem Is DistListItem Then
Set objContactGroup = objItem
With objContactGroup
.RemoveMember objRecipient
.Body = "Contact Removed: " & strSpecificContact & vbTab & "(" & Now & ")" & .Body
.Save
End With
End If
Next
nprompt = MsgBox("Removing Completes!", vbExclamation, "Remove Contact from Group")
Else
nprompt = MsgBox("This contact cannot be resolved!", vbExclamation, "Resolving Error")
End If
End Sub