Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
can't print to adobe acrobat | Charts and Charting in Excel | |||
Print to PDF through Acrobat 6.0 | Excel Programming | |||
excel/vba & acrobat 7.0 pro - Print multiple sheets to 1 PDF | Excel Programming | |||
Print Acrobat Reader PDF file from VBA | Excel Programming | |||
Print to Adobe Acrobat (2 ws to one file) | Excel Programming |