after i first heard about o2 atom life supporting windows mobile 6.0, i really wanted to upgrade my o2 atom life’s operating system to windows mobile 6.0 but never found the time. to cut to the chase, i did have some slack time last wednesday and proceeded with upgrade process.

in order to back-up the contacts on my o2 atom life, i used activesync 4.5 to sync my contacts to a new and empty ms outlook 2003 profile. before all of you raised your collective eyebrows on my move, let me say the following: i don’t sync the contacts in my o2 atom life and my ms outlook 2003 profile. i only sync the calendar and tasks. after successfully pairing my o2 with the new and empty ms outlook 2003 profile i proceeded to sync the contacts only. so with all the contacts from my o2 safely transferred to the ms outlook, i followed the steps in o2’s website in upgrading my operating system to windows mobile 6.0. the upgrade process went without a hitch. so now after doing the usual settings on my o2 after the upgrade, i sync’d it with ms outlook profile which contained my contacts. again like a charm my contacts are now in my o2 sporting the windows mobile 6.0 operating system. now i wanted to sync my calendar, so i close ms outlook and opened it again this time using my usual profile and bam it hit me, i need to un-pair my o2 with the new profile and then pair it with the my usual profile. no big deal right, but since i don’t sync my contacts (with my usual profile and o2) only the calendar and tasks, i need to remove the check mark on the sync options for the contacts but by so doing effectively deleting all the contacts in my o2. so now i was in a dilemma. what should one do in such a predicament? well, when things can’t be done using the software itself, i turn to my expertise in visual foxpro (vfp) and automation of ms outlook. so here are the steps i took:

  1. i opened ms outlook with the new profile containing the contacts from my o2 atom life.
  2. i ran a snippet of vfp code to extract all the contacts and save these as individual vcard files (extension .vcf).
  3. send the vcard’s from my laptop to my o2 atom life via bluetooth and viola all my contacts were transferred to my o2 atom life.

the visual foxpro code snippet i used is found below:

 lncontactsfolder = 10
lnvcardtype = 6

looutlook = createobject("outlook.application")
lonamespace = looutlook.getnamespace("mapi")
locontacts = lonamespace.getdefaultfolder(lncontactsfolder).items

for each locontact in locontacts
lcname = locontact.firstname + locontact.lastname
wait window "saving: " + lcname nowait
lcpath = forceext("c:\temp\" + lcname,"vcf")
locontact.saveas(lcpath,lnvcardtype)
next

photobucket

Leave a Reply

Your email address will not be published. Required fields are marked *