It is easy to find the contacts having or not having email address. But, it is a bit knotty to find the contacts having the certain number of email addresses, like more than one email address. So, this article will introduce you an effective way to get it.
Outlook permits users to enter 3 email addresses for one contact. Hence, maybe you’ve filled in more than one email address to your contacts. At times, you may want to find the contacts that have the specific number of email addresses, which is not as easy as finding contacts with or without email address. Therefore, in the followings, we will teach you a way to get it with ease.
Find All Contacts Having More than One Email Address
- In the first place, launch Outlook application.
- Then, press “Alt + F11” to access Outlook VBA editor according to “How to Run VBA Code in Your Outlook“.
- Next, copy and paste the following code into a module or project.
Sub CountContactEmailAddresses() Dim objContactsFolder As Outlook.Folder Dim i As Long Dim objContact As Outlook.ContactItem Dim lEmailAddressCount As Long 'Get the Contacts folder Set objContactsFolder = Session.GetDefaultFolder(olFolderContacts) 'Process All Contact Items For i = objContactsFolder.Items.Count To 1 Step -1 If TypeOf objContactsFolder.Items(i) Is ContactItem Then Set objContact = objContactsFolder.Items(i) 'Get the count of contact's email address lEmailAddressCount = 0 If objContact.Email1Address <> "" Then lEmailAddressCount = lEmailAddressCount + 1 If objContact.Email2Address <> "" Then lEmailAddressCount = lEmailAddressCount + 1 If objContact.Email3Address <> "" Then lEmailAddressCount = lEmailAddressCount + 1 End If End If End If 'Input the count to User Field 1 objContact.User1 = lEmailAddressCount objContact.Save End If Next End Sub
- Subsequently, press “F5” to run this macro now.
- After macro finishes, you can start searching.
- Firstly, open the default contact folder.
- Then, turn to “View” tab and click “View Settings” button.
- In the popup dialog box, click “Group By” button.
- Next, in the new “Group By” dialog box, select “All Contacts fields” from the list of “Select available fields from”.
- After that, select “User Field 1” in “Group items by”.
- Later, click a series of “OK” until all dialog boxes are closed.
- Eventually, you can see the contact list. The contacts in the “User Field 1: 2” and “User Field 1: 3” groups are those who have more than one email address, as shown in the following figure.
Deal with Nettlesome Outlook Troubles
Outlook PST file is as vulnerable as common files like Word document or Excel workbooks. Therefore, you would encounter various Outlook issues. Generally, to fix small issues, you can use the inbox repair tool. But, when you need to repair PST file, you have to use a more potent external tool, such as DataNumen Outlook Repair.
Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including fix SQL Server and outlook repair software products. For more information visit www.datanumen.com