Does anyone know of a way to print a report that has been opened in Preview mode - but Hidden - using VBA?
I'm using a function to output a report to a pdf file, in the process specifying the report name and the path it's to be saved to.
However, I need to get the report's caption, as it is set dynamically on the report's Open event - the caption includes some parameters.
So I'm opening the report in Preview (windowmode=Hidden), and getting the report's caption.
However, when I use ...
... I get the Print Dialog, which I don't want, as it should be output automatically by the function to the pdf file.
Other than that, the function works AOK, just can't seem to avoid the unwanted Dialog box.
Any ideas pls?
MTIA
Max Hugen
Australia
I'm using a function to output a report to a pdf file, in the process specifying the report name and the path it's to be saved to.
However, I need to get the report's caption, as it is set dynamically on the report's Open event - the caption includes some parameters.
So I'm opening the report in Preview (windowmode=Hidden), and getting the report's caption.
However, when I use ...
Code:
DoCmd.RunCommand acCmdPrint
Other than that, the function works AOK, just can't seem to avoid the unwanted Dialog box.
Any ideas pls?
MTIA
Max Hugen
Australia