How to remove country code from phone numbers of contacts in Outlook?
In the Contact window, when you click the Business/Home/Fax/Mobile field button before the phone numbers to active the Check Phone Number dialog box as below screenshot shown, the country code will be added before the phone numbers automatically. But, sometimes the country code may be not necessary at all, and you want to remove it from all phone numbers, how could you deal with it? Try below solutions:
If you just need to remove the country code from one phone number of a contact, you can manually delete it as follows:
1. In the People (or Contacts) view, click View > Change View > Phone. See screenshot:
2. Double click to open the contact whose phone number you will remove country number from.
3. In the opening Contact window, remove the plus sign and country code from the specified phone in the Phone Numbers section, and then click Contact > Save & Close.
So far, the country code has been removed from the specified phone number as below screenshot shown:
If you need to remove the country code from all phone numbers of all contacts in Outlook, I recommend a VBA to handle it easily.
1. In the People (or Contacts) view, open the contact folder where you will remove the country code from all contacts.
2. Press Alt + F11 keys simultaneously to open the Microsoft Visual Basic for Applications window.
3. Click Insert > Module, and then paste below VBA code into the new opening Module script.
VBA: Remove Country code from all phone numbers of all contacts
Sub FixPhoneFormat() Dim oFolder As MAPIFolder Set oFolder = Application.ActiveExplorer.CurrentFolder If Left(UCase(oFolder.DefaultMessageClass), 11) <> "IPM.CONTACT" Then MsgBox "You need to select a Contacts folder", vbExclamation Exit Sub End If Dim nCounter As Integer nCounter = 0 Dim oItem For Each oItem In oFolder.Items Dim oContact As ContactItem If TypeName(oItem) <> "DistListItem" Then Set oContact = oItem With oContact .AssistantTelephoneNumber = FixFormatUSPhone(.AssistantTelephoneNumber) .Business2TelephoneNumber = FixFormatUSPhone(.Business2TelephoneNumber) .BusinessFaxNumber = FixFormatUSPhone(.BusinessFaxNumber) .BusinessTelephoneNumber = FixFormatUSPhone(.BusinessTelephoneNumber) .CallbackTelephoneNumber = FixFormatUSPhone(.CallbackTelephoneNumber) .CarTelephoneNumber = FixFormatUSPhone(.CarTelephoneNumber) .CompanyMainTelephoneNumber = FixFormatUSPhone(.CompanyMainTelephoneNumber) .Home2TelephoneNumber = FixFormatUSPhone(.Home2TelephoneNumber) .HomeFaxNumber = FixFormatUSPhone(.HomeFaxNumber) .HomeTelephoneNumber = FixFormatUSPhone(.HomeTelephoneNumber) .ISDNNumber = FixFormatUSPhone(.ISDNNumber) .MobileTelephoneNumber = FixFormatUSPhone(.MobileTelephoneNumber) .OtherFaxNumber = FixFormatUSPhone(.OtherFaxNumber) .OtherTelephoneNumber = FixFormatUSPhone(.OtherTelephoneNumber) .PagerNumber = FixFormatUSPhone(.PagerNumber) .PrimaryTelephoneNumber = FixFormatUSPhone(.PrimaryTelephoneNumber) .RadioTelephoneNumber = FixFormatUSPhone(.RadioTelephoneNumber) .TelexNumber = FixFormatUSPhone(.TelexNumber) .TTYTDDTelephoneNumber = FixFormatUSPhone(.TTYTDDTelephoneNumber) .Save nCounter = nCounter + 1 End With End If Next MsgBox nCounter & " contacts processed.", vbInformation End Sub Private Function FixFormatUSPhone(Phone As String) As String Phone = Trim(Phone) FixFormatUSPhone = Phone If Phone = "" Then Exit Function Dim prefix As String prefix = Left(Phone, 1) ' Configured for US ' Enter the correct prefix here Do While (prefix = "+" Or prefix = "1") ' if the prefix is 2 digits, change to 4; ' if 3 digits, change to 5 Phone = Mid(Phone, 3) prefix = Left(Phone, 1) Loop ' After we clean up the country code, we remove non-numeric characters ' Can be tweaked to change formatting, ie: change 202.555.1212 to 202-555-1212 Phone = Replace(Phone, "(", "") Phone = Replace(Phone, ")", "") Phone = Replace(Phone, ".", "") Phone = Replace(Phone, " ", "") Phone = Replace(Phone, "-", "") FixFormatUSPhone = Phone End Function
4. Press F5 key or click the Run button to run this VBA.
5. And then a dialog box pops out and show you how many contacts have been processed, please click the OK button to close it.
Now, you will see the country code has been removed from all kinds of phone numbers from all contacts. See screenshot:
- Auto CC/BCC by rules when sending email; Auto Forward Multiple Emails by custom; Auto Reply without exchange server, and more automatic features...
- BCC Warning - show message when you try to reply all if your mail address is in the BCC list; Remind When Missing Attachments, and more remind features...
- Reply (All) With All Attachments in the mail conversation; Reply Many Emails in seconds; Auto Add Greeting when reply; Add Date into subject...
- Attachment Tools: Manage All Attachments in All Mails, Auto Detach, Compress All, Rename All, Save All... Quick Report, Count Selected Mails...
- Powerful Junk Emails by custom; Remove Duplicate Mails and Contacts... Enable you to do smarter, faster and better in Outlook.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
- To post as a guest, your comment is unpublished.· 11 days ago1500 contact outlook using exchange 365. guess it's just for the small personal stuff..
- To post as a guest, your comment is unpublished.· 1 years agothis works well, although i would like to understand how it works more as it puts brackets, where i dont really need then. I am in Australia.
My other issue is that somehow, somewhere, it is reverting back to all having the country code