Print all charts in a workbook (multiple worksheets)

A

aewsaws

I know there is macro script to automatically print all of the charts on a
worksheet, but is there script or a workaround to automatically print all of
the charts on multiple worksheets in a workbook? I want them to print full
page size, but if I print to a file I need them to print to a single file
(which will yield multiple pages when printed). Thanks!
 
J

John Mansfield

Aewsaws,

This macro will print all of the embedded charts in a workbook with each
chart making up an entire page:

Sub PrintEmbeddedCharts()
Application.ScreenUpdating = False
Dim Sht As Object
Dim Cht As ChartObject
For Each Sht In ActiveWorkbook.Sheets
For Each Cht In Sht.ChartObjects
Cht.Activate
ActiveChart.ChartArea.Select
ActiveWindow.SelectedSheets.PrintOut
Next
Next
End Sub
 
A

aewsaws

Thanks, John, but this script prints each page one at a time - which is fine
when printing to a printer, but when printing to a file (say .pdf) it creates
individual files of one chart each. I'm hoping to find script which prints
one file containing all charts, with each chart printing full page.
 
J

John Mansfield

Aewsaws,

Perhaps the code at the following URL might point you in the right direction:

http://www.pdbook.com/index.php/excel/print_sheets_to_pdf_files/

I don't have the Acrobat Distiller installed on my machine so I can't make
changes and test it here. However, the code does work for a group that I
work with to print several hundred financial dashboards to .pdf files (it can
be modified to print to one file instead of individuals).

Hope this can help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top