I have a form that is created from within another form. It is not a response doc, nor do I want it to be. This is in an effort to minimize the size of the originating document. The secondary document contains large graphic files.
I have placed this formula on a button to select the secondary document that contains the request number that it inherited from the originating doc
@Command([FileOpenDatabase]; “” : “” ; “InternalReview” ; Num ; “1” ; “1”)
It does select and display the appropriate document in the InternalReview view. My question is, can I alter or add to this formula to automatically open the document once it is selected?
Thanks in advance
Linda
Subject: Opening a doc programmatically selected in a view
@Command([FileOpenDatabase]; “” : “” ; “InternalReview” ; Num ; “1” ; “1”);@Command([OpenDocument])
Subject: RE: Opening a doc programmatically selected in a view
Thank you 
Subject: Opening a doc programmatically selected in a view
or to do it in lotusScript & close the current (smaller) doc:
Sub Click(Source As Button)
Dim session As New notessession
Dim ws As New NotesUIWorkspace
Dim uiCur As NotesUIDocument
Dim dc As notesdocument ' smaller, open doc
Dim dc2 As NotesDocument ' larger doc you want to open
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Set uiCur = ws.CurrentDocument
Set dc = uiCur.Document
Set dc2 = db.GetDocumentByUNID(dc.Pdoc_Id(0)) 'PDoc_ID being the UNID of the larger doc
If Not (dc2 Is Nothing) Then ' doc found
Set uidoc = ws.EditDocument(True,dc2)
Call uiCur.Close
End If ' parent found
End Sub
or on web:
temp := @Left(HTTP_Referer;“.nsf”) + “.nsf/P_AllBOrig/” + PDoc_ID + “?EditDocument&1”;
@URLOpen(temp)