Excel to Update PowerPoint

LadyDi

Registered User.
Local time
Today, 07:45
Joined
Mar 29, 2007
Messages
894
Is there a way to build a module in Excel that can update a PowerPoint presentation? I currently have a workbook with several worksheets, each containing four charts. I also have a PowerPoint presentation template with several slides set up for four charts per slide. Each chart needs copied from Excel and pasted as an enhanced metafile in each quadrent of the PowerPoint slide based on worksheet. In other words, I need the four charts on worksheet one to be copied over to slide one of the PowerPoint. Is is possible to do this via visual basic? Any assistance you can provide would be greatly appreciated.
 
Hi

Have you tried recording a macro and see what happens if you perform the task manually, or at least the parts you can do manually?

G
 
Hi, I am a new member here but I have good Excel knowledge and I think I do something similar, in Excel & Powerpoint 2003. No programming required:
- Excel: select the chart workspace (a black dot appears in all 4 corners of the chart)
- Edit/Copy
- Powerpoint: select slide
- Edit/Paste Special...(choose the Paste Link button) as "MS Office Excel Chart Object", OK
- Save
This procedure links the Excel chart dynamically to Powerpoint (it's not real-time but pretty good). You can force an update by right-mouse clicking the Powerpoint chart and selecting 'Update Link'. You can do this with as many links as you like (I have 50) and it works well and needs no further maintenance.

I hope that helps. Clive
 
cgp has an excellent point about Linked and Embedded excel charts into Power Point.
That is one way to to do it. It might require possessing (not in the evil spirit meaning) both Excel and Power Point. In other words, if the Power Point was taken off-site, it might not have the Link to get the chart from Excel.

There is another way to do this. Set a Tools- Reference in the Macro (code) module to the Power Pint object. Then, write object code to Set MyPPT = CreateObject("powerPoint.Application")
Then there is a lot of code...
The best book on the subject (page 512) is the old Microsoft Excel 97 Developer's Handbook by Eric Wells (Microsoft Press) His demo of the Setagaya Cycle Annual Sales Report is something worth finding.
Well, are you not the lucky one!
Look at what I found just for you on the Internet!
http://vba-programmer.com/Snippets/Code_Excel/Powerpoint_Automation.html
Please be aware, this is based on the older Power Point 97 model.
Things did change.
That said, this is the concept you are looking for. Some objects may have changed names. This creates a powerpoint and saves as. It can be emailed or used anywhere.

Hope that helps
 
@RX, Lady Di:
When I send a .ppt to readers, I point out that they should not "update linked files" if prompted, in which case they will be able to view & print any of the slides.

However, if RX's code suggestions do the job for you...go for it!

Clive
 
Hi LadyDi,

I did this exercise a while ago, so I've uploaded an Excel & a PPoint file for you to try out.

Save both of these files to your Desktop, you'll then need to go into the Excel 'copy_charts_to_ppt' Macro & change the Path to the Powerpoint presentation to your Desktop.

This will paste the Chart from the Excel file to a slide in the Powerpoint pack. Let me know if you need to add loops & need help with that.

I did this for a weekly report that had over 50 charts to paste into Powerpoint so this saved me hours of boring work!! :D
 

Attachments

Users who are viewing this thread

Back
Top Bottom