PDFing an Excel Workbook

  • Thread starter Thread starter Daniel Bonallack
  • Start date Start date
D

Daniel Bonallack

I'm trying to print selected Excel sheets to Acrobat
Distiller, with an instruction of where to save it.

This line creates a pdf file in the right place, but it
can't be opened by Acrobat.

ActiveWindow.SelectedSheets.PrintOut Copies:=1,
ActivePrinter:="Acrobat Distiller on Ne08:",
PrToFileName:="c:\myFiles\test.pdf"

This line creates a pdf file that is perfect, but I have
press the save button on the dialog box myself.

ActiveWindow.SelectedSheets.PrintOut Copies:=1,
ActivePrinter:="Acrobat Distiller on Ne08:",

Can someone tell me how to make the first command work so
that I can print 90 files without having to hit Save 90
times? (I know I've asked this before, but was not able
to implement the answer satisfactorily).

Thanks
Daniel
 
Dan,

The problem is that you cannot specify via Excel where to
create the PDF file. That PRtoFileName parameter is
actually creating a postscript file. That's the reason
Acrobat can't read it.

If you don't to be prompted for a filename you must set
this option via the printing preference of the Acrobat
Distiller printer or Acrobat PDF printer depending on the
version of Acrobat you have. By default "prompt for
filename" is checked. If you uncheck this it will print
to the logged on user's desktop. If you wish you print to
a very specific location, then you need to create a new
port for the Acrobat printer. By default the port points
to C:\documents and settings\all users\desktop. Again
change this under the PDF printer's properties.

-Tim
 
Back
Top