Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Printing all the charts

I am a C/C++/.Net developer. I am working on a basic Excel
spreadsheet for my son's Boy Scout Troop. One sheet contains ALL the
charts that need to be printed weekly. I need to print one chart per
page. I have a funny feeling that it is a quick and easy 'for each'
to print them, but I am guessing. Might someone be able to enlighten
me?

Cartoper
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Printing all the charts

If the charts you want to print are individual Chart-sheets you can do
simply run this:

Charts.PrintOut

above assumes the ActiveWorkbook, qualify if necessary to the required
workbook.

If this is all you are doing I can't see any reason not to use a simple one
line VBA macro.

If your charts are embedded on worksheets could loop each chart on each
worksheet, to place a copy of each into a chart-sheet. Run the code above,
then delete the newly created chart sheets.

If you want your charts sized and/or orientated in some particular way on
the paper there would be a bit more work to do.

Regards,
Peter T


"sam" wrote in message
...
I am a C/C++/.Net developer. I am working on a basic Excel
spreadsheet for my son's Boy Scout Troop. One sheet contains ALL the
charts that need to be printed weekly. I need to print one chart per
page. I have a funny feeling that it is a quick and easy 'for each'
to print them, but I am guessing. Might someone be able to enlighten
me?

Cartoper



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Printing all the charts

The esy way is to put a page break between charts. On the spreadsheet menu
Insert - Page break. I usually put the charts next to each other either
vertically and/or horizontal. Then add the breaks.

"sam" wrote:

I am a C/C++/.Net developer. I am working on a basic Excel
spreadsheet for my son's Boy Scout Troop. One sheet contains ALL the
charts that need to be printed weekly. I need to print one chart per
page. I have a funny feeling that it is a quick and easy 'for each'
to print them, but I am guessing. Might someone be able to enlighten
me?

Cartoper

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Printing all the charts

If you printout an embedded chart, it is printed as a chart sheet. No need
to manipulate the chart to make a copy as a chart sheet. Here's the code:

Sub PrintAllChartsOnThisWorksheet()
Dim ChtOb As ChartObject
For Each ChtOb In ActiveWorksheet.ChartObjects
ChtOb.Chart.PrintOut
Next
End Sub

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Peter T" <peter_t@discussions wrote in message
...
If the charts you want to print are individual Chart-sheets you can do
simply run this:

Charts.PrintOut

above assumes the ActiveWorkbook, qualify if necessary to the required
workbook.

If this is all you are doing I can't see any reason not to use a simple
one
line VBA macro.

If your charts are embedded on worksheets could loop each chart on each
worksheet, to place a copy of each into a chart-sheet. Run the code above,
then delete the newly created chart sheets.

If you want your charts sized and/or orientated in some particular way on
the paper there would be a bit more work to do.

Regards,
Peter T


"sam" wrote in message
...
I am a C/C++/.Net developer. I am working on a basic Excel
spreadsheet for my son's Boy Scout Troop. One sheet contains ALL the
charts that need to be printed weekly. I need to print one chart per
page. I have a funny feeling that it is a quick and easy 'for each'
to print them, but I am guessing. Might someone be able to enlighten
me?

Cartoper





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Printing all the charts

I think a typo here -

For Each ChtOb In ActiveWorksheet.ChartObjects


should read -
For Each ChtOb In ActiveSheet.ChartObjects

I wasn't aware of that method and handy to know, if ever want to print all
charts on a worksheet to individual pages.

FWIW, the method I suggested would allow for all charts to be printed to
pages as a single print operation, in case say two sided printing is
required. Also, possibly, a bit easier to manipulate page setup: margins,
orientation etc.

Regards,
Peter T


"Jon Peltier" wrote in message
...
If you printout an embedded chart, it is printed as a chart sheet. No need
to manipulate the chart to make a copy as a chart sheet. Here's the code:

Sub PrintAllChartsOnThisWorksheet()
Dim ChtOb As ChartObject
For Each ChtOb In ActiveWorksheet.ChartObjects
ChtOb.Chart.PrintOut
Next
End Sub

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Peter T" <peter_t@discussions wrote in message
...
If the charts you want to print are individual Chart-sheets you can do
simply run this:

Charts.PrintOut

above assumes the ActiveWorkbook, qualify if necessary to the required
workbook.

If this is all you are doing I can't see any reason not to use a simple
one
line VBA macro.

If your charts are embedded on worksheets could loop each chart on each
worksheet, to place a copy of each into a chart-sheet. Run the code

above,
then delete the newly created chart sheets.

If you want your charts sized and/or orientated in some particular way

on
the paper there would be a bit more work to do.

Regards,
Peter T


"sam" wrote in message

...
I am a C/C++/.Net developer. I am working on a basic Excel
spreadsheet for my son's Boy Scout Troop. One sheet contains ALL the
charts that need to be printed weekly. I need to print one chart per
page. I have a funny feeling that it is a quick and easy 'for each'
to print them, but I am guessing. Might someone be able to enlighten
me?

Cartoper









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Printing all the charts

Oops, didn't test it.

The page setup can be accomplished with the chart prior to printing. This
one is even tested!

Sub PrintoutCharts()
Dim chob As ChartObject
For Each chob In ActiveSheet.ChartObjects
With chob.Chart.PageSetup
.TopMargin = Application.InchesToPoints(0.5)
.BottomMargin = Application.InchesToPoints(0.5)
End With
chob.Chart.PrintOut
Next
End Sub

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Peter T" <peter_t@discussions wrote in message
...
I think a typo here -

For Each ChtOb In ActiveWorksheet.ChartObjects


should read -
For Each ChtOb In ActiveSheet.ChartObjects

I wasn't aware of that method and handy to know, if ever want to print all
charts on a worksheet to individual pages.

FWIW, the method I suggested would allow for all charts to be printed to
pages as a single print operation, in case say two sided printing is
required. Also, possibly, a bit easier to manipulate page setup: margins,
orientation etc.

Regards,
Peter T


"Jon Peltier" wrote in message
...
If you printout an embedded chart, it is printed as a chart sheet. No
need
to manipulate the chart to make a copy as a chart sheet. Here's the code:

Sub PrintAllChartsOnThisWorksheet()
Dim ChtOb As ChartObject
For Each ChtOb In ActiveWorksheet.ChartObjects
ChtOb.Chart.PrintOut
Next
End Sub

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Peter T" <peter_t@discussions wrote in message
...
If the charts you want to print are individual Chart-sheets you can do
simply run this:

Charts.PrintOut

above assumes the ActiveWorkbook, qualify if necessary to the required
workbook.

If this is all you are doing I can't see any reason not to use a simple
one
line VBA macro.

If your charts are embedded on worksheets could loop each chart on each
worksheet, to place a copy of each into a chart-sheet. Run the code

above,
then delete the newly created chart sheets.

If you want your charts sized and/or orientated in some particular way

on
the paper there would be a bit more work to do.

Regards,
Peter T


"sam" wrote in message

...
I am a C/C++/.Net developer. I am working on a basic Excel
spreadsheet for my son's Boy Scout Troop. One sheet contains ALL the
charts that need to be printed weekly. I need to print one chart per
page. I have a funny feeling that it is a quick and easy 'for each'
to print them, but I am guessing. Might someone be able to enlighten
me?

Cartoper








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
printing charts to PDF Jimmy Charts and Charting in Excel 1 May 26th 08 09:27 PM
Printing Pie Charts - Or Gary Charts and Charting in Excel 0 October 4th 07 08:36 PM
Printing charts faberk Charts and Charting in Excel 1 July 5th 06 10:17 AM
Charts for printing Maxal Charts and Charting in Excel 1 April 22nd 06 04:03 AM
Printing thumbnails of charts Ed Charts and Charting in Excel 0 January 13th 06 12:57 AM


All times are GMT +1. The time now is 09:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"