Macro that copies charts from a worksheet in excel to different slides in Power Point

Posted on 2014-07-17
Medium Priority
Last Modified: 2014-07-17
i have a number of charts on a worksheet, i want to create a macro that copies each of the charts into a separate slide in powerpoint. Thank you!
Question by:gprempeh
LVL 13

Expert Comment

ID: 40201416
There is example tutorial to let you to paste the active excel chart into the Active PowerPoint Slide at


Hope understand your question completely.If not , please pt it out
LVL 23

Accepted Solution

JSRWilson earned 2000 total points
ID: 40201530
This would be the basic code (Late bound) You may need to improve it to suit your needs.

If the charts are not directly on the sheets but have been moved to chart sheets the code would be different.

Sub pptpaster()
Const ppLayoutTitleOnly = 11
Dim i As Integer
'does not require reference to PowerPoint
Dim pptapp As Object
Dim pptPres As Object
Dim pptsld As Object
Dim s As Integer
Dim ocht As Object
Set pptapp = CreateObject("PowerPoint.Application")
pptapp.Visible = True
Set pptPres = pptapp.Presentations.Add
For s = 1 To ActiveWorkbook.Sheets.Count
For i = 1 To Sheets(s).ChartObjects.Count
Set pptsld = pptPres.Slides.Add(pptPres.Slides.Count + 1, ppLayoutTitleOnly)
Set ocht = pptsld.Shapes.Paste(1)
ocht.Left = 100
ocht.Top = 200
End Sub

Open in new window


Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
PowerPoint is the go-to presentation software for millions of users around the world. Many presentations use basic text features but you can really make special text jump out of your slide by applying this bubble text design process. This article ha…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question