ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Error when printing to Acrobat (https://www.excelbanter.com/excel-programming/286713-error-when-printing-acrobat.html)

Ray Kanner[_2_]

Error when printing to Acrobat
 
The following simple macro (printing out a range called
POut) to a file Sample05.pdf shown here

Sub Macro1()
Application.ActivePrinter = "Acrobat PDFWriter on LPT1:"
Range("POut").PrintOut Copies:=1, _
ActivePrinter:="Acrobat PDFWriter on LPT1:", _
PrToFileName:="Sample05.pdf"
End Sub

gives me an Acrobat PDF Writer Error "Cannot print, file
is already in use or locked", and then a run-time
error '1004' telling me it couldn't be printed due to an
error on Acrobat PDFWriter. The same thing happened when I
tried printing to Distiller instead of PDFWriter. The
Sample05.pdf does not exist prior to running the macro and
I have no trouble sending it to the printer manually from
within Excel.

Thanks in advance.

Ray



DennisE

Error when printing to Acrobat
 
Ray,

I'm no expert on printing to Acrobat, but
when I was recently searching the Microsoft KnowledgeBase for a problem I was
having in printing from Excel, did see many articles about problems of the sort
you're describing regarding the difficulties in printing to an Acrobat printer.

-- Dennis Eisen


All times are GMT +1. The time now is 07:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com