View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Brotha Lee Brotha Lee is offline
external usenet poster
 
Posts: 43
Default ActiveWindow.SelectedSheets.PrintOut - Print to single workbook

Hi KateB,

I think the solution will not be in VBA but in your printer settings. Most
of the PDF printers have options there how to print out document (merge of a
separate sheets). I think a good dig around in your printer settings will
solve the issue.

Regards,

Brotha lee

"KateB" wrote:

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