ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Printing mulitple times to adobe (https://www.excelbanter.com/excel-discussion-misc-queries/151022-printing-mulitple-times-adobe.html)

TimT

Printing mulitple times to adobe
 
Hello experts,
I'm trying to run a loop/series of print cycles and have the pdf saved to
the hard drive of the user (path is typed out in cell J5 as you will see
inthe code below..)
The code runs nicely and creates the .pdf files but you can't open them
because it says they are corrupted.
Can anyone shed some light on this?
Code below:


Private Sub Print_Click()
Dim i As Integer 'partner number

For i = 1 To Range("J6").Value

Range("B4").Value = i
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Printtofile:=True,
Prtofilename:=Range("J5").Value

Next i

End Sub


All times are GMT +1. The time now is 10:36 PM.

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