View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
TimT TimT is offline
external usenet poster
 
Posts: 69
Default 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