Thursday, May 19, 2011

How to Do a Mail Merge to Email using Lotus Notes - Version 2

I wasn't happy with the usability of my last post, so I've redone it as a presentation.

You can view it fullscreen here;

or embedded below.

How to Do a Mail Merge to Email using Lotus Notes

Why do one?
In today's "green" world, it makes much better sense to send out emails than letters but you still want to personalize them. Sadly, by itself Lotus Notes doesn't support mail merge to email. Of course, we know that outlook does (but then it lets anyone and anything send emails for you - even when you don't want them to).

So, how to do it in Notes?

The first port of call is OpenNTF ( This place is full of great things but most of them are really badly documented. Still, these guys give things away for free and they develop in their spare time, so we should be grateful for what we get.

There's a great little project there called MailMerge Excel to Notes. Go there, click on releases and download the ZIP file.

Getting to the Code
The installation is tricky though I've noted that since I asked the author about the install, it's been updated (so maybe these steps are less necessary).

Unzip the files to somewhere on your hard drive (eg: C:\temp). The version I downloaded had three files;

  • MailMerge-CreateMerge.lss
  • MailMerge-SendMerge.lss
  • Lotus Notes Mail Merge Function.docx

The LSS files are not viewable in Notepad (not sure if this is a problem with those particular files) and I couldn't find any means of importing them into an agent. If you attach them to a mail message in Lotus Notes though, you can right-mouse click on them and choose VIEW.

From there, you can copy and paste them.

I copied and pasted both LSS files into text files for easy reference.

Creating the Agents
1. Open your mailbox in Lotus Domino Designer

2. Expand Code and double-click on Agents.

3. Click the Button marked New Agent

4. Give the Agent a Name, (Either Mail Merge\Send Mail Merge or Mail Merge\Create Mail Merge depending on which agent you're putting in). You're going to have to do this twice anyway.

5 . The new agent will start with a bit of comment code in it. Just highlight and delete it

6. Copy and paste the entire code of the relevant LSS file out of notes viewer (or notepad). Don't worry, the routines should all find their correct places.

7. Depending on how things go, you might end up with errors (I obviously did). These aren't code errors but are either related to the way that the Notes viewer displays things or the way it pasted from Notepad.

To fix these errors, follow the little red circles with crosses in them.

Wherever you find a line which ends in &_ the notes client expects a line immediately below it. My paste had blank lines - so I just removed them all.

8. When the Agent is free of errors, press Ctrl+S to save. If it saves ok, you can close it and repeat steps 2 - 8 for the other LSS file.

That's it. You're done with the Installation.

Preparing your Spreadsheet
The spreadsheet is simply and excel spreadsheet with TO SUBJECT FIRSTNAME and whatever other columns you want to merge. Note that I left off the CC column (it still works but it's probably better to include one).

Save your spreadsheet as an Excel File (eg: C:\temp\Merge.xls)

Preparing the Email
Next, we go into Lotus Notes and write an email. Don't bother with the TO, CC or SUBJECT because they'll be overwritten.

Just write your email and if you want to include any fields from your spreadsheet, just add them in square brackets.

Save your new email as a draft and close it.

Generating the Merge
Go into the drafts area of notes and make sure that you've got the right draft selected. Then choose Actions, Mail Merge and then Create Mail Merge.

You'll be prompted to select the file which contains the mail merge data. Browse for the excel file you saved earlier.

You'll get a nice little warning screen (if you forget the CC) and you'll get an ID for your mail merge. Make sure that you write this number down somewhere.

Click Ok to Continue.

Hopefully you'll get a message that says that you encountered 0 errors.

Your drafts area will also get a bit busier because there'll be more documents in it.

Sending the Messages
I'm guessing that you could send the messages individually if you wanted but it's best to simply select all of the documents in the draft area. You can do a Ctrl+A and even select those which aren't in the merge (they won't be sent).

From the menu, select Actions, Mail Merge and then Send Mail Merge.

You'll be prompted for the ID number that you wrote down earlier.

When you click Ok, your emails will be sent.

Final Bits
Just a reminder, before you send to a large group of people, make sure that you do a test first and make sure that you remove any test text from your email and spreadsheet - we all know about the "Dear Rich B@st@rd" letters that one particular UK bank sent out years ago.

Thank You
Finally, a really big thank you to David Turner and Sacha Chua for developing such a worthwhile project. IBM ... this should really be a feature in the default Notes Mail Template.

BTW: I used Version 1.0 of the Mail Merge utility, Notes 8.5.2 and Office 2003 to do this.

Tuesday, May 17, 2011

How to Turn off Local Encryption by Default in the Notes 8.x Client

What's this All About
If you have a test environment for your Lotus Notes applications, then chances are that you regularly find yourself copying (not replicating) from Production to test - and probably via a Local connection.

If you do this a lot, then chances are that at some point you've forgotten to deselect the default local encryption. This is a great security feature but it's quite embarrassing when you arrive at your test site with a database which won't open.

Did you know that you can change the default. It happened sometime in release 8.x but I don't know exactly when. I just know that I changed it a while ago and a few times since I've had developers express surprise because they didn't realize that we now have that feature.

Here's How to Turn it Off by Default
In your Notes client;
  1. Click File then Preferences from the Menu
  2. On the left hand side of the preferences screen, expand Replication and Sync.
  3. Click on Default.
  4. In the middle of the Preferences Panel, deselect [_] Encrypt Locally Using.
  5. Click the button marked Ok.
  6. The Change will take place immediately.

Thursday, May 12, 2011

If you were buying a PC today...

I'm often asked to tell people what to look for in a PC and recently I was asked to provide something in writing for all our staff members. These people aren't serious gamers and generally aren't all that computer literate (or computer-adventurous for that matter). I thought I'd share it with the rest of the world.

Note that prices are in Australian Dollars and specs are as at 11 May 2011. I've ignored netbooks even though I personally find them cool. I've also mostly ignored non-windows platforms because as I said, these people aren't adventurous. Finally, where I've mentioned brands it doesn't particularly mean that they have my overall endorsement or condemnation. It's just my experience with them - and the "vibe" I get from other people who use them.

What for?
Throughout this document, you need to be thinking about the use to which you intend to put your computer. Is it just an office machine? Is it only for the internet and word processing, spreadsheets etc or will you want to run specialised software on it, like MYOB. Will you be running games? If you have kids, how long do you expect your computer to last and will you eventually give it to them for games?

There are three main systems for computers; Windows, Mac and Linux.

You don't need to buy a Windows computer. The other types will run office applications and the internet just as easily. It's mainly a matter of choice.

If your computer will be used for games other than simple ones like solitaire and Angry birds, then you probably need to go Windows. Games run well on the other systems but there's much less choice.

Mac and Linux computers are safer than Windows ones but nothing is 100% safe and they'll still need protection (anti-virus, firewalls etc). Don't let any vendors tell you that it isn't needed.

If you choose an alternative system to windows, you'll still be able to run windows on that device too. Macs and Linux PCs can "dual boot" allowing you to choose which system you want to run and both can also run virtual machines (ie: a Windows PC in a window).

Macs are generally well known for their speed and ease of use while Linux computers are known for their speed and security.

Windows XP is no longer being sold, so you can't buy that. It's immediate successor Vista should not even be considered. Windows 7 is much better. It's important though to make sure that you get 64 bit windows 7, not 32 bit. The 32 bit windows 7 will only use between 2 and 4 GB of memory regardless of how much is installed in your system so you'd have to convert someday. It's better to start off converted.

Brand Names
HP is arguably the best brand of PC at the moment with Sony being the best notebook brand.
Other good brands include Dell, Lenovo and Toshiba (notebooks only).

Acer and Asus are lesser brands but still good.

Most computers these days are built by the lowest bidder in a single factory. The main differences are in the casing and the brand label. Internally, they're all quite similar.

While you can go for a no-name brand, this will reduce your costs but increase risk. It's not recommended.

Desktop Computers typically cost between $700 and $2,000. You should not pay outside this range. Notebook Computers are always more expensive and typically range from about $1,000 to $3,000

The current intel processors are expressed in terms of Core I series.

As a general rule, the I7 is more powerful than the I5 but actually any of the I-Series processors is fast enough for all but the heaviest CAD/Design and video editing usage.

So long as you get an I Series, you'll be ok.

Most computers these days are being sold with about 2GB of Memory. This is not nearly enough. You should consider 4, 6 or 8 GB of memory. Memory is installed in "slots". If you're going to stay with 2 or 4 GB, you should talk to the computer salesperson to find out if there will be spare slots. If there are no spare slots then you'll have to throw the old memory out and buy all new memory once you decide to upgrade.

Since smaller amounts of memory are often cheaper, you may find that a PC with four slots and 4 GB of RAM uses 4 x 1 GB sticks. This means that you're at your limit. If you later decide to upgrade to 8GB, you have to throw all your memory out and buy 4 x 2GB chips. On the other hand, if your system was originally populated to 4GB using 2 x 2GB sticks, then you've got two slots free and you just need to buy an additional 2 x 2GB sticks when you're ready to upgrade.

Hard Disk
Most computers these days are shipping with about 160 GB of hard drive space. For most users, this is ample though Gamers and video editors may want a little more. 160 GB should store all of your documents and music without any trouble.

If you're planning to store a lot of video there (ie: saving your whole DVD collection on hard drive), then you'll probably want to consider more. It's not a great idea though because you'll still have to back it up. Instead, consider getting a couple of 2 Terrabyte USB hard drives ($120 each). You can back all of your data up to them. Note that I said TWO - that's because you'll want one for "real" and one as your backup.

While I'm on this point, you'll need to learn how to disconnect your USB drives. It's not just a matter of pulling out the stick. If you keep doing that, you'll eventually corrupt the data on the drive.

Network Card
All computers these days should ship with a gigabit network card. This should be sufficient. You might also want a wireless card added particularly if you're using a notebook. I haven't seen a wireless card in a recent computer which doesn't comply with standards so any new card should be ok.

Sound Cards
The sound cards which ship with modern computers should be perfectly adequate unless you're planning to use your computer to replace your entertainment system. In that case, you'll probably want to check for DTS and Dolby Digital 6.1 sound.

Video Cards
This is the biggest trap in new computers today!

If your computer isn't going to be used for gaming or design then the video card that it ships with is fine. If you're a gamer however, you'll need to get a decent graphics card.

It doesn't end there though because although you can easily replace most of the other components in your computer, the video card usually needs a dedicated slot. You'll find that many computers including the big brands like Dell will skimp on the slot if they don't have to supply a card.

If you're planning to add a game card later, make sure that you inspect the computer's motherboard to ensure that there is a slot available for you. Get the salesperson to help. These days, the slot is called a PCIe slot.

At the minimum, you'll want a "DVD Burner" DVD-RW, DVD+R etc. This ensures that your computer is capable of reading and writing DVDs and CDs. You might want to pay extra to get blu-ray capabilities particularly if you like watching movies on your computer. If you've got spare money, a Blu-Ray writer may come in handy.

Other Slots
Most of the other slots on your computer are pretty much the same from one computer to the next but you'll want to check that you have enough USB slots and that they support USB 3.0.

You should have about 4 USB slots in the back of your computer two in the front. That's the minimum. More is even better. Don't make it a deciding factor though because so long as you've met the minimum, you can easily add more via a little gadget worth about $10.

If you've got a digital camera, you might want to check to see if the computer has slots for these cards (Usually SD, MicrosSD, XD or CompactFlash). It doesn't matter if it doesn't though because an external USB card reader will set you back about $15.

You should also make sure that your computer comes with both a DVI and a VGA video slot. You'll want the DVI slot for higher quality video. Having both also allows you to have two monitors connected if you want.

Bluetooth - this is a good thing to have on a notebook but it's not essential unless you already have a bluetooth device you want to connect.

Aside from Windows, you shouldn't rush out and get software unless you actually need it. Bundles are good but make sure that they're entirely bundled and not just trialware. Microsoft Office and Anti-Virus packages will often ship as trial software and they will stop working after a few months unless you pay money.

The free Microsoft Windows Defender is as good as any anti-virus software on the market today. I know, I've tested it and it found viruses that McAfee missed (on several occasions). Don't be tempted to have Windows Defender AND a commercial anti-virus package on your computer. It won't make it any more secure and it will slow it down.

Microsoft Office isn't free but there are some very good alternative systems which are not only free but also compatible with Microsoft Office. In some cases, they're better (Libre office includes a really good drawing package). They're all easy to use and it's recommended that you check them out before spending money on software you don't need.

Libre Office (Previously Open Office) ( )
IBM Lotus Symphony ( )

Most desktop PCs come with a one-year warranty but a lot of Vendors like Harvey Norman and Dick Smith will offer to extend these for a price. It's usually worth doing but a PC which survives the first year will generally survive for much longer. Check the warranty to see if they'll come out and fix the computer (on-site) or if you have to send it away.

Notebook computers are a different story. You should get the longest warranty possible because these computers are more prone to failure (due to their rougher handling).

Some other Alternatives
Finally, if all you want is the internet, you might want to investigate some other options. Netbook PCs are under $500, Old PCs can be converted to fast internet-only PCs by installing GoogleOS or Ubuntu Linux and then there's the plethora of tablet devices like the iPad and Android. If you're willing to wait until mid-June, Google will have their new PC and operating system out by then.

Best of luck shopping for your new computer.

Tuesday, May 10, 2011

Book Review "IBM Lotus Domino: Classic Web Application Development Techniques" by Richard G. Ellis (Part 2)

In part one of my review, I looked at the opening and closing chapters of this book. They're fairly non-technical and provide a very useful set of guidelines for the development and testing of Lotus Domino applications - and they're just as relevant to XPages development.

In part two, I want to look at the middle chapters. These chapters cover CSS and JavaScript as it relates to forms, views and agents. The book talks about some features which are only available in Notes/Domino 8.5 but it never discusses XPages.

If you're already a domino developer and you're looking to move into XPages, then this book certainly isn't for you. If however, you've been using Notes and want to quickly port some applications to the web or if you're familiar with classic HTML, CSS and JavaScript but want to get some Domino projects off the ground, then this is the right book.

Of course, if you're on a version of notes/domino prior to 8.5 with little prospect of upgrading in the near future, this book will help you to get the best development potential out of your existing systems.

The book offers a lot of great web development advice and code. It covers basic design rules mentioning some stylistic considerations which many web developers seem to overlook. It looks at form validation, usability and export functionality.

The book exposes each increment in usability/design one step at a time. This will provide people new to domino with an understanding of the effect of each of their changes. It's a great way to cover these topics.

There's also a whole chapter dedicated to navigation. It covers action buttons (how to style them, where to put them and when to use them). It provides tips for adding better URLs to your applications and provides some great coverage of the "go forward" navigational strategy.

This is a really good book with great explanations and good technical detail. If this book had come out three years ago, it would have been a bestseller. Sadly though, XPages is taking over (at least in the minds of cutting domino developers) and this dates the technology in the book a little.

If you're not going XPages yet and you're interested in classic domino development, then this is easily the best book I've seen on the subject.

IBM Lotus Domino: Classic Web Application Development Techniques is available from Packt Publications and Amazon.

Honesty Clause: I was provided with a PDF version of this book free of charge for review purposes.

Thursday, May 05, 2011

Book Review "IBM Lotus Domino: Classic Web Application Development Techniques" by Richard G. Ellis (Part 1)

I'm doing this review in two parts because the opening and closing chapters of this book are vastly different from the rest.

I have to admit to wondering, when I was first asked to review this book, exactly what the market was that it's aimed at. After all, aren't all domino developers heading towards XPages now? Could a book on "traditional web programming in domino" still be relevant today?

Well, surprisingly it is.

The opening chapters deal with issues and requirements that our developers and I still constantly struggle with . They cover version control, issues logs, staging servers, commenting/documentation, standards and the big killer "scope creep". There are sections on using the "champions" in your office to drive projects, maintaining consistent URLs and setting up a developer test environment.

These are aspects which affect all domino development regardless of the technology level (XPages, Notes, Pure HTML or JavaScript/CSS). If you regularly contract domino developers to develop applications for your environment, those first chapters are absolutely required reading. They're not overly technical and are very suitable for management level reading.

The last two chapters of the book cover Security, Performance, Testing and Debugging. Again, these are mostly high-level. The security sections discuss planning for security, ACLs, reader and editor fields, the problems of hidden fields and sensible additions such as edit prevention after approval and logout facilities. The performance sections discuss archiving, code optimisation and the measurement of response time. The testing and debugging chapter talks about the requirements and limitations of user-testing and suggests various ways this testing could be improved. There are also some great sections on debugging which will help those new to domino to track down issues in their applications.

As for the rest of the book, I'll cover it in part two of this review suffice to say that a long time ago, my favourite domino book was a web development guide written for release 4. The book was amazingly useful all the way up to release 6.5. This book feels, in every way, to be a sequel to that book, picking up more or less where it left off and delving into CSS and JavaScript with a specific domino slant. All that's missing now is a book which covers XPages as neatly.

This isn't a book for the seasoned domino developer but if you're new to Domino or new to CSS and JavaScript or if you're a technical manager overseeing domino web development projects then this book is definitely for you.