Hi everybody,
As the subject states, I’m trying to paste an unlinked chart from Excel to power point (2010). I haven’t been able to do so, this is what I have up to now. I have accomplished to paste the charts but no pastespecial code allows me to keet an embed and unlinked chart. For some weird reason the chart is allways linked to the Excel where it comes from (unless I paste it as a picture or as an object, not what I need)… can anyone help me with this?
Thanks!
Regards!
CODE:
Dim pptApp As PowerPoint.Application
Dim pptPres As PowerPoint.Presentation
Dim pptSlide As PowerPoint.Slide
Dim pptShape As PowerPoint.Shape
Dim Template As Variant
Template = Application.GetOpenFilename(“PowerPoint (*.pptx),*.pptx”, , “Please select Template “)
Set pptApp = CreateObject(“PowerPoint.Application”)
pptApp.Visible = msoTrue
Set pptPres = pptApp.Presentations.Open(Template) ‘ create a new presentation
‘******************************************
‘pasting the chart
Windows(name2).Activate
ActiveWorkbook.Sheets(“Chart1”).Select ‘ copy an Excel chart item
ActiveChart.ChartArea.Copy
Set pptSlide = pptPres.Slides(4)
pptPres.Slides(4).Select
With pptSlide
.Shapes.PasteSpecial link:=False
‘.Shapes.PasteSpecial DataType:=ppPasteDefault, link:=msoFalse
‘.Shapes.PasteSpecial DataType:=ppPasteOLEObject, link:=msoFalse
With .Shapes(.Shapes.Count)
.Left = 150
.Top = 215.125
.Width = 480
.Height = 289.625
End With
End With