LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
al al is offline
external usenet poster
 
Posts: 363
Default Print to PDF with Acrobat 7.0

You should not be prompted for a file. They command supplies the file name.
You have something wrong in the syntax.

What I found was that this entire command could not be continued to multiple
lines and work properly. My guess is that if your command is on multiple
lines and your last line is the file name it's not reading that line as part
of the command. Try bunching it together on 1 line.

Did you compile the code (Debug, compile)? Was compile successful?

"Richard Ward" wrote:

I got all the way through the code, I even got prompted for a file name (I
didn't expect this) and there was nothing in the "in" or "out" folders.

"Al" wrote:

Your code looks good. I copied it and tested it. It worked fine. These are
the few changes I made:

ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:="PScript",
PrintToFile:=True, Collate:=True,
PrToFileName:="C:\ReportFiles\in\TestPrintFile.ps"

Are you sure your code is getting to this statement? You might try stepping
through the code to verify.

"Richard Ward" wrote:

I followed the intructions provided, the macro runs, but there is no output
file in the in, or out folder. Here is what I have:

Application.DisplayAlerts = False
Application.Run "PERSONAL.xlsb!QuoteAge24"
Sheets(Array("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11",
"12", "13", "14", "15", "16", "17", "18", "19", "20")).Select

ActiveWindow.SelectedSheets.PrintOut Copies:=1,
ActivePrinter:="PScript", PrintToFile:=True, Collate:=True,
PrToFileName:="C:\ReportFiles\In\TestPrintFile.ps"


Sheets("Pivot").Select

"Richard Ward" wrote:

I have Adobe Acrobat 7.0 which is set as my default printer. I need to know
how to change the name of the print out after a macro is run changing the
data. What I have so far:

Application.DisplayAlerts = False
Application.Run "PERSONAL.xlsb!QuoteAge24"
Sheets(Array("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11",
"12", "13", "14", "15", "16", "17", "18", "19", "20")).Select
Sheets("1").Activate

ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:="Adobe
PDF on Ne04:", Collate:=True
Sheets("Pivot").Select


I have tried several ways of adding the file name/location for the output
with no success.

Any help would be appreciated.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
can't print to adobe acrobat georgef Charts and Charting in Excel 2 July 4th 08 04:52 AM
Print to PDF through Acrobat 6.0 cooter24[_3_] Excel Programming 3 May 3rd 06 08:09 AM
excel/vba & acrobat 7.0 pro - Print multiple sheets to 1 PDF Gixxer_J_97[_2_] Excel Programming 0 December 9th 05 07:31 PM
Print Acrobat Reader PDF file from VBA Matthias Claes Excel Programming 1 October 28th 05 10:02 AM
Print to Adobe Acrobat (2 ws to one file) Michael McClellan Excel Programming 2 June 2nd 04 10:10 AM


All times are GMT +1. The time now is 09:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"