![]() |
How to Include exl charts from closed worksheets into PPT slides
Hi,
I have writting a macros for creating charts from the data in the excel sheet. These charts are stored in a worksheet called 'Charts'. Now i am creating a macro in powerpoint presentation where i want the macro to open the excel sheet and include 1 charts in 1 slide. After all the charts have been included the macro should save the ppt and close the excel sheet. Can someone help me on this? Thanks Aditya --- Message posted from http://www.ExcelForum.com/ |
How to Include exl charts from closed worksheets into PPT slides
Have you tried to export the chart as a gif file and insert it as
picture into the presentation -- Message posted from http://www.ExcelForum.com |
How to Include exl charts from closed worksheets into PPT slides
Here's some sample code from Samples.Xls (supplied with some versions of
Excel). Sub MS_PowerPoint() Dim ppt As Object, pres As Object 'Create a Microsoft PowerPoint session Set ppt = CreateObject("powerpoint.application") 'Copy the chart on the Chart Labels sheet Worksheets("Chart Labels").ChartObjects(1).Copy 'Make PowerPoint visible ppt.Visible = True 'Activate PowerPoint AppActivate ppt.Name 'Open a new document in Microsoft PowerPoint Set pres = ppt.Presentations.Add 'Add a slide pres.Slides.Add 1, ppLayoutBlank 'Paste the chart ppt.ActiveWindow.View.Paste Set ppt = Nothing End Sub -- Regards Andy Wiggins www.BygSoftware.com Home of "Save and BackUp", "The Excel Auditor" and "Byg Tools for VBA" "akshetrapal " wrote in message ... Hi, I have writting a macros for creating charts from the data in the excel sheet. These charts are stored in a worksheet called 'Charts'. Now i am creating a macro in powerpoint presentation where i want the macro to open the excel sheet and include 1 charts in 1 slide. After all the charts have been included the macro should save the ppt and close the excel sheet. Can someone help me on this? Thanks Aditya --- Message posted from http://www.ExcelForum.com/ |
How to Include exl charts from closed worksheets into PPT slides
I have a several hints for dealing with Excel and PowerPoint together:
http://peltiertech.com/Excel/XL_PPT.html One of the examples will paste each chart embedded in the active sheet onto its own slide. Using the object browsers for both VB Editors (Excel's and PowerPoint's) should help you figure out how to save the presentation and close the worksheet. - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services http://PeltierTech.com/Excel/Charts/ _______ akshetrapal < wrote: Hi, I have writting a macros for creating charts from the data in the excel sheet. These charts are stored in a worksheet called 'Charts'. Now i am creating a macro in powerpoint presentation where i want the macro to open the excel sheet and include 1 charts in 1 slide. After all the charts have been included the macro should save the ppt and close the excel sheet. Can someone help me on this? Thanks Aditya --- Message posted from http://www.ExcelForum.com/ |
All times are GMT +1. The time now is 04:27 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com