The Hoju Saram

Friday, September 29, 2006

Forwarding lotus notes documents through outlook.

This database is available here

A couple of months ago, a couple of the businesses I provide IT services to converted from Lotus Notes/Domino to Outlook/Exchange. (I will leave it for another long post to explain the pros and cons of this). As part of this migration they needed a way of keeping some of their existing mail-driven domino apps running (until they could be re-written) even though they no longer had domino mailboxes for the users. I therefore had to come up with a way of sending notes documents through outlook. Most of these systems were mail-in databases, so I just needed a way of allowing users to reply to and/or forward these messages via outlook.

Basically the solution to this is:

a) Create design elements in the notes database to allow for any document to be copied in full to the windows clipboard.
b) Create an agent that when run does the following:

- Detach all of the current documents’ attachments to a temp directory
- Copy the current document to the clipboard, without attachments
- create a new outlook message via OLE
- Fill-in the subject and to fields in the outlook message
- Navigate to the body of the outlook message and paste the clipboard data.
- re-attach the attachments to the outlook message from the temp directory.

It would be nice to be able to automatically send the message from outlook, but outlook security stops you from being able to do this. So the users has to press the button themselves. This is sort of useful in case the receipients notes common name does match their new name in the Exchange GAL.

There is a link to a database containing this code at the top of this post. To get this to work in your own notes databases you need to add the “win32 api” script library, the “$ForwardSep” Subform, the “(Outlookforward)” form and both the agents to your database. You then need to copy the 2 action buttons from the memo form.

I have only tested this on outlook 2003, so it may need some tweaking for other versions.

10 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home