I have created an Action button on the Memo form in my mail file (which is based on the StdR85Mail template). The idea is to automatically print email messages to a defined printer without having to go through the Print dialog.
Has it been any solution to that? I also have this frustrating problem with 8.5.2. I’m using the NotesUIDocument.print function to print to a PDF printer when a user presses a button. With 8.5, we didn’t notice any problem. But with 8.5.2 I have the same problem metionned above. Maybe a coincidence.
On some documents, I can see the print dialog popping up and crashing my automated process. I’m using these options to call the print function:
Subject: solution for older Notes versions, too…try a different PDF printer.
I found Bullzip PDF printer years ago as a PDF alternative. Lately, I was able to find a document that the Excel VBA guys use to automate the printing. I adapted it for Lotus Documents in the UI with older Notes version.
The Bullzip drivers allows you to define an object with settings that suppresses the pop-up. If it is selected as the default printer, the uidoc.print(1) seems to work well. Otherwise, you will have to use later version of Notes to select the print driver (or use some external calls to W32 DLL for printer selections).
If helpful, the following seems to work well for me, if you install the Bullzip PDF printers and use it with Notes:
'...get uidoc...and set sFileName
Dim oPrinterSettings as variant
Dim oPrinterUtil as variant
Set oPrinterSettings = createobject("Bullzip.PdfSettings")
Set oPrinterUtil = createobject("Bullzip.PdfUtil")
oPrinterSettings.Printername = oPrinterUtil.DefaultPrintername
oPrinterSettings.SetValue "Output", sFileName
oPrinterSettings.Printername = oPrinterUtil.DefaultPrintername
oPrinterSettings.SetValue "ConfirmOverwrite", "no"
oPrinterSettings.SetValue "ShowSettings", "never"
oPrinterSettings.SetValue "ShowPDF", "no"
oPrinterSettings.WriteSettings True
Call uidoc.print(1)
1 - This bug does not occur if you use nlnotes.exe (avoid the loading of eclipse). Notes gets faster and lighter. The only problem is that it will not have support for composite applications.
2 - Capture the window and treat it inside windows. It is a little tricky. I started doing this, but stopped because my client uses nlnotes. Up to now, my code wait for the print window to appear, and then SendKey to it. In C, with Windows api, you should be able to grasp the InitDialog message (opening the printer yourself and returning it’s value), but it is not easy to do.