How to paste a Excel.Chart to Powerpoint.Slides.Shape with VBA 
Author Message
 How to paste a Excel.Chart to Powerpoint.Slides.Shape with VBA

In my automation for the office with VBA,I need to
generate a chart in EXCEL but paste the chart to the
powerpoint slides.But I can not find the right method.
I find in the Powerpoint.presentation.slide.shapes()
there  is an method named addOleObject,but it doesn't work
for I just specify the filename:=my excel file and
classname:= Excel.Chart.8
Would you give me hand? Thanks!


Fri, 26 Aug 2005 10:54:58 GMT  
 How to paste a Excel.Chart to Powerpoint.Slides.Shape with VBA
A clue:

This copies the first chart from the first sheet from the
activeworkbook to the clipboard. { adjust the indices as
required}

You can then paste it into PP.

ActiveWorkbook.Worksheets(1).ChartObjects(1).CopyPicture

If you are running Excel from PP,using something like

set xl = CreateObject("Excel.Application")

you'd need to prefix the code above by the name of your
object i.e.

xl.ActiveWorkbook.Worksheets(1).ChartObjects(1).CopyPicture

Quote:
>-----Original Message-----
>In my automation for the office with VBA,I need to
>generate a chart in EXCEL but paste the chart to the
>powerpoint slides.But I can not find the right method.
>I find in the Powerpoint.presentation.slide.shapes()
>there  is an method named addOleObject,but it doesn't
work
>for I just specify the filename:=my excel file and
>classname:= Excel.Chart.8
>Would you give me hand? Thanks!

>.



Fri, 26 Aug 2005 11:38:46 GMT  
 How to paste a Excel.Chart to Powerpoint.Slides.Shape with VBA
I've summarized my experience in this page:

 http://www.geocities.com/jonpeltier/Excel/XL_PPT.html

- Jon
-------
Jon Peltier, Microsoft Excel MVP
http://www.geocities.com/jonpeltier/Excel/index.html
_______


Quote:

>In my automation for the office with VBA,I need to
>generate a chart in EXCEL but paste the chart to the
>powerpoint slides.But I can not find the right method.
>I find in the Powerpoint.presentation.slide.shapes()
>there  is an method named addOleObject,but it doesn't work
>for I just specify the filename:=my excel file and
>classname:= Excel.Chart.8
>Would you give me hand? Thanks!



Mon, 29 Aug 2005 04:58:41 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Excel chart paste special to powerpoint slide

2. Macro for Powerpoint copy Charts from Excel Spread Sheet into PowerPoint slide

3. Paste an Excel range in a specified slide into Powerpoint

4. Pasting Excel table into PowerPoint slide

5. PPT95: pasting excel chart into slide changes font

6. Powerpoint Slides from Excel Chart Sheets

7. Pasting into PowerPoint Charts from Excel

8. Problem with pasting a linked Excel chart into Word and PowerPoint

9. Pasting Excel charts into Powerpoint

10. Chart gets clipped when pasting from Excel to PowerPoint


 
Powered by phpBB® Forum Software © phpBB Group