print to pdf: supress dialogue box

  • Thread starter Thread starter k2sarah
  • Start date Start date
K

k2sarah

i would like to print to pdf via the docmd.ouput command. is there a way to
supress the dialogue box, and have it print without interruption
 
k2sarah said:
i would like to print to pdf via the docmd.ouput command. is there a way to
supress the dialogue box, and have it print without interruption

When you say without Interruption I assume that you mean the user's not
prompted for anything?

Stephens has a really terrific solution that allows you to set the output
name in code, and furthermore you don't even have to switch your printer
drivers, you don't even have to install a printer driver, and in fact you
can just have a button to click and you'll resulting will be a PDF a file of
your choice.

you can find his solution here:

http://www.lebans.com/reporttopdf.htm

You might want to expand a little bit more as to what you mean by without
interruption, it's not clear if the if it's simply a little printing
dialogue that appears that is disturbing you, or it is in fact the promps
for the user output file name?
 
i have a vba command

DoCmd.OutputTo acOutputReport, stDocName, acFormatPDF

when code runs, i receive a output to dialogue box which causes user to
press enter. i would like to bypass this. is there any way?
 
Hi k2sarah,

DoCmd.OutputTo acOutputReport, stDocName, acFormatPDF, outputfile

where outputfile is (as Access help states)

A string expression that's the full name, including the path, of the file
you want to output the object to.
If you leave this argument blank, Microsoft Access prompts you for an output
file name.

HTH Paolo
 
Back
Top