Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I generate monthly excel report with 35 ~ 40 charts.The charts are distributed in multiple sheets. There is a standard ppt report template. I manually paste a particular excel chart to particular slide no. in standard ppt. Is there any macro to automate pasting a particular chart from excel to particular slide no. in standard ppt. Thanks in advance, sas |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Dec 17, 5:58 am, sas wrote:
Hi, I generate monthly excel report with 35 ~ 40 charts.The charts are distributed in multiple sheets. There is a standard ppt report template. I manually paste a particular excel chart to particular slide no. in standard ppt. Is there any macro to automate pasting a particular chart from excel to particular slide no. in standard ppt. Thanks in advance, sas Here is an example of a PowerPoint macro that uses the Excel. Application object to copy a single named chart to the currently active slide as a starting point for your solution ... Sub Macro1() ' ' Macro recorded 12/17/2007 by Tom Lavedas ' Const sPath = "C:\Documents and Settings\tlavedas\My Documents\Script \Testing\" On Error Resume Next Set oXL = GetObject("", "Excel.Application") If Err.Number < 0 Then Set oXL = CreateObject("Excel.Application") End If On Error GoTo 0 With oXL .Workbooks.Open (sPath & "TestChart.xls") .Workbooks("TestChart.xls").Activate With .ActiveWorkbook .Sheets("Sheet1").Select .ActiveSheet.ChartObjects("Chart 1").Activate .ActiveChart.ChartArea.Copy End With End With Presentations(1).Windows(1).Activate ActiveWindow.View.Paste End Sub Adjust the XL file name, sheet name and chart name as approriate (probably in a loop) I think the macro works better in PowerPoint than Excel because of macro security issues. You might also want to do a groups.google search in microsoft.public.powerpoint for more pointers to complete this. Tom Lavedas =========== http://members.cox.net/tglbatch/wsh/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA Copy Chart as Picture | Charts and Charting in Excel | |||
Copy and Paste Chart as Picture into another workbook or worksheet | Charts and Charting in Excel | |||
Excel 2007 copy chart as picture | Charts and Charting in Excel | |||
copy then paste a chart as a picture | Excel Programming | |||
copy charts & paste as picture, hide chart, size & place same picture as chart | Excel Programming |