View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
KateB[_2_] KateB[_2_] is offline
external usenet poster
 
Posts: 15
Default ActiveWindow.SelectedSheets.PrintOut - Print to single workbook

Can anyone give me a hand, I'm trying to print the last two pages of a
workbook to a single pdf (i.e. not one pdf per worksheet).

I've had a good dig around the forum & found this code.

ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True

Strangely it worked on my "test" book (which just had a bit of text on
two sheets), but when I use it on my actual book, it gives me
individual pdfs. Does anyone know what trips this up? I tried
deleting out the non-printing sheets (not really a solution, but to
see if the problem came from too many sheets) & that didn't work.

We have to loop this code over ~180 workbooks, so not doing it
manually would be a bonus :)

Cheers,
Kate