PC Review


Reply
Thread Tools Rate Thread

Copy excel chart as picture to a particular ppt slides

 
 
sas
Guest
Posts: n/a
 
      17th Dec 2007
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
 
Reply With Quote
 
 
 
 
T Lavedas
Guest
Posts: n/a
 
      17th Dec 2007
On Dec 17, 5:58 am, sas <srinath...@gmail.com> 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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy chart and paste it as a PICTURE back into Excel AC Microsoft Excel Discussion 3 6th Jun 2009 07:51 AM
Copy chart and paste it as a PICTURE back into Excel AC Microsoft Excel Programming 3 6th Jun 2009 07:51 AM
Excel 2007 copy chart as picture ward376 Microsoft Excel Charting 3 2nd Jun 2006 09:48 PM
copy charts & paste as picture, hide chart, size & place same picture as chart Gunnar Johansson Microsoft Excel Programming 3 30th Oct 2004 02:32 PM
copy a picture to other slides Christoffer Sjöwall Microsoft Powerpoint 0 13th Jan 2004 02:59 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:20 AM.