Subject: Doclink (SOLVED)
Hi all,
here is my solution :
i create a new document;
from a button, i get a handle on the docs for which i want to create doclinks (with picklistcollection method) ;
i create a new temporary document (backend) from a form that contains 1 richtext field;
then, i cycle through the documents (from the picklist) and i create the doclinks(with appenddoclink method) in this richtextfield;
when i’m finished populating this field, i save the temp doc and get a handle on it in edit mode (set newuidoc = ws.editdocument(true,tmpdoc));
the, i goto the field and copy it’s content;
close the newuidoc;
i then get back the handle on my current uidoc;
goto my richtext field;
and paste the data;
here is the sample code :
Set uidoc = ws.CurrentDocument
Set doc = ws.CurrentDocument.Document
Set Collection = ws.PickListCollection( 3, True, servername, filename, ViewName, “select”", “select the doclinks” )
Set colldoc = Collection.GetFirstDocument
Set newDoc = New notesdocument(db)
While Not colldoc Is Nothing
Dim rtitem As NotesrichtextItem
Set rtitem = New notesrichtextitem(newdoc, "liens")
Call rtitem.AppendDocLink(colldoc,"test")
Call rtitem.AddNewline(1)
Set colldoc = Collection.GetNextDocument(colldoc)
Wend
If collection.Count > 0 Then
newdoc.form = "links"
Call newdoc.save(True,True)
Set newuidoc = ws.EditDocument(True,newdoc)
Call newuidoc.GotoField("liens")
Call newuidoc.SelectAll
Call newuidoc.Copy
Call newuidoc.Close
Call uidoc.GotoField("my richtext field")
Call uidoc.Paste
End If
juste create an agent that delete the temp docs !!! Voilà !!
Hope’s this helps someone !!
PLEASE : respond to this thread if this helps as i am quite proud of my solution !!!