How to Create DocLinks in RT Field from a DocumentCollection?

I have a button in an application which searches another database based on a user input and then returns a document collection. When the user clicks on OK from the PickListCollection I simply want to append a DocLink to each of the documents in the collection to a Rich Text field with some descriptive text beside each DocLink. Anyone got examples of how this can be achieved?

Thanks.

LMS

Subject: How to Create DocLinks in RT Field from a DocumentCollection?

From the Designer Help:http://www-12.lotus.com/ldd/doc/domino_notes/Rnext/help6_designer.nsf/f4b82fbb75e942a6852566ac0037f284/29bd09138f7c985285256c54004d2acc?OpenDocument

  1. This script creates a new mail memo. In the Body item of the memo, the script places a doclink to each document in the Boots folder in the TEST.NSF database. Each doclink is followed by a tab, the Subject item of the document being linked to, and a carriage return.

Dim session As New NotesSession

Dim db As New NotesDatabase(“”, “test.nsf”)

Dim view As NotesView

Dim newDoc As NotesDocument

Dim rtitem As NotesRichTextItem

Dim doc As NotesDocument

Set view = db.GetView( “Boots” )

Set newDoc = New NotesDocument( db )

Set rtitem = New NotesRichTextItem( newDoc, “Body” )

Set doc = view.GetFirstDocument

While Not ( doc Is Nothing )

Call rtitem.AppendDocLink( doc, db.Title )

Call rtitem.AddTab( 1 )

Call rtitem.AppendText( doc.Subject( 0 ) )

Call rtitem.AddNewLine( 1 )

Set doc = view.GetNextDocument( doc )

Wend

newDoc.Subject = _

“Here are links to all docs in the Boots folder”

newDoc.SendTo = “Lauri Nodwell”

Call newDoc.Send( False )

HTH,

Dan

Subject: RE: How to Create DocLinks in RT Field from a DocumentCollection?

Thanks for this Dan, wondered if this was possible but in the front end, so that when the user closes the PickListColection Dialog box the DocLinks appear in the RT field?

Subject: RE: How to Create DocLinks in RT Field from a DocumentCollection?

You could run your script, populate this on the back end, and then refresh/reload the UI…

Call NotesUIDocument.Reload

Call NotesUIDocument.Refresh

HTH,

Dan