Hi!
I'm simply trying to insert a single row into every chart of a PowerPoint slide. There can be 3-12 charts a slide and there are 100+ slides (which is why I'm not doing this by hand). All I want is to insert a new row in between two others, specifically between Rows 3 and 4 in every chart.
I can't seem to figure it out. This is what I have so far in a PowerPoint VBA macro...
For Each Slide1 In ActivePresentation.Slides
For i = 1 To Slide1.Shapes.Count
If Slide1.Shapes(i).Type = msoEmbeddedOLEObject Then
Set Shape1 = Slide1.Shapes(i)
If Shape1.OLEFormat.ProgID = "MSGraph.Chart.8" Then
Set Graph1 = Shape1.OLEFormat.Object
Graph1.Application.DataSheet.Range(3, 1).Insert
End If
End If
Next
Next
The part I bolded is what I THOUGHT would work, but gives me a Run Time Error 1004: Application-defined or object defined error.
It's probably simply the wrong command, but I've been searching around for a while and I can't figure it out.
Any help would be greatly appreciated!
Thanks!
Mike
I'm simply trying to insert a single row into every chart of a PowerPoint slide. There can be 3-12 charts a slide and there are 100+ slides (which is why I'm not doing this by hand). All I want is to insert a new row in between two others, specifically between Rows 3 and 4 in every chart.
I can't seem to figure it out. This is what I have so far in a PowerPoint VBA macro...
For Each Slide1 In ActivePresentation.Slides
For i = 1 To Slide1.Shapes.Count
If Slide1.Shapes(i).Type = msoEmbeddedOLEObject Then
Set Shape1 = Slide1.Shapes(i)
If Shape1.OLEFormat.ProgID = "MSGraph.Chart.8" Then
Set Graph1 = Shape1.OLEFormat.Object
Graph1.Application.DataSheet.Range(3, 1).Insert
End If
End If
Next
Next
The part I bolded is what I THOUGHT would work, but gives me a Run Time Error 1004: Application-defined or object defined error.
It's probably simply the wrong command, but I've been searching around for a while and I can't figure it out.
Any help would be greatly appreciated!
Thanks!
Mike