September 23, 2005

My Lotus Notes Adventure

A task at work required us to convert Lotus Notes .nsf files containing contacts and email messages, such that we could import them into the clients' brand new Exchange Server. We were in an environment where connecting to both servers was not going to be possible, and we received the Notes Files on a DVD from the customer. At first, I thought that this was going to be a simple task, and that imports would be a matter of just telling Outlook to import the file. Since I'm writing this entry, you can be assured that it was not so simple.

There are a good many products out there that will convert Notes data for you. Unfortunately, most of them cost a good deal of money. I found one that was very inexpensive, and served half of our needs. The tool is Notes2Outlook. While the tool is still very immature (it terminates without warning when it hits an error, and is very sensitive about how you start it up, it doesn't clean up its own temp files, but can crash if you don't clean them up manually...that kind of thing), it did work for us in migrating email messages to PST files from NSF files. It was also cheap - $160 for a 3-month subscription, more than long enough to do a one-time import.

To do the import, you need to make sure you get a Lotus Notes client. If you're doing this process, you're probably an Outlook/Exchange Administrator, and don't know much about Notes. This is where I was a week ago. Make sure you get a copy of the client from the people who give you the .nsf backups. It's the only way you'll ever be able to read the .nsf files. There is no open source solution to accessing the emails, even if you spend $1000 or more for an import tool. The Exchange Migration Wizard and Lotus Notes Connector even requires installation of the Lotus Notes Client on the Migration machine.

Once you have the client, make SURE you can open the .nsf databases you were given. One of the .nsf files we received had 'local access protection' on it, and could not be opened by the Notes client. This causes all kinds of consternation when we tried to import it, and we had no idea that the problem was linked to the Notes client being unable to read the file. To do this, open the Notes Client, choose File, Database, Open and select the .nsf file. Make sure this brings up the messages you wish to import, or the contacts you wish to import. You'll be using the Notes client to do the import of contacts, anyway.

Install both MS Outlook and the Notes client on a fast machine. Install Notes2Outlook on the same machine. Begin your imports. A few tips:
  • Open Outlook before starting Notes2Outlook. The programmer tries to instantiate it when it runs, but Outlook can be touchy when starting up, and the instantiation is best done while Outlook is already open and in memory.
  • Make sure you specify a Working Directory that is EMPTY. Choose a different working directory for each import as you go along.
  • Don't close Notes2Outlook in between conversions. We had a hard time with it opening back up cleanly. Just do all your imports with the one session.
  • Don't choose the All option. It makes for a very big PST file.
  • Notes2Outlook has a counter that appears on the screen down in the left bottom - but it's NOT in the Notes2Outlook window. When you start the application, move the Notes2Outlook window so that the counter can easily be seen on the backdrop of the application. There should be a status message when you start the application.

Now for the names.nsf file - the contacts. The Notes Client is good here, because it will export a VCARD file. Just choose Export, and you can Export an address book to a VCARD 3.0 file containing all of the contact information. There is one small problem, however. Microsoft Outlook does not understand multiple-entry VCARD files. That's just STUPID, but that's how it was when we tried to import the entries in Outlook 2003.

To solve this problem, I wrote a .VBS script that opens up the VCARD file and separates the VCARDS into their own files. Here it is:

Dim ifs, ofs
Dim infile,outfile

PATH = "C:\Notes Contacts\UserName\"
INFILE = "names.vcf"
i = 0

Set ifs = CreateObject("Scripting.FileSystemObject")
Set infile = ifs.OpenTextFile(PATH&INFILE,1,0)

intext = infile.ReadLine

Do Until infile.AtEndOfStream

'Check to make sure we're at the beginning of a VCARD.
If Left(intext,11) = "BEGIN:VCARD" then
i = i +1
OUTFILE = CStr(i)&".vcf"
Set ofs = CreateObject("Scripting.FileSystemObject")
Set outfile = ofs.CreateTextFile(PATH&OUTFILE,True)
'Begin building game buffer
outfile.WriteLine intext
intext = infile.ReadLine
Do Until left(intext,9) = "END:VCARD"
outfile.WriteLine intext
intext = infile.ReadLine
outfile.WriteLine intext

intext = infile.ReadLine
End If


Set ifs = Nothing
Set ofs = Nothing

To use it, just change the pathname of where you put the .vcf file that Notes creates, and this will make a series of files in that directory: 1.vcf, 2.vcf, etc.
I would recommend creating a directory for each user and running this split.vbs program on each directory.

Finally, you can drag and drop the .vcf files directly into the Outlook Contacts folder. When you do, you'll have to Save and Close each one (by default Outlook opens up the vcard, rather than saving it). You can likely hold down Alt-S on the keyboard to quickly do that.

I hope this blog entry helps some other poor sucker with their Lotus Notes to Exchange Migration or NSF to PST conversion. I know I was looking for a free solution on the Internet, and didn't find one. If the Notes client has an open API, perhaps some nice Open Source programmer will write a free converter. Until then, however, this is an inexpensive solution.

September 20, 2005

Artifact of a frightened populace

Metro stations in DC still haven't done anything about these welded shut newspaper boxes at the stations. While it may lead to more security, it has also led to dirtier stations since our nations newspapers are now handing out thousands of 'Express' copies to daily commuters. At this juncture they may just as well remove the welded doors entirely, giving the papers away without leaving them strewn all over the floor in the morning.

Time for REAL tort reform

The "New American Rule" is a proposed tort fee rule that would require lawyers to disclose their hourly rates to clients who may be contingency clients. An editorial in todays Washington PostTimes explains that this proposed new rule could help control unreasonable lawyer fees by exposing greed and giving control to consumers after a case is won. But does it go far enough? Hardly - part of the problem is that the consumer is just as greedy as the lawyer in question. Why wouldn't they agree to such rates in a 'roll-the-dice' situation as long as their own end were served? What the proposal lacks is the capping of 'reasonable' fees at such a point that extremely ridiculous cases are too risky even after factoring in potential rewards. Only then will the crap shoot be curtailed!

September 19, 2005

It seems to me that whenever i'm in the city i see an ambulance rush by. I can't help wondering about who and why. It makes life seem all the more real, a feeling you don't get in the sterility of the suburbs. I'm now blogging from my new cellphone, at least while the novelty lasts.

September 12, 2005

Busy busy busy busy

Life can be so busy. Of course, it's busier when you're addicted to a video game that sucks hours from your life. My level 44 Necromancer, Detestoruuk, on the Everquest Cazic-Thule server may not be much of a legacy, but I'm having fun playing the toon. Yeah, I know, I gave up playing Everquest, but I'm back. I don't know what it is about the summer that makes me log back in, but it does. I'm doing my best to not stay up until 1 in the morning playing, though. Getting to bed at a reasonable time is definitely a goal for me this time around.

My chess-playing has been suffering a bit, since I'm not studying as much. But that's alright. When I lose a game, though, I can see where I've lost it, and it's usually a fairly blatant error. I can hold my own against most beginner players, and I'm all right with that.

We've been busy at work, with lots of projects coming to a peak all at once. It's definitely feast, not famine, at the moment. You know how work can ebb and tide.

As usual, the life of a suburban dad is too full. While I've given some thought to cashing in and moving to a simpler existence, life is just too busy at the moment. I don't even have time to catch up with all of my favorite hobbies. I really could use some focus.