PC Review


Reply
Thread Tools Rate Thread

Chart to PPT

 
 
Abdul
Guest
Posts: n/a
 
      5th Nov 2006
Hello,

How I could Loop thru the chart sheeets in the activeworkbook and copy
all charts to seperate slides in powepoint and centre align the charts
in the slides

thanks

 
Reply With Quote
 
 
 
 
=?Utf-8?B?SkxHV2hpeg==?=
Guest
Posts: n/a
 
      5th Nov 2006
You can start here:

http://exceltips.vitalnews.com/Pages...owerPoint.html

"Abdul" wrote:

> Hello,
>
> How I could Loop thru the chart sheeets in the activeworkbook and copy
> all charts to seperate slides in powepoint and centre align the charts
> in the slides
>
> thanks
>
>

 
Reply With Quote
 
Mark Ivey
Guest
Posts: n/a
 
      5th Nov 2006
I think I got this code from Jon Peltier's website, but I cannot find the
link to post... so here's the code...

'Pastes Each Embedded Chart in the Active Worksheet into a New Slide in the
Active Presentation
'This procedure copies each embedded chart in the active worksheet as a
picture from an Excel worksheet,
'then pastes it into a new slide at the end of a PowerPoint presentation.

Sub ChartsToPresentation()
' Set a VBE reference to Microsoft PowerPoint Object Library

Dim PPApp As PowerPoint.Application
Dim PPPres As PowerPoint.Presentation
Dim PPSlide As PowerPoint.Slide
Dim PresentationFileName As Variant
Dim SlideCount As Long
Dim iCht As Integer

' Reference existing instance of PowerPoint
Set PPApp = GetObject(, "Powerpoint.Application")
' Reference active presentation
Set PPPres = PPApp.ActivePresentation
PPApp.ActiveWindow.ViewType = ppViewSlide

For iCht = 1 To ActiveSheet.ChartObjects.Count
' copy chart as a picture
ActiveSheet.ChartObjects(iCht).Chart.CopyPicture _
Appearance:=xlScreen, Size:=xlScreen, Format:=xlPicture

' Add a new slide and paste in the chart
SlideCount = PPPres.Slides.Count
Set PPSlide = PPPres.Slides.Add(SlideCount + 1, ppLayoutBlank)
PPApp.ActiveWindow.View.GotoSlide PPSlide.SlideIndex
With PPSlide
' paste and select the chart picture
.Shapes.Paste.Select
' align the chart
PPApp.ActiveWindow.Selection.ShapeRange.Align msoAlignCenters, True
PPApp.ActiveWindow.Selection.ShapeRange.Align msoAlignMiddles, True
End With

Next

' Clean up
Set PPSlide = Nothing
Set PPPres = Nothing
Set PPApp = Nothing

End Sub





"Abdul" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello,
>
> How I could Loop thru the chart sheeets in the activeworkbook and copy
> all charts to seperate slides in powepoint and centre align the charts
> in the slides
>
> thanks
>



 
Reply With Quote
 
Mark Ivey
Guest
Posts: n/a
 
      5th Nov 2006
Finally found the correct links...

Both are on Jon Peltier's website:

Paste Each Embedded Chart in the Active Worksheet into a New Slide in the
Active Presentation
http://peltiertech.com/Excel/XL_PPT.html#chartsslides

Paste Each Embedded Chart in the Active Worksheet into a New Slide in the
Active Presentation, using the Chart Title as the Slide Title
http://peltiertech.com/Excel/XL_PPT....tstitlesslides


]
"Abdul" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello,
>
> How I could Loop thru the chart sheeets in the activeworkbook and copy
> all charts to seperate slides in powepoint and centre align the charts
> in the slides
>
> thanks
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 is missing Built-In Custom Chart Types in Chart Wizard Julius Microsoft Excel Programming 2 6th Mar 2009 04:55 PM
Excel 2003 is missing Built-In Custom Chart Types in Chart Wizard Julius Microsoft Excel Setup 1 6th Mar 2009 01:57 AM
Excel 2003 is missing Built-In Custom Chart Types in Chart Wizard Julius Microsoft Excel Programming 0 6th Mar 2009 01:21 AM
Cannot Activate Chart Area in Chart. Chart Object Failed ahperez@gmail.com Microsoft Excel Programming 2 8th Aug 2006 02:38 AM
pasting chart shows chart area, not the chart =?Utf-8?B?UGlyam8=?= Microsoft Powerpoint 3 13th Oct 2005 04:31 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:38 PM.