Monday, July 21, 2008

How to print your Outlook contacts.

Several months ago, I persuaded a friend to abandon MS Word as a platform for an address book and migrate it to MS Outlook.

The Word document was more like a series of biographical sketches than a database. In many instances it described who was born of whom, where they went to school, who married whom, where they had worked, and, sometimes, when they died.

There were thousands of names in the address book/document, and it was designed to be printed out, put in a binder and kept by the phone. In order to allow for the mailing of Christmas cards and party invitations, various children of the electronic document existed, suitable for printing mailing labels. So, whenever there were additions, deletions, and changes to the "master" list, appropriate changes needed to be made to the spawn. Or not.

In the course of the migration from Word to Outlook, once again I realized that no good deed goes unpunished. And that with friends like me, who needs enemies? After hours and hours of work and months of elapsed time, the address book data has been migrated to Outlook, for the most part.

The task at hand now is to print out a directory. How hard can that be? Pretty hard, it turns out. You can get a rudimentary directory by selecting Print/Directory in Outlook, but not the field-rich, biographical sketches that my friend was accustomed to having. For that, a MS Word mail-merge is required. Its an actual coding job, made somewhat easier by wizards in MS Word. But made a lot more frustrating by quirks (bugs or features?) in the way that MS Word interprets the code. Here's what's involved:
  • Field codes for all the fields you want to include and "If...then...else" statements to label and/or connect certain fields.
  • Careful attention to paragraph formatting in order to keep records from spanning columns and pages.
  • A kludge to break pages at the end of each alphabetical section.
  • A kludge to remove blank lines that MS Word fails to suppress (e.g., because there is font formatting associated with empty field).
Here's what the merge output looks like. I'd be happy to share the "code" with you. Get in touch with me if you want it. But, the right way to do this is probably with PERL, not MS Word.

1 comment:

Alexis said...

My job is very different.And once I had problems with mails.But I used next tool-.wab viewing address book,which I found in google.It is free as far as I remember.Moreover program can too restore Windows Address Books after various failures.