Is there a Filename property in PrintOut property

C

Christian

Hi there,
I want to create a macro that will autoselect the Adobe
Distiller printer, then I don't want the popup window of
Adobe asking path and file name. I want to pass it
without seeing this popup windows.

Here my code

Dim strFileName As String
strFileName = "E:\temp\test.pdf"
Sheets("Sheet1").Select
Application.ActivePrinter = "Adobe Distiller Writer
On CPW2:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1,
ActivePrinter:= _
"Adobe Distiller Writer on CPW2:", Collate:=True

In this line ActiveWindow.SelectedSheets.PrintOut I
cannot find any possible value I can use to pass
strFilename.

Is somebody already did something like that?

Thank's

Christian
 
T

Tom Ogilvy

What version of Excel?

In excel 2000 and later, the printout method has the following parameters
for the command:

expression.PrintOut(From, To, Copies, Preview, ActivePrinter, PrintToFile,
Collate, PrToFileName)

I don't know if this works with the Distiller print driver, but if you
haven't tried it, you might.
 
G

Guest

Yes Tom, I tried it and it always popup me the SaveAs
window to in the path from where the excel file has been
open.

May be its because of the adobe printer?
Another idea?
Any help will be appreciated.

Christian Sawyer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top