Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

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:

Kutools for Outlook: 100+ New Advanced Tools for Outlook.
Office Tab: Enable Tabbed Editing and Browsing in Office, Just Like Chrome, Firefox, IE 8/9/10.
Classic Menu: Bring Old Menus and Toolbars Back to Office 2007, 2010, 2013, 2016 and 2019.

arrow blue right bubbleRemove country code from phone number of a contact

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:


arrow blue right bubbleRemove country code from phone numbers of contacts with VBA

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:


arrow blue right bubbleRelated Articles

 

Recommended Productivity Tools

shot kutools outlook kutools tab 1180x121
shot kutools outlook kutools plus tab 1180x121

Kutools for Outlook - More than 100 Advanced Functions for Outlook, Improve 70% Efficiency For you

  • Complicated and repeated operations can be done a one-time processing in seconds.
  • Forward multiple emails individually with one-click, and auto forward by rules.
  • Auto CC/BCC every sending email and easy for customizing rules, and auto reply without requiring exchange server.
  • Powerful junk emails filter, remove duplicate emails, reply with attachment, bunch of one-click operations, and so on...
  • 60-day unlimited free trial. 60-day money back guarantee. 2 years free upgrade and support. Buy once, use forever.
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Richard · 3 months ago
    this 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