I was looking to solve a small problem I was having since I got my HP Mini 1000 – how can I sync my Outlook contacts between the machine in my office and the Mini when I’m not using Microsoft Exchange? I settled on a combination of 2009 and 1989 technology: Live Mesh and a couple of batch files. As always, your mileage may vary, but it works for me. In the best imitation of Jamie Oliver here’s the recipe:

Ingredients

2 or more machines with:

  • Microsoft Outlook running on them
  • Microsoft PowerShell (optional)
  • Live Mesh client
  • Syncing batch files: broken links at the moment, here are the listings

push-sync-contacts.cmd

@copy /Y /V sync-contacts.pst sync-contacts.sync
 
@REM Create a log file
@powershell get-date 
@IF ERRORLEVEL 0 (
@for /f "delims=" %%a in ('powershell get-date -uFormat "%%Y%%m%%d-%%H%%M"') do @set datetime=%%a
) ELSE (
@set datetime=sync
)    
@ECHO %datetime% > "0-%datetime%-from-%COMPUTERNAME%-push.txt" 

pull-sync-contacts.cmd

copy /Y /V sync-contacts.sync sync-contacts.pst
@REM Create a log file
@powershell get-date 
@IF ERRORLEVEL 0 (
@for /f "delims=" %%a in ('powershell get-date -uFormat "%%Y%%m%%d-%%H%%M"') do @set datetime=%%a
) ELSE (
@set datetime=sync
)    
@ECHO %datetime% > "0-%datetime%-to-%COMPUTERNAME%-pull.txt" 

Method

  1. Let’s call the two machines “Office” and “Laptop”.
  2. Sign up for Live Mesh and install the client on both machines in your appropriate account/profiles.
  3. On one of the machines, create a Live Mesh synced directory for the Outlook Contacts. I imaginatively called mine “Contacts”. It will automatically be created on your other machine(s). Copy the batch files
  4. On the Office machine, open Outlook. You’ll probably be looking at a hierarchy of folders under the default label “Personal Folders”.
  5. Click the root node in the “Folders List” – “Personal Folders”. Choose File, New, Outlook Data File. Click OK to the default format choice if you’re not mixing versions of Outlook. When presented with the File Save dialog, navigate to the Contacts directory you created in step 3. Call the file “sync-contacts.pst”. If you change the filename, you’ll need to modify the batch files.
  6. In the “Create Personal Folders Dialog”, name the pst file whatever you want it to look like in Outlook. I called mine “Synced Contacts”. When you click OK, it will now be the highlighted node. Expanding it will show you a deleted items container and a search folder.
  7. Right-click the Contacts folder in your “Personal Folders”. Choose ‘Copy “Contacts”…’ and then click the “Synced Contacts” node. It will copy the contacts folder here. Right-click on the new “Contacts” folder, and choose Properties. Rename it to “Synced Contacts” then click Apply. Switch to the “Outlook Address Book” tab and check the box next to “Show this as an e-mail Address Book”. Click OK.
    image
  8. Go to the “Tools, ”Address Book…” menu item. In the Address Book, open the “Tools, Options…” menu item. I set up my Synced Contacts as the default item in all the drop-downs and the first item in the check items list. You can now delete all of your contacts out of the “Personal Folders” Contacts folder to avoid duplication.
    image
  9. Close out of Outlook.
  10. Run the batch file push-sync-contacts.cmd. Live Mesh won’t sync PST files, so the batch file copies your sync-contacts.pst file to a new file called sync-contacts.sync. In addition, if you have Window PowerShell installed you will get a file with a timestamp in it like 0-20090315-1322-from-RANGITOTO-push.txt in the directory.
  11. On the “Laptop” machine, once Live Mesh in installed, you should see the batch files, text log files and sync-contacts.sync file appear.
  12. Once the batch and sync-contacts.sync file is synced, run pull-sync-contacts.cmd. You should see sync-contacts.pst appear.
  13. Open Outlook. In the File menu, choose Open, Outlook Data File…, then browse to the Live Sync folder and open sync-contacts.pst file.
  14. Repeat step 8 on the new machine.

To Serve

Anytime you change contacts in one of your Outlook locations, run the batch file once you’ve closed it down to push from that machine.  On the other machine, run the pull batch file before opening Outlook.

The setup is a bit clunky, but it works well.

Notes: I’ve only run this on Vista and Windows 7 Beta. No warranties, use at your own risk etc.