View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
michelxld michelxld is offline
external usenet poster
 
Posts: 1
Default copy table or graph and paste into powerpoint


Hello

I hope this help you
to copy a graph in a presentation

Sub insertionGraphiqueDansPowerPoint()
'activate Microsoft Powerpoint Object Library
Dim PPT As PowerPoint.Application
Dim PptDoc As PowerPoint.Presentation
Dim NbShpe As Byte

Set PPT = CreateObject("Powerpoint.Application")
PPT.Visible = True
Set PptDoc = PPT.Presentations.Open("C:\myPresentation.ppt")

ActiveSheet.ChartObjects(1).Copy 'copy first graph in active sheet
PptDoc.Slides(3).Shapes.Paste 'paste in third slide

NbShpe = PptDoc.Slides(3).Shapes.Count

With PptDoc.Slides(3).Shapes(NbShpe)
..Name = "monGraph"
..Left = 150
..Top = 100
..Height = 300
..Width = 400
End With

'PptDoc.Save
'PptDoc.Close
'PPT.Quit
End Sub


Regards ,
michel


--
michelxld
------------------------------------------------------------------------
michelxld's Profile: http://www.excelforum.com/member.php...o&userid=17367
View this thread: http://www.excelforum.com/showthread...hreadid=374527