I created an lookup that loads the doc link of a document from another database. I tihen created a button to open that document link. Currently when I try to run it I get a “Incorrect Argument Type: Object Expected.” It has the error on the last line. I would like to open the document in read mode Any help would be great.
Sub Click(Source As Button)
Dim session As New NotesSession
Dim ws As New NotesUIWorkspace
Dim dbJN As NotesDatabase
Dim dbGEN As NotesDatabase
Dim viewGEN As NotesView
Dim docGEN As NotesDocument
Dim uidocGEN As NotesUIDocument
Dim uidocJN As NotesUIDocument
’ Set Variables
Set dbJN = session.CurrentDatabase
Set dbGEN = New NotesDatabase ( dbJN.Server , "mail\\ntemp.nsf" )
Set viewGEN = dbGEN.GetView ( "by Subjects" )
Set uidocJN = ws.CurrentDocument
Set docGEN = viewGEN.GetDocumentByKey ( uidocJN.FieldGetText ( "POLink" ) )
'Set uidocGEN = ws.EditDocument ( False, docGEN )
Call ws.EditDocument(False, docGEN)
End Sub