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:
- Automate emailing with Auto CC/BCC, Auto Forward by rules; send Auto Reply (Out of Office) without requiring an exchange server...
- Get reminders like BCC Warning when replying to all while you're in the BCC list, and Remind When Missing Attachments for forgotten attachments...
- Improve email efficiency with Reply (All) With Attachments, Auto Add Greeting or Date & Time into Signature or Subject, Reply Multiple Emails...
- Streamline emailing with Recall Emails, Attachment Tools (Compress All, Auto Save All...), Remove Duplicates, and Quick Report...
Remove 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:
Remove 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:
Related Articles
Best Office Productivity Tools
Kutools for Outlook - Over 100 Powerful Features to Supercharge Your Outlook
π€ AI Mail Assistant: Instant pro emails with AI magic--one-click to genius replies, perfect tone, multilingual mastery. Transform emailing effortlessly! ...
π§ Email Automation: Out of Office (Available for POP and IMAP) / Schedule Send Emails / Auto CC/BCC by Rules When Sending Email / Auto Forward (Advanced Rules) / Auto Add Greeting / Automatically Split Multi-Recipient Emails into Individual Messages ...
π¨ Email Management: Easily Recall Emails / Block Scam Emails by Subjects and Others / Delete Duplicate Emails / Advanced Search / Consolidate Folders ...
π Attachments Pro: Batch Save / Batch Detach / Batch Compress / Auto Save / Auto Detach / Auto Compress ...
π Interface Magic: πMore Pretty and Cool Emojis / Boost Your Outlook Productivity with Tabbed Views / Minimize Outlook Instead of Closing ...
π One-click Wonders: Reply All with Incoming Attachments / Anti-Phishing Emails / πShow Sender's Time Zone ...
π©πΌβπ€βπ©π» Contacts & Calendar: Batch Add Contacts From Selected Emails / Split a Contact Group to Individual Groups / Remove Birthday Reminders ...
Over 100 Features Await Your Exploration! Click Here to Discover More.