Outlook contacts: Move all numbers from “Other Phone” to “Mobile Phone” field

Outlook contact items have multiple available fields for storing phone numbers. Such as “other phone” and “mobile phone”.

Unfortunately some mobile phone sync software stores the numbers in the “other phone” fied, which becomes a problem if you switch to a new mobile phone that is not able to read this field. I wrote this little powershell script to scan all outlook contacts and migrate the values from the “other phone” field to the “mobile phone” field:

$outlook = new-object -com outlook.application
$contacts = $outlook.Session.GetDefaultFolder(10)
$contacts.Items | % { if($_.MobileTelephoneNumber -eq "") { $_.MobileTelephoneNumber = $_.OtherTelephoneNumber; $_.OtherTelephoneNumber = ""; $_.save() } }

Copy&paste the above source code into your PowerShell window to run it.

50 Responses to “Outlook contacts: Move all numbers from “Other Phone” to “Mobile Phone” field”


  1. 1 Klemen February 22, 2010 at 11:13 am

    Hello,
    I have the same problem, the most numbers in my (outlook)contacts heve the wrong field, they are in the “other” field (not “other phone”).
    How can i change all numbers from “other” to “Mobile”

    Thank you for help,
    Klemen

  2. 2 Ryan Kennedy March 3, 2010 at 3:09 am

    Hi,
    First of all thanks for the script. i can get it to run but not quite the way i want it to.
    i have very limited skills with powershell but enough to run the script.
    However, i have numbers in the “Mobile” field that i need migrated into the “business” field. i replaced “othertelephonenumber” with “businesstelephonenumber”.
    if i add a number into the business area manually this script puts it BACK into the “Mobile” field.
    I hope this all makes sense, and i hope you can help
    Much appreciated!!

  3. 3 Ryan Kennedy March 3, 2010 at 4:49 am

    Ok,
    I Used my head and swapped around the two values and that worked!
    Now, all my entries that were in “Mobile” are now in “Business” or “Work Tel” on my Windows Mobile device.
    Thanks so much for your script, Much Appreciated!!

  4. 4 tom April 8, 2010 at 8:55 pm

    many thanks!!!

    this is perfect final program for transferring my contacts from my nokia phone using pc suite (ovi suite) to my exchange account (outlook).

    my contacts were not showing up in my HTC Snap running windows mobile 6.5 as the phone does not display ‘otherphone’.

    many thanks

  5. 5 lamanary April 15, 2010 at 5:56 pm

    Thanks dude.

    I had my contacts synced from Nokia PC Suite. I change it to an android device and was left without half of them.

  6. 6 Richard Williams April 30, 2010 at 4:30 pm

    Hi Adrian,
    I’ve just moved from Nokia to an HTC, which can’t read the numbers that the Nokia put in the ‘other’ field. I’d started going through manually when I found your script, which looks just what I need … but I’m afraid I have so little knowledge about this sort of thing that I don’t know what to do with it. I assume I copy your script and paste it somewhere…but where? Sorry to be so ignorant!
    Cheers,
    Richard

  7. 8 Nick Lewis June 21, 2010 at 9:56 pm

    Hi,

    Just seen this script and it is exactly what I need to sync my new HTC Legend properly. I would do it manually but there is about 600 !! I have downloaded Powershell but basically dont know what top do with it. Is there an easy way to enter the script for someone like myself is pretty unsure of how to go about it. Any help would be greatly appreciated.

    Regards

    Nick

  8. 9 Sam July 2, 2010 at 10:51 am

    Thanks Adrian. I was already manually typing Outlook contacts “other phone” field values to “mobile”. It would have taken hours. Thanks🙂

  9. 10 Simon H-R July 12, 2010 at 10:24 pm

    Many thanks, worked a treat. For those that are having difficulty, copy and past the script into notepad, take out the 1,2,3 and PS>, then copy and paste into powershell, right click and hit enter.

    Well done saved me a lot of work on my HTC Desire.

    Cheers

  10. 11 Riaz August 6, 2010 at 2:26 pm

    Thank you, saved me hours of work, migrated from Nokia to Desire.
    Powershell already on Windows 7, followed Simon H-R’s instructions and it all worked!

  11. 12 youdy3000 August 6, 2010 at 4:31 pm

    You are a legend. It worked perfectly – I spent days getting frustrated about this & then your script fixes it in minutes.

  12. 13 Shot by the Sheriff October 6, 2010 at 4:10 pm

    Brill – worked a treat once I got powershell. They should have something like this in the phone sync software already !!!
    Thank you

  13. 14 madmag October 7, 2010 at 10:44 am

    exporting to an excel file and importing back from it after making the appropriate changes is much easier for those who are not familiar with powershell…
    this may give you some hints, like it did to me: http://windowsvj.com/wpblog/2010/03/import-phone-contacts-from-excel-to-office-outlook-2010/

  14. 15 Peter Thybo Andersen October 18, 2010 at 8:56 pm

    Ingenious!

    Thanks a lot for this invaluable help!

    Stupid old me had some trouble, because I tried to copy the whole text in one go and not line by line.

    Thanks again!

  15. 16 Matt Shaw December 11, 2010 at 3:17 am

    This is such a legendary script.

    Nokia OVI suite is a terrible piece of software and the fact that 3 lines of code can go so far towards making it usable shows just how little Nokia has thought about its users.

    Thanks from Australia

  16. 17 Michael Gadd December 21, 2010 at 10:30 am

    Thanks so much for the script, I swopped arround the fields to do as I needed – that has saved me a huge amount of work and frustration!

  17. 18 Fuad January 9, 2011 at 7:36 am

    thank you, it saves lot of tiime.

  18. 19 Matthew Minshull January 18, 2011 at 10:05 pm

    First of all, I’d like to say a massive thank you to Adrian. I was faced with manually dealing with 666 contacts and I am so busy at the moment, you may have saved me from a mental breakdown. Seriously.
    A large propotion of my numbers (of different types) ended up in Outlook in ‘Other’ and Microsoft Exchange was not syncing these with my iPhone. Ryan Kennedy inspired me to transferred these to ‘Radio’, as I wanted to quarantine them and change labels later as appropriate. Thanks Ryan.
    Thanks to Simon H-R for the tip about using PowerShell as Microsoft Technet’s ‘getting started’ instructions were overwhelming.
    But finally, I couldn’t have cracked it without, ‘Peter Thybo Andersen’ who burated himself for copying the whole thing. I didn’t know about the line by line requirement either. Never be afraid to state the obvious.
    One last thanks to everyone on this page who convinced me this was the way to go. Hope this helps someone else out there!😉

  19. 20 Ove Kristensen January 20, 2011 at 10:25 am

    Thank you, saved me a lot of work!

  20. 21 Florin April 14, 2011 at 2:03 pm

    Thank you so much!!! You are a life saver😉 Having trouble with my new htc…thanks man!!!!!!!!!

  21. 22 namita April 28, 2011 at 5:45 am

    thank you very much. The script was quite helpful and saved a lot of my time and manual effort.

  22. 23 mark May 15, 2011 at 8:52 pm

    Genius! Such a simple neat solution to something that could have taken ages to sort out. Thanks!

  23. 24 Manjhunath May 16, 2011 at 6:30 pm

    Woooo🙂 Awesome mate !! thanksss. I wrecked myself thinking of wat to do? how to do? This code helped me a lot. Me shifting from Nokia to Htc !! got myself a new Wildfire !!😀 Thanks again !! cya

  24. 25 nemanja May 31, 2011 at 6:57 pm

    please help! i dont know to work with powershell, can you tell me stp by step how to do this?

    PLEASE

  25. 26 nemanja May 31, 2011 at 7:24 pm

    i did it!!!!!!!!!!!!!!!!!!!!!!! yes yes yes i am genius!!!! :)))))))))))))

  26. 27 Gil June 9, 2011 at 6:40 am

    Hi Adrian, i have two Questions regarding the script:

    1.what if have a more than one outlook profiles on my pc? can you tell the scripts which one to make the changes on?
    2. i’m getting some sort of an error message when running it (maybe due the multiple outlook profiles issue?)

    New-Object : Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed du
    e to the following error: 80080005.
    At D:\Scripts\MoveOtherPhone.ps1:1 char:22
    + $outlook = new-object <<<< -com outlook.application
    + CategoryInfo : ResourceUnavailable: (:) [New-Object], COMException
    + FullyQualifiedErrorId : NoCOMClassIdentified,Microsoft.PowerShell.Commands.NewObjectCommand

    You cannot call a method on a null-valued expression.
    At D:\Scripts\MoveOtherPhone.ps1:2 char:46
    + $contacts = $outlook.Session.GetDefaultFolder <<<< (10)
    + CategoryInfo : InvalidOperation: (GetDefaultFolder:String) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

    Any idea what this means?

    thanks allot,
    Gil

    • 28 Gil June 9, 2011 at 7:48 am

      Problem solved..🙂 it was the multiple profiles problem.
      when i change it – not to prompt what profile to use – it went smoothly..
      thanks

      • 29 Musaab February 1, 2012 at 5:36 pm

        gill i’ve got the same problem.. but i coudln’t understand how did u figure it out.. explain please.. thanks in advance

  27. 30 Renjith Vakkayil June 26, 2011 at 5:22 am

    Thanks for the script and special thanks to Peter Thybo Andersen for mentioning that we need to copy line by line and not all together (had been doing that for hours without any result)…shifted about 930 contacts in a jiffy….

    Regards

    Renjith

  28. 31 Gerrit August 12, 2011 at 2:08 pm

    Awesome! Thanks for the script!

  29. 32 Eddy September 16, 2011 at 5:25 pm

    Very good, well done. It’s works fine for me. Thanks a lot.
    Eddy

  30. 33 Behrang November 16, 2011 at 1:19 pm

    You can easily export your contacts to Access Database, open the file in MS access then copy and paste “Other Phone” numbers into another column.
    Import the new file into Outlook with Replace changes option checked.

    you can sync without a problem now

  31. 34 Don December 20, 2011 at 1:10 pm

    Dude, you made me look awsome when I “solved” this huge problem for a bunch of our Nokia users today. Best thing is I can remote execute this on all client computers. You’re a legend!

  32. 35 Mehul February 8, 2012 at 6:46 pm

    Thank you soooo much. Just moved from a Nokia C3-00 to an iPhone, and I was getting really frustrated coz I couldn’t transfer my contacts over! You’re a life savior! Cheers mate

  33. 36 Neo February 26, 2012 at 3:51 pm

    Just super my man!

  34. 37 J50cents March 2, 2012 at 2:08 am

    You saved my JOB.We are rolling out iphones at work and there are about 300 users who are all coming from a Nokia Ovi suite background 3/4 of them had this problem, and VOILA your script did it in seconds.You are an angel Thank you very much

  35. 38 Mauzinh0 March 5, 2012 at 12:11 pm

    5*! Thank you

  36. 39 Scott Burnett April 19, 2012 at 7:39 pm

    I1) copied the whole thing together and it worked fine.
    2) What do you do if some of your outlook contacts already have phone numbers in the MOBILE field? Hmmm…..I did it and it erased 200 contacts that already had something in the mobile field. So now I am having to restore from backup…hope this comments saves somebody this frusteration.
    the script does what it sais and it does it well, just beware of exaxtly WHAT it does. Thanks. Im goig to try again with some alternative fields.

  37. 40 Scott Burnett April 19, 2012 at 8:20 pm

    Correction…..if a number is already in the MOBILE field, it does NOT overwright it….it leaves that field alone….once completed, I see that I still ahve a few hundred contacts with numbers in the OTHER field, but they all are contacts that already had numbers in the MOBILE field. Ill have to MANUALLY move those ones to a different field, so in closeing, it works great, and you may have some (not as much as you WOULD have) cleanup to do once done.

  38. 41 Rani May 31, 2012 at 7:50 pm

    thanks, works !

  39. 42 Andrew June 27, 2012 at 5:20 am

    This was excellent. Thanks heaps.

  40. 43 Vijay Gaware April 12, 2013 at 4:24 am

    Hello Adrian,

    I have Nokia E72. I have contacts with multiple numbers stored under label “mobile”. When I transfer this as CSV file, only the first number under label “mobile” gets transferred. The rest do not. Do you have a solution to address this.

    Regards
    Vijay

  41. 44 Fabrizio April 19, 2013 at 1:20 pm

    Thank you very much! I scored some points with my boss thanks to your solution!
    BR
    Fabrizio

  42. 45 mike asplin May 3, 2013 at 4:49 pm

    Hi tried this and dint do anything. I have 30 subfolders under contacts so is this just operating on the top contacts folder? If so any way to run it on subfolders? Thanks Mike

  43. 46 William May 17, 2013 at 8:46 am

    this worked brilliantly, thanks a lot!

  44. 47 aftermarket grilles August 1, 2013 at 6:56 am

    Thanks for finally talking about >Outlook contacts: Move all numbers from Other
    Phone to Mobile Phone field | Adrian Henke’s Blog <Liked it!

  45. 48 Petr January 22, 2014 at 5:18 pm

    Hello,
    this is script that I have used several times. But for about few months it is not working. I do not know what has changed, but when I start it it basically does not do anything …
    As far as I am not familiar with PS scripts, I am not able to track what is wrong … Is it possible, that you look at it and verify, where problem can be?
    Thanks in advance if you find few minutes for it …

    Petr

  46. 49 giurava February 20, 2015 at 3:00 pm

    Tnx very much for this awesome script!!

  47. 50 malte.rueckert@gmx.de August 22, 2016 at 5:24 pm

    Thank You- made my day.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s





Follow

Get every new post delivered to your Inbox.

%d bloggers like this: