• Outlook User
  • Exchange Admin
  • Office 365
  • Outlook Developer
  • Outlook.com
  • Outlook Mac
  • Outlook & iCloud
    • Common Problems
    • Outlook BCM
    • Utilities & Addins

Bulk Move Phone Numbers to a Different Phone Field

Slipstick Systems

› Outlook › People › Bulk Move Phone Numbers to a Different Phone Field

Last reviewed on August 29, 2018     25 Comments

Applies to: Outlook 2016 (Win), Outlook 2013, Outlook 2010, Outlook 2007

Willy shared this with us:

"I found your very interesting page on how to bulk edit "FileAS" info for Outlook contacts. I have a Palm Pre 2 and Microsoft Exchange sync. Due to a bug, phone numbers entered in "Other Phone" field in Outlook won't sync with the smartphone. I was seeking a way to mass edit my contacts to move "other phone" to "mobile phone" (when empty). I used your script and put the following lines in the part used for "FileAs":
If .OtherTelephoneNumber <> "" Then
If .MobileTelephoneNumber = "" Then
 .MobileTelephoneNumber = .OtherTelephoneNumber
 .OtherTelephoneNumber = ""
 .Save
 End If
 End If
It worked like a charm. From 160+ contacts with "OtherPhone", I ended up with less than 10 where Mobile phone was not empty and I needed to store the phone number in another category (home or business or Notes as text). Your code saved my day. Thanks"

VBA Sample

Press Alt+F11 to open the VBA editor then copy and paste into ThisOutlookSession then run. Note that it works on the contacts in the default contacts folder.

I tested this code in Outlook 2010. It should work just fine in Outlook 2003 and Outlook 2007. (May trigger the Email security prompts in Outlook 2003.)

Public Sub MovePhoneNumber()
    Dim objOL As Outlook.Application
    Dim objNS As Outlook.NameSpace
    Dim objContact As Outlook.ContactItem
    Dim objItems As Outlook.Items
    Dim objContactsFolder As Outlook.MAPIFolder
    Dim obj As Object

    On Error Resume Next

    Set objOL = CreateObject("Outlook.Application")
    Set objNS = objOL.GetNamespace("MAPI")
    Set objContactsFolder = objNS.GetDefaultFolder(olFolderContacts)
    Set objItems = objContactsFolder.Items

    For Each obj In objItems
        'Test for contact and not distribution list
        If obj.Class = olContact Then
            Set objContact = obj

     With objContact

          If .OtherTelephoneNumber <> "" Then
            If .MobileTelephoneNumber = "" Then
                .MobileTelephoneNumber = .OtherTelephoneNumber
                .OtherTelephoneNumber = ""
            .Save
            End If
        End If

     End With
        End If

     Err.Clear
    Next

    Set objOL = Nothing
    Set objNS = Nothing
    Set obj = Nothing
    Set objContact = Nothing
    Set objItems = Nothing
    Set objContactsFolder = Nothing
End Sub

How to use the macro on this page

First: You need to have macro security set to the lowest setting, Enable all macros during testing. The macros will not work with the top two options that disable all macros or unsigned macros. You could choose the option Notification for all macros, then accept it each time you restart Outlook, however, because it's somewhat hard to sneak macros into Outlook (unlike in Word and Excel), allowing all macros is safe, especially during the testing phase. You can sign the macro when it is finished and change the macro security to notify.

To check your macro security in Outlook 2010 and newer, go to File, Options, Trust Center and open Trust Center Settings, and change the Macro Settings. In Outlook 2007 and older, look at Tools, Macro Security.

After you test the macro and see that it works, you can either leave macro security set to low or sign the macro.

Macros that run when Outlook starts or automatically need to be in ThisOutlookSession, all other macros should be put in a module, but most will also work if placed in ThisOutlookSession. (It's generally recommended to keep only the automatic macros in ThisOutlookSession and use modules for all other macros.) The instructions are below.

The macros on this page should be placed in a module.

Open the VBA Editor by pressing Alt+F11 on your keyboard.

To put the code in a module:

  1. Right click on Project1 and choose Insert > Module
  2. Copy and paste the macro into the new module.

More information as well as screenshots are at How to use the VBA Editor

The original code is at Bulk Change Outlook Contact's Email Display Name format

To change the File as format on existing contacts, see Bulk Change File As Format for Contacts.

More Information

More Bulk Change Contact articles at Slipstick.com:

  • Bulk Change Contact's FileAs Format to Match Outlook's Default Setting
  • Bulk Change File As Format for Contacts
  • Macro to Swap First and Last Name Fields
  • Show the Home Address on a Contact Form by Default
  • Update Contact Area Codes
  • Update Contacts with a New Company Name and Email Address

Bulk Move Phone Numbers to a Different Phone Field was last modified: August 29th, 2018 by Diane Poremsky
  • Twitter
  • Facebook
  • LinkedIn
  • Reddit
  • Print

Related Posts:

  • Format Contact phone numbers to use with Skype
  • Update Contacts with a New Company Name and Email Address
  • Update Contact Area Codes
  • resolved contact address
    Imported Addresses are Missing from Address Book

About Diane Poremsky

A Microsoft Outlook Most Valuable Professional (MVP) since 1999, Diane is the author of several books, including Outlook 2013 Absolute Beginners Book. She also created video training CDs and online training classes for Microsoft Outlook. You can find her helping people online in Outlook Forums as well as in the Microsoft Answers and TechNet forums.

Subscribe
Notify of
25 Comments
newest
oldest most voted
Inline Feedbacks
View all comments

Amit Kaushik (@guest_202894)
November 13, 2016 7:36 am
#202894

Hi Diane,

I'm not a very technical user, but would really be grateful if you could please help me move all numbers from the Other field into the Radio field, since the former does not sync with my smartphone. Would I be correct in assuming that .MobileTelephoneNumber in the above script would need to be replaced with .RadioTelephoneNumber for this? And if so, how might the revised script look?

Regards,

AK

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  Amit Kaushik
November 13, 2016 10:11 am
#202897

yes, provided that is the correct field name (i'm on the road and didn't double check it)
If .OtherTelephoneNumber <> "" Then
If .RadioTelephoneNumber = "" Then
.radioTelephoneNumber = .OtherTelephoneNumber
'this line clears the other field - you could leave it in and have the number duplicated
'.OtherTelephoneNumber = ""
.Save
End If
End If

0
0
Reply
A Kaushik (@guest_202904)
Reply to  Diane Poremsky
November 14, 2016 2:33 am
#202904

Thank you for that quick response. Last question - how would I go about confirming that .radioTelephoneNumber is actually the correct field name? And if it's not, how would I find the correct one? As I mentioned in the original post, I'm not very tech savvy in this regard, so grateful for the help.

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  A Kaushik
November 14, 2016 11:29 am
#202914

three ways:
type in lower case. if the field is valid in outlook, the case changes.

after typing the object name and dot, a list of valid fields will come up. as you type letters, it will filter the list.

search the object model help. its on the view menu and in msdn (use google to find it - something like 'outlook vba contact fields'

0
0
Reply
A Kaushik (@guest_202929)
Reply to  Diane Poremsky
November 15, 2016 12:11 am
#202929

Absolutely brilliant, worked like a charm - thank you so much!! :-)

Slipstick is my first point of reference when I need to do something like this - some months ago, needed to bulk change the Save As field for email, and you saved my life then too. Awesome, and thank you for the work you do for the MS community.

Cheers!

0
0
Reply
makinmyway (@guest_196102)
January 25, 2016 2:56 pm
#196102

I want to use the script above to move information between the following two fields but do not seem to have the correct syntax for the field names as nothing moves (though I can get phone numbers in Other to move to Mobile when I try running it as shown above): User Field 2 (.UserField2) to Personal Home Page (.PersonalHomePage). I believe I have not used the correct field labels in the macro but am stumped as to what I should be using. Note: I want to do the same with User Field 3 moving to IM Address so let me know please what the correct syntax is for the IM Address field too. Thanks!

0
0
Reply
Kithsiri ArunaShanta (@guest_191130)
May 30, 2015 3:20 am
#191130

Thanks it worked on outlook 2013

0
0
Reply
Khalil (@guest_189799)
March 12, 2015 5:11 pm
#189799

Dear Diane , that's so technical for a user like me ... Can you give me a simple way to change all the fields in my contacts from the "other" field to for example "home" field ... I use Microsoft exchange of my company & it's not reading the "other" field on my smart phones

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  Khalil
March 14, 2015 1:37 am
#189831

You'll either need to use a macro or edit each contact yourself.

0
0
Reply
Sunil Avhad (@guest_184088)
June 17, 2014 4:55 am
#184088

Thanks Slipstick and ThanksWilly.
I could cut/paste your script and update my 800+ contacts in virtually one minute.

Thanks a Ton. It saved my great headache and my hours of work.

0
0
Reply
Michael A (@guest_183295)
May 6, 2014 2:30 pm
#183295

Fantastic! It worked like a charm.

0
0
Reply
Kumar S R (@guest_181834)
February 10, 2014 11:29 am
#181834

Thanks a ton Diane. That was genius. Having no idea about VB coding, I transferred my contacts! Kudos ...

0
0
Reply
thepasbox (@guest_181104)
January 4, 2014 10:21 am
#181104

Thanks you, Diane!

0
0
Reply

Visit Slipstick Forums.
What's New at Slipstick.com

Latest EMO: Vol. 28 Issue 11

Support Services

Do you need help setting up Outlook, moving your email to a new computer, migrating or configuring Office 365, or just need some one-on-one assistance?

Subscribe to Exchange Messaging Outlook






Our Sponsors

CompanionLink
ReliefJet
  • Popular
  • Latest
  • WeekMonthAll
  • Adjusting Outlook's Zoom Setting in Email
  • How to Remove the Primary Account from Outlook
  • Cannot add Recipients in To, CC, BCC fields on MacOS
  • Move an Outlook Personal Folders .pst File
  • Save Sent Items in Shared Mailbox Sent Items folder
  • Create rules that apply to an entire domain
  • Outlook's Left Navigation Bar
  • Remove a password from an Outlook *.pst File
  • View Shared Calendar Category Colors
  • Use PowerShell to get a list of Distribution Group members
  • Cannot add Recipients in To, CC, BCC fields on MacOS
  • Change Appointment Reminder Sounds
  • Messages appear duplicated in message list
  • Reset the New Outlook Profile
  • Delete Old Calendar Events using VBA
  • Use PowerShell or VBA to get Outlook folder creation date
  • Outlook's Left Navigation Bar
  • Contact's Display Bug
  • Use PowerShell to get a list of Distribution Group members
  • Edit Outlook’s Attach File list
Ajax spinner

Newest Code Samples

Delete Old Calendar Events using VBA

Use PowerShell or VBA to get Outlook folder creation date

Rename Outlook Attachments

Format Images in Outlook Email

Set Outlook Online or Offline using VBScript or PowerShell

List snoozed reminders and snooze-times

Search your Contacts using PowerShell

Filter mail when you are not the only recipient

Add Contact Information to a Task

Process Mail that was Auto Forwarded by a Rule

Recent Bugs List

Microsoft keeps a running list of issues affecting recently released updates at Fixes or workarounds for recent issues in Outlook for Windows.

Outlook for Mac Recent issues: Fixes or workarounds for recent issues in Outlook for Mac

Office Update History

Update history for supported Office versions is at Update history for Office

Outlook Suggestions and Feedback

Outlook Feedback covers Outlook as an email client, including Outlook Android, iOS, Mac, and Windows clients, as well as the browser extension (PWA) and Outlook on the web.

Use Outlook.com Feedback for suggestions or feedback about Outlook.com accounts.

Other Microsoft 365 applications and services




Windows 10 Issues

  • iCloud, Outlook 2016, and Windows 10
  • Outlook Links Won’t Open In Windows 10
  • Outlook can’t send mail in Windows 10: error Ox800CCC13
  • Missing Outlook data files after upgrading Windows?

Outlook Top Issues

  • The Windows Store Outlook App
  • The Signature or Stationery and Fonts button doesn’t work
  • Outlook’s New Account Setup Wizard
  • Outlook 2016: No BCM
  • Exchange Account Set-up Missing in Outlook 2016

VBA Basics

How to use the VBA Editor

Work with open item or selected item

Working with All Items in a Folder or Selected Items

VBA and non-default Outlook Folders

Backup and save your Outlook VBA macros

Get text using Left, Right, Mid, Len, InStr

Using Arrays in Outlook macros

Use RegEx to extract message text

Paste clipboard contents

Windows Folder Picker

Custom Forms

Designing Microsoft Outlook Forms

Set a custom form as default

Developer Resources

Developer Resources

Developer Tools

Outlook-tips.net Samples

VBOffice.net samples

SlovakTech.com

Outlook MVP David Lee

MSDN Outlook Dev Forum

Repair PST

Convert an OST to PST

Repair damaged PST file

Repair large PST File

Remove password from PST

Merge Two Data Files

Sync & Share Outlook Data

  • Share Calendar & Contacts
  • Synchronize two computers
  • Sync Calendar and Contacts Using Outlook.com
  • Sync Outlook & Android Devices
  • Sync Google Calendar with Outlook
  • Access Folders in Other Users Mailboxes

Contact Tools

Data Entry and Updating

Duplicate Checkers

Phone Number Updates

Contact Management Tools

Diane Poremsky [Outlook MVP]

Make a donation

Calendar Tools

Schedule Management

Calendar Printing Tools

Calendar Reminder Tools

Calendar Dates & Data

Time and Billing Tools

Meeting Productivity Tools

Duplicate Remover Tools

Mail Tools

Sending and Retrieval Tools

Mass Mail Tools

Compose Tools

Duplicate Remover Tools

Mail Tools for Outlook

Online Services

Productivity

Productivity Tools

Automatic Message Processing Tools

Special Function Automatic Processing Tools

Housekeeping and Message Management

Task Tools

Project and Business Management Tools

Choosing the Folder to Save a Sent Message In

Run Rules on messages after reading

Help & Suggestions

Outlook Suggestion Box (UserVoice)

Slipstick Support Services

Home | Outlook User | Exchange Administrator | Office 365 | Outlook.com | Outlook Developer
Outlook for Mac | Common Problems | Utilities & Addins | Tutorials
Outlook & iCloud Issues | Outlook Apps
EMO Archives | About Slipstick | Advertise | Slipstick Forums
Submit New or Updated Outlook and Exchange Server Utilities

Send comments using our Feedback page
Copyright © 2023 Slipstick Systems. All rights reserved.
Slipstick Systems is not affiliated with Microsoft Corporation.

wpDiscuz

Sign up for Exchange Messaging Outlook

Our weekly Outlook & Exchange newsletter (bi-weekly during the summer)






Please note: If you subscribed to Exchange Messaging Outlook before August 2019, please re-subscribe.

Never see this message again.

You are going to send email to

Move Comment