Help ... help ... help ...
I'm trying to create a doclink linking a piece of mail in my mail db to
a document stored on a local db. End result will be that the user looks
at a document in the database HotLineD, that will contain a Doclink to
document in the mail db.
I run an agent that runs the following script :
Sub Initialize
'set up for document in my mail db
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument
Set dc = db.AllDocuments
Set doc = dc.GetFirstDocument()
Messagebox "Universal ID: " & doc.UniversalID
'set up for document in the HotLineD database
'
Dim db1 As NotesDatabase
Set db1 = session.GetDatabase( "", "HotLineD.nsf" )
Dim doc1 As NotesDocument
Set doc1 = db1.GetDocumentByUNID( "FADA238EB3DDD008852563AE00668966")
Set rtitem = New NotesRichTextItem( doc1, "Linkhere")
Call rtitem.AppendDocLink(doc, db.Title)
Call doc1.Save( False, True )
End Sub
I'm able to find the document in HotLineD and able to append something
to it, but no DocLink icon shows up. I say "append something" because if
I check the field properties for the HotLineD document, I see the field
"Linkhere" twice -
it's listed first as :
Field Name: Linkhere
Data Type: Rich Text
Data Length: 68 bytes
Seq Num: 8
Dup Item ID: 2
Field Flags: SIGN SEAL
and then again as :
Field Name: Linkhere
Data Type: Rich Text
Data Length: 0 bytes
Seq Num: 8
Dup Item ID: 1
Field Flags:
The document appears to be unchanged. What am I doing wrong ? Am I
expecting more than what Notes can supply ? I'd like to create a
doclink with LotusScript in the same manner as Notes does it with
"Copy as Link" and paste.
Does anyone know what the "Field Flags: SIGN SEAL" is ? Any thoughts
why it is appearing twice ?
Thanks for any help ... I'm going nuts here ...