For example,
Code: Select all
Sub fit()
Dim sTopLimit As Long
Dim sMaxHeight As Single
Dim sMaxWidth As Single
Dim sSlideHeight As Single
Dim sObjectHeight As Single
Call a1_FitWidth
Call mid
With ActiveWindow.Selection.ShapeRange
sMaxHeight = .Height
sSlideHeight = ActivePresentation.PageSetup.SlideHeight
If sMaxHeight > sSlideHeight Then
Call a3_FitHeight
End If
End With
End Sub