lynnsong986
Board Regular
- Joined
- May 24, 2014
- Messages
- 146
Hello,
I have a bunch of slides with the same layout - a title box and a linked or embedded range from excel below the title box. I need to loop through all slides and re-set the dimensions for the linked excel range on each slide. I need to write something like:
Dim Sld As Slide
For Each Sld In ActivePresentation.Slides
For Each Shape In Sld.Shapes
If Shape.Type = 7 Or 10 Then
With Shape
.ShapeRange.Left = 1
.ShapeRange.Top = 1
.ShapeRange.Height = 1
.ShapeRange.Width = 1
End With
End If
Next
Next
End Sub
I've never written any codes in powerpoint before, I just used my excel vba knowledge to write the above - the codes gave error message when it comes to the purple part. can someone please help me fix it?
thanks
I have a bunch of slides with the same layout - a title box and a linked or embedded range from excel below the title box. I need to loop through all slides and re-set the dimensions for the linked excel range on each slide. I need to write something like:
Dim Sld As Slide
For Each Sld In ActivePresentation.Slides
For Each Shape In Sld.Shapes
If Shape.Type = 7 Or 10 Then
With Shape
.ShapeRange.Left = 1
.ShapeRange.Top = 1
.ShapeRange.Height = 1
.ShapeRange.Width = 1
End With
End If
Next
Next
End Sub
I've never written any codes in powerpoint before, I just used my excel vba knowledge to write the above - the codes gave error message when it comes to the purple part. can someone please help me fix it?
thanks