HiHave problem to include doclink im my script, a get a Type mismatch.
Could anyone see what a did wrong.
===============
Sub Initialize
Dim session As New notessession
Dim ws As New NotesUIWorkspace
Dim server As String
Dim doc As NotesDocument
Dim memoDoc As NotesDocument
Dim item As NotesItem
Dim db As notesdatabase
Dim collection As NotesDocumentCollection
Dim rtlink As NotesRichTextDocLink
Set db = session.CurrentDatabase
Set collection = db.UnprocessedDocuments
'Control if there is more then one document selected
If (collection.count>1) Then
Msgbox "You have more then one document selected!", 0+16,"Security Violation"
Exit Sub
'Control that you have select one document
Elseif (collection.count<1) Then
Msgbox "You must select one document"
Exit Sub
End If
Set doc = collection.GetFirstDocument
server = db.Server
' Create document an copy values
Set memoDoc = db.Createdocument
memoDoc.SendTo = ""
memoDoc.Subject = doc.DocNumber
Set item = New NotesRichTextItem( newDoc, "Body" )
Call memoDoc.AppendDocLink( db, db.Title, "Database link")
memoDoc.form= "Memo"
Call memoDoc.MakeResponse(doc)
Call ws.EditDocument(True, memoDoc)
End Sub
===============
Kind regards
Fredrik