Is there a way to format how a document is printed? In other words, can I program only certain fields to be printed and also ignore the background color? Perhaps there a way to make a print button that appears on the document that generates pre-programmed output… like is used on web pages.
Any help in this arena would be appreciated!
…thanks, Paul
Subject: Use a separate form.
Create a separate form for printing.That is the most common way to do it, if you want to do more than just use hide formulas to hide certain elements on teh form.
Subject: Need more detail
Sounds interesting but could you be a little more specific? Do I use an action button to create a form and copy the data I want to print then somehow delete this form?
Thanks, Paul
Subject: You can do it in different ways
It depends on where you have the code, what you want to happen, etc.
But one easy way to do it would be to copy the document to a temporary document in memory, change the Form to the print-only form name, open it using ws.EditDocument, print it and close it without ever saving the temporary document.
Something like this:
Set tmpDoc = New NotesDocument(db)
Call doc.CopyAlItems(tmpDoc, True)
Call tmpDoc.ReplaceItemValue(“Form”,“PrintFormName”)
Call tmpDoc.ComputeWithForm(True,False)
Set tmpuidoc = ws.EditDocument(False,tmpDoc,True)
Call tmpuidoc.Print()
Call tmpuidoc.Close(True)
Something like that, nothing complicated.