I am using a code to present the presentation properties to a textbox or shape via a command button or Macro. When I run it I get a run time error that say " SlideShowWindows(unknown member): integer out of range. 1 is not in the valid range of 1 to 0
What should I do!? Thanks in advance!
Sub ReportStuff()
Dim oSl As Slide
Dim oSh As Shape
Set oSl = SlideShowWindows(1).View.Slide
' Test to see if the shape's already there:
Set oSh = IsItThere(oSl, "My Text Box")
' If it's not there, add it:
If oSh Is Nothing Then
Set oSh = oSl.Shapes.AddTextbox(msoTextOrientationHorizontal, 100, 100, 200, 50)
oSh.Name = "My Text Box"
End If
With oSh.TextFrame.TextRange
.Text = "Index: " & oSl.SlideIndex & " ID: " & oSl.SlideID & " File: " & ActivePresentation.FullName
End With
End Sub
Function IsItThere(oSl As Slide, sName As String) As Shape
Dim oSh As Shape
For Each oSh In oSl.Shapes
If oSh.Name = sName Then
Set IsItThere = oSh
Exit Function
End If
Next
End Function