ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   PasteSpecial Excel Chart in Powerpoint (https://www.excelbanter.com/excel-programming/400686-pastespecial-excel-chart-powerpoint.html)

Dale Fye

PasteSpecial Excel Chart in Powerpoint
 
I want to use PasteSpecial to embed an Excel chart in a Powerpoint slide. I
have been able to select the chart and copy it using CopyPicture, and I have
been able to use the shape.paste method using the PowerPoint slide object.
However when I try to use the Shape.PasteSpecial method with the PowerPoint
slide object, I get a variety of error messages.

Anyone have an example of this?

Dale
--

Email address is not valid.
Please reply to newsgroup only.

Ernst Schuurman

PasteSpecial Excel Chart in Powerpoint
 
I use this code to copy charts into powerpoint presentation.

Set Dwbl = ThisWorkbook.Worksheets("sheetname")
Set Ch = ThisWorkbook.Charts(1)
Ch.Activate
Ch.ChartTitle.Font.Background = xlTransparent
Set ppt = New PowerPoint.Application
ppt.Visible = True
ppt.Presentations.Open "name.ppt"
Set Pres = ppt.ActivePresentation
Ch.Activate
Set Sl = Pres.Slides(n)
Sl.Shapes.Title.TextFrame.TextRange.Text = Ch.ChartTitle.Text
Sl.Shapes.Title.TextFrame.TextRange.Paragraphs(sta rt:=1,
Length:=1).ParagraphFormat.Alignment = ppAlignCenter
Sl.Shapes.Title.TextFrame.TextRange.Font.Size = 18
Ch.ChartTitle.Font.ColorIndex = 15
Sl.Select
Set Grf = Sl.Shapes.AddOLEObject(Left:=20, Top:=110, Width:=630,
Height:=430, _
Filename:=ThisWorkbook.Path & "\" & ThisWorkbook.Name,
Link:=msoTrue)
Grf.LinkFormat.AutoUpdate = ppUpdateOptionManual

As you see the charttitle is used as the title of the slide and the real
charttitle is hidden.
I use a certain presentation over and over, removeing certain slides and
adding new ones.

Regards
Ernst Schuurman



"Dale Fye" schreef in bericht
...
I want to use PasteSpecial to embed an Excel chart in a Powerpoint slide.
I
have been able to select the chart and copy it using CopyPicture, and I
have
been able to use the shape.paste method using the PowerPoint slide object.
However when I try to use the Shape.PasteSpecial method with the
PowerPoint
slide object, I get a variety of error messages.

Anyone have an example of this?

Dale
--

Email address is not valid.
Please reply to newsgroup only.




Dale Fye

PasteSpecial Excel Chart in Powerpoint
 
Thanks, Ernst.

I'll give this a try in the morning.

"Ernst Schuurman" wrote in message
...
I use this code to copy charts into powerpoint presentation.

Set Dwbl = ThisWorkbook.Worksheets("sheetname")
Set Ch = ThisWorkbook.Charts(1)
Ch.Activate
Ch.ChartTitle.Font.Background = xlTransparent
Set ppt = New PowerPoint.Application
ppt.Visible = True
ppt.Presentations.Open "name.ppt"
Set Pres = ppt.ActivePresentation
Ch.Activate
Set Sl = Pres.Slides(n)
Sl.Shapes.Title.TextFrame.TextRange.Text = Ch.ChartTitle.Text
Sl.Shapes.Title.TextFrame.TextRange.Paragraphs(sta rt:=1,
Length:=1).ParagraphFormat.Alignment = ppAlignCenter
Sl.Shapes.Title.TextFrame.TextRange.Font.Size = 18
Ch.ChartTitle.Font.ColorIndex = 15
Sl.Select
Set Grf = Sl.Shapes.AddOLEObject(Left:=20, Top:=110, Width:=630,
Height:=430, _
Filename:=ThisWorkbook.Path & "\" & ThisWorkbook.Name,
Link:=msoTrue)
Grf.LinkFormat.AutoUpdate = ppUpdateOptionManual

As you see the charttitle is used as the title of the slide and the real
charttitle is hidden.
I use a certain presentation over and over, removeing certain slides and
adding new ones.

Regards
Ernst Schuurman



"Dale Fye" schreef in bericht
...
I want to use PasteSpecial to embed an Excel chart in a Powerpoint slide.
I
have been able to select the chart and copy it using CopyPicture, and I
have
been able to use the shape.paste method using the PowerPoint slide
object.
However when I try to use the Shape.PasteSpecial method with the
PowerPoint
slide object, I get a variety of error messages.

Anyone have an example of this?

Dale
--

Email address is not valid.
Please reply to newsgroup only.






avivexpert

PasteSpecial Excel Chart in Powerpoint
 
Dale Fye wrote on 11/06/2007 12:47 ET :
I want to use PasteSpecial to embed an Excel chart in a Powerpoint slide. I
have been able to select the chart and copy it using CopyPicture, and I have
been able to use the shape.paste method using the PowerPoint slide object.
However when I try to use the Shape.PasteSpecial method with the PowerPoint
slide object, I get a variety of error messages.

Anyone have an example of this?

Dale

Email address is not valid.
Please reply to newsgroup only.

I suggest to try using Ezpaste-xl2anywhere (www.ezpaste.net). It will solve all
the problems of copying charts and tables from Excel to Powerpoint or Word

AvivExpert


All times are GMT +1. The time now is 03:38 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com