Click here to Skip to main content
15,887,214 members
Articles / All Topics
Technical Blog

How to import your exisiting contacts from your old Nokia phone to your new iPhone?

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
19 Aug 2009CPOL1 min read 12.3K   3   1
You may want to import your existing contacts from your old Nokia (or in general VCard format) to your new iPhone.You need to do some simple steps:First you need to have Outlook and iTunes installed on your computer, then copy your .vcf files to a location in your hard disk, e.g. C:\VCARDS.
You may want to import your existing contacts from your old Nokia (or in general VCard format) to your new iPhone.
You need to do some simple steps:
First you need to have Outlook and iTunes installed on your computer, then copy your .vcf files to a location in your hard disk, e.g. C:\VCARDS. Now when you open .vcf files, Outlook brigs a window, then you can save and close the window, the contact file is imported to your Outlook's Contacts. You need to repeat this action for all of your .vcf files. (I'll explain a way for bulk importing contacts later in this article)
After that you import all of your contacts to Outlook, you can simply synchronize iTunes contacts with Outlook and your iPhone. Done!

But there is still one issue remaining, importing all of your .vcf files manually is a very time consuming and boring job, let's write a code to do this automatically for you!
I've taken this code from here. Nice piece of code!

Here is the steps you need to do:
This can also be done using a VBA macro. First create a folder on the root of the C: drive and name it VCARDS. Next copy all your individual vCard files (.vcf) to this newly created folder. Next open Outlook and click ALT + F11 to open the VBA editor.

Click TOOLS --> REFERENCES and then select Microsoft Scripting Runtime and Windows Script Host Object Model from the list and place checks in the box next to each and click OK.

Next click INSERT --> MODULE and copy and paste the code below into the blank module. Save and run the macro to automatically import and save all the individual files into Outlook.

<br />Sub OpenSaveVCard()<br />    <br />Dim objWSHShell As IWshRuntimeLibrary.IWshShell<br />Dim objOL As Outlook.Application<br />Dim colInsp As Outlook.Inspectors<br />Dim strVCName As String<br />Dim fso As Scripting.FileSystemObject<br />Dim fsDir As Scripting.Folder<br />Dim fsFile As Scripting.File<br />Dim vCounter As Integer<br />    <br />    <br />Set fso = New Scripting.FileSystemObject<br />Set fsDir = fso.GetFolder("C:\VCARDS")<br /><br />For Each fsFile In fsDir.Files<br /><br />    strVCName = "C:\VCARDS\" & fsFile.Name<br />    Set objOL = CreateObject("Outlook.Application")<br />    Set colInsp = objOL.Inspectors<br />        If colInsp.Count = 0 Then<br />        Set objWSHShell = CreateObject("WScript.Shell")<br />        objWSHShell.Run strVCName<br />        Set colInsp = objOL.Inspectors<br />    If Err = 0 Then<br />            Do Until colInsp.Count = 1<br />                DoEvents<br />            Loop<br />            colInsp.Item(1).CurrentItem.Save<br />            colInsp.Item(1).Close olDiscard<br />            Set colInsp = Nothing<br />            Set objOL = Nothing<br />            Set objWSHShell = Nothing<br />        End If<br />    End If<br /><br />Next<br /><br />End Sub<br /><br />


Thanks Rollin for the code.

This article was originally posted at http://blog.mrt-web.com/rss.xml

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United Kingdom United Kingdom
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
QuestioniNoki - migrating your Nokia phone data to iPhone Pin
al_lea27-Jul-11 20:54
al_lea27-Jul-11 20:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.