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:

Office Tab - Enable Tabbed Editing and Browsing in Office, and Make Work Much Easier...
Kutools for Outlook - Brings 100 Powerful Advanced Features to Microsoft Outlook
  • Auto CC/BCC by rules when sending email; Auto Forward Multiple Emails by rules; 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 at once; Auto Add Greeting when reply; Auto Add Date&Time into subject...
  • Attachment Tools: Auto Detach, Compress All, Rename All, Auto Save All... Quick Report, Count Selected Mails, Remove Duplicate Mails and Contacts...
  • More than 100 advanced features will solve most of your problems in Outlook 2010-2019 and 365. Full features 60-day free trial.

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


Kutools for Outlook - Brings 100 Advanced Features to Outlook, and Make Work Much Easier!

  • 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.
shot kutools outlook kutools tab 1180x121
shot kutools outlook kutools plus tab 1180x121
 
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 · 10 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