I have an action button using @Command([FilePrint]) with parameters as follows:-
@Command([FilePrint]; “”; “”; “”; “”; “”; “frmP”; “”; “”; “”; “”)
However, the specified form is completely ignored and the document is simply printed using it’s own form. Anyone else experienced this or know of a workaround?
Thanks
Subject: @Command([FilePrint]) with formname
Is the form a document or a response?
Does the following work instead:
@Command([Compose]; “frmP”);
@Command([FilePrint]; 1);
@Command([FileCloseWindow])
If not then it is something to do with your form.
Subject: @Command([FilePrint]) with formname
Hello
If your form is open, then the form name parameter is ignored…but if used in a view, it should work.
Subject: RE: @Command([FilePrint]) with formname
The action is on a form - I’ll try it from a view - thx.
Is there a way to achieve this from within a form?
Subject: RE: @Command([FilePrint]) with formname
Managed to create an action on the form to print the current document with a different form using LotusScript :
Dim ws As New NotesUIWorkspace
Dim uidb As NotesUIDatabase
Dim uiview As NotesUIView
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim sPartyNo As String
'Get key value from back-end document
Set uidoc = ws.CurrentDocument
Set doc = uidoc.Document
sPartyNo = Cstr(doc.PRTY_NUM(0))
'Open view and locate the current document based on key obtained above
Set uidb = ws.CurrentDatabase
Call uidb.OpenView("vwCP", sPartyNo, True)
Set uiview = ws.CurrentView
'Print the selected document using an altenative form
Call uiview.Print(1,,,,,"BAUFormDisplayPRINT")
'Close the view
Call uiview.Close
Surprisingly you don’t actually see the view opening in the client, which was an added benefit for me.