Change QueryOpenDocument Event

I have a view from which I do not want users to be able to double-click to open the document. However, I do want them to be able to open the document with an action button.

Subject: Change QueryOpenDocument Event

Sub Queryopendocument(Source As Notesuiview, Continue As Variant)

Continue = False

Msgbox “Please use action button to open document”, 64, “Open document”

End Sub

HTH

Adi

Subject: RE: Change QueryOpenDocument Event

When I added the code you suggested. The message comes up even when I use the action button.

Subject: RE: Change QueryOpenDocument Event

Do this:

Sub Queryopendocument(Source As Notesuiview, Continue As Variant)

Dim ns As New NotesSession

yes$ = ns.GetEnvironmentString("OpenDocument", False)

If yes$ = "" Then

	Continue = False

	Msgbox "Please use action button to open document", 64, "Open document"

End If

Call ns.SetEnvironmentVar("OpenDocument", "", False)	

End Sub

Now add an action button to your view with this Formula:

@SetEnvironment(“OpenDocument”; “Yes”);

@PostedCommand([EditDocument]; “0”)