K
Ken Johnson
Powerpoint 2003, window XP:
I'm trying to write a macro that will fit a shape to the slide. Each
slide has just the one shape object. I can't figure out how to refer
to the height and width of the slide, the slide object doesn't have
those properties.
My attempt so far looks like...
Sub Fit_Shape_To_Slide()
Dim Sld As Slide
For Each Sld In ActivePresentation.Slides
With Sld.Shapes(1)
.Top = 0
.Left = 0
.LockAspectRatio = True
.Height = ??????????
If .Width > ???????? Then
.Width = ????????
End If
End With
Next Sld
End Sub
How do I go about referring to the slide's height and width?
Or, is there an easier way?
Ken Johnson
I'm trying to write a macro that will fit a shape to the slide. Each
slide has just the one shape object. I can't figure out how to refer
to the height and width of the slide, the slide object doesn't have
those properties.
My attempt so far looks like...
Sub Fit_Shape_To_Slide()
Dim Sld As Slide
For Each Sld In ActivePresentation.Slides
With Sld.Shapes(1)
.Top = 0
.Left = 0
.LockAspectRatio = True
.Height = ??????????
If .Width > ???????? Then
.Width = ????????
End If
End With
Next Sld
End Sub
How do I go about referring to the slide's height and width?
Or, is there an easier way?
Ken Johnson