Hi
I have two frames, top and bottom. In the bottom I have a document created with that acts as a preview and is build with info from the top and other settings.
both, the top form and the bottom form theire fore and background vars are globaly dimensioned.
uidocTop - docTop
uidocBot - docBot
In the top I have a print button with the following script - uidocBot.Print.
But when i want to use that button I get the top part printed. I see that the uidocBot is changed to the same as uidocTop.
How can I solve that? Or is there a another solution to do this?
Subject: print document from other frame
what you can try is this
create a public function in a lib or inside your document.
Public Function PrintDocHandle ( inputType As Variant ) As NotesUIDocument
Static uidoc As NotesUIDocument
If Datatype ( inputtype ) < 2 Then
Set PrintDocHandle = uidoc
Else
Set uidoc = inputType
End If
End Function
you call this at the moment that you create/open the form with
Dim res As Variant
Set res = PrintDocHandle ( uidoc )
in your print button you call
Sub Click(Source As Button)
Dim uidoc As NotesUIDocument
Set uidoc = PrintDocHandle ( NULL )
Call uidoc.Print()
End Sub
HTH