Archive for May, 2006
Phone contacts from Outlook contact to SIM card
Posted by Brett Robinson in Programming on May 5th, 2006
When I purchased my smartphone I placed all of my contacts from my previous phone on my SIM card, then I just moved the SIM card to my new smartphone and all my contacts were there. But, they were all there on my SIM card under a SIM contact. This is not ideal for the smartphone. With the smartphone you would like to be able to sync up the contacts with Outlook on your PC, or to have additional functionality that goes with the Outlook contact in the phone (images, custom rings, etc). One feature that you can not use with SIM contacts is if you have a huge phone list the phone provides a “quick search” where it shows you the letter and then hops to that letter in your phone book without going through all your contacts. But, with the SIM contact it does not do any of that. So, the obvious thing is to move your SIM contacts to your Outlook contacts in bulk. There is a program out there that I used, M2SIMCopy, that does a good job in moving over the contact to the phone, but it puts them in a category “SIM” and is only one way directional. By this I mean it can only go from SIM to the phone and not the phone to the SIM. So, I decided to take a stab at it. I decided to use the Compact Framework 2.0 with Windows Mobile 5.0 and Visual Studio 2005. I found one library somewhat useful to start with the SIM functions. The SIM method I needed was SimWritePhonebookEntry in the cellcore.dll. This method is not wrapped in the .NET CF 2.o, so you would have to use PInvoke to try to get at it. The method returns a reference to a structure and you would have to try to mimic that structure in .NET, which is not a straight conversion. I looked a while for something on the internet, and found the OpenNETCF library does a pretty good job on encapsulating the SIM calls into .NET methods.
If you need the .NET Compact Framework 2.0 you can download it here.
I finally had time to dig around in the OpennetCF and get it to work with adding my Outlook contacts in bulk to my SIM card, and then back from my SIM card to my Outlook Contacts in bulk. I had to tweak one method in the Opennetcf to get it to work.
The first screen is a little slow when loading the contacts, so when you click one of the menu items to bring up the contacts it will take about 3 seconds to bring up the screen with the contacts on it.
When installing it will prompt you with a screen that asks you to Confirm the installation. Something along the lines of “The program is from an unknown publisher, Do you want to continue?” Select “Yes”. Then the program will install.
I put a shortcut under the start menu called “BRobinson Contact Manager” and you can launch the application from there. Or you can navigate in your smartphone to Program Files -> ContactManager and then click on the executable to launch the program. Now you can copy all your Outlook contacts to your SIM card!
Here are some screen shots:
Version 1.0

UPDATE: The program now has a new version (1.1) that can export your SIM or Outlook contacts to a pipe “|” delimited text file. You can also import this file to either your SIM or Outlook contacts. Also, when exporting from Outlook it will put an “H” for home number, “B” for business number and “M” for mobile. See new pictures:
Version 1.1 (in addition to 1.0 features)

Download the installation cab file here (version 1.1): Installation File [ 3079 Downloads ]
old version here (version 1.0): Contact Manager 1.0
Recent Comments