Tuesday, March 20, 2012

Export Lotus Notes documents to Microsoft Word

For a requirement I was looking for exporting Lotus Notes documents to Microsoft Word. I found some help here and here. The former one uses Word.Application while the latter does something with user32.dll. But I was looking for something which was not dependent on external software. Then I came across @Command([FileExport]). A little help from the discussion here, I was able to devise a simple solution to it.

Lets say, you have a form fUserProfile that you want to export to a Word file. First create a copy of that form and name it, say, fUserProfile_Export. In PostOpen event of the fUserProfile_Export form enter the following formula.


Now in LotusScript write something like this.


Put this code in a looping document collection and you can export a bunch of documents at once. Of course then you would need to customize the file path for each document accordingly. But I leave that you!

No comments:

Post a Comment