LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default Excel Chart macro to paste into Powerpoint

Have you tried:

ActiveSheet.Shapes("myGraph").CopyPicture

?

Tim



"Daemen" wrote in message
...
The code below works in office 2007 for me:

don't forget to DIM PP and PPpres as object.

Set PP = GetObject(, "PowerPoint.Application")
PP.Visible = msoCTrue
Set PPpres = PP.Presentations("Template.pptx")

ActiveSheet.Shapes("myGraph").Copy

PPpres.Slides(5).Shapes.PasteSpecial (ppPasteEnhancedMetafile)

This works like a charm... almost....

My problem is that the graph loses all preselected colours. And the
colours
had meaning. If I do this operation by hand: copy the graph, go to
powerpoint
and select paste-special Picture("Enhanced Metafile"), then it works
perfectly and all colours are retained. How do i get the macro to do this?

I hope I have helped you. Now allow me to hijack this thread? ;-)


"Yurble" wrote:

Try to remove follow:

1.
' remove title (or it will be redundant)
.HasTitle = False

2.
If Len(sTitle) 0 Then
.HasTitle = True
.ChartTitle.Text = sTitle
End If

And remember to Set a VBE reference to Microsoft PowerPoint Object
Library




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot copy Excel 2007 Chart and Paste as Bitmap into Powerpoint 2 SysMod Charts and Charting in Excel 6 September 30th 09 03:58 PM
Copy/Paste custom Excel chart to Word/PowerPoint Andy Excel Discussion (Misc queries) 0 September 1st 09 08:51 PM
Can I paste a chart from Excel into a powerpoint slide "Placeholde Mats Teir[_2_] Charts and Charting in Excel 1 April 9th 09 06:26 PM
Distorted Excel chart fonts when copy/paste to Word or Powerpoint JJMB Charts and Charting in Excel 2 March 18th 06 06:43 PM
VBA: open PowerPoint and paste a chart Linda M. Excel Programming 0 September 11th 03 06:46 PM


All times are GMT +1. The time now is 10:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"