Help!! - Automate PDF printing in VBA
Posted by JJ on August 21, 2001 11:11 AM
I am trying to print out an excel sheet to a PDF file. I would like to give the PDF file a name XXXXXX.pdf where XXXXXX is the value of cell A1 without touching the PDF file dialoge box. How can I do this is VBA?
I have tried
Application.ActivePrinter = "Acrobat PDFWriter on LPT1:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"Acrobat PDFWriter on LPT1:"
and then use something like:
pdfname = activecell.value
outputFilename = pdfname + ".PDF"
can someone help???