Q
Problem solve Get help with specific problems with your technologies, process and projects.

Finding the properties of a doclinked Lotus Notes document

SearchDomino.com expert Cregg Hardwick explains different options for retrieving the properties of a doclinked Lotus Notes document in Domino R5 or Domino R6.

I'm trying to follow a doclink in LotusScript (Domino R5). I want to get the properties of the doclinked document. For example, I have a mail(mail1) with a Lotus Notes doclink that is another mail(mail2). I want to copy the body of mail2 in mail1.

To do this, you really need to use the NotesRichTextDocLink class available in Domino R6. This gives you exactly what you are looking for, and the Domino R6 Help contains reasonably useful examples. For a Domino R5 solution, you may have to buy the Midas Rich Text LSX Toolkit from Genii Software, which provides advanced access to Rich Text field properties.

If neither of these is an option, I would suggest you get a copy of the Lotus Notes XML Toolkit. I can no longer find a link to this download, as IBM is more aggressive about pushing us to upgrade than Iris was.

At any rate, using the DXLexporter class exposed by the toolkit, you should be able to dump the Lotus Notes document in question (Memo1) to an XML file. You can then parse the file looking for a node that looks something like this:

<noteinfo noteid='2534a' unid='6D19CA3D04611C288625705B0055F690' sequence='2'>
<created><datetime dst='true'>20050812T103856,80-05</datetime></created>
<modified><datetime dst='true'>20050812T103906,48-05</datetime></modified>
<revised><datetime dst='true'>20050812T103906,47-05</datetime></revised>
<lastaccessed><datetime dst='true'>20050812T103906,47-05</datetime></lastaccessed>
<addedtofile><datetime dst='true'>20050812T103906,02-05</datetime></addedtofile>
</noteinfo>

Then, its a few simple steps to get the target Lotus Notes database, get the link target and render it into a new e-mail using the RenderToRTitem method of NotesDocument. Hopefully, you or one of your colleagues already has a copy of the Lotus Notes XML Toolkit. If you have trouble finding it, you might consider routing the e-mail through a mail-in database in a DominoR6 server.


Do you have comments on this Ask the Expert Q&A? Let us know.

Dig Deeper on LotusScript

SearchWindowsServer

Search400

  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/Search400.com community. These cheat ...

  • HTML cheat sheet

    This is a really cool cheat sheet if you're looking to learn more about HTML. You'll find just about everything you every wanted ...

  • Carol Woodbury: Security

    Carol Woodbury

SearchDataCenter

SearchContentManagement

Close