Programmatically copying from MSGraph Datasheet to another

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'd like to programmatically copy data from one MSGraph datasheet in one
presentation to another MSGraph datasheet in another presentation. Can
someone direct me to some code snippet that I could try?

Thanks,
Barb Reinhardt
 
Hi,

This takes the data from a graph on slide 1 and copies it to a graph on
slide 2.
Notice the top left cell on the data sheet is referenced using 00

'------------------------
Sub TransferData()
'
' Adjust references to slides and
' objects to suit your presentation
'
Dim grpDS_1 As Object
Dim grpDS_2 As Object

Set grpDS_1 = _
ActivePresentation.Slides(1).Shapes(3).OLEFormat.Object.Application.datasheet
Set grpDS_2 = _
ActivePresentation.Slides(2).Shapes(2).OLEFormat.Object.Application.datasheet

grpDS_1.Range("00:D5").Copy
With grpDS_2
.Range("00").Paste
.Parent.Update
.Parent.Quit
End With

End Sub
'------------------------

Cheers
Andy
 
Back
Top