G
Geoff Cox
Hello,
The following code normally works - and gives me the number of slides
in a presentation.
But! If I use it on a ppt file which has a text box added - using the
Control Toolbox, with the ability to enter some text - then it bombs
out!
Any ideas please?
Cheers
Geoff
Sub check_number_of_slides(strMyFile As String)
Dim oPresentation As Presentation
Set oPresentation = Presentations.Open(strMyFile)
Dim CountSlides As Integer
With oPresentation
CountSlides = oPresentation.Slides.Count
MsgBox "number of slides in " & strMyFile & " is " & CountSlides
oPresentation.Save
oPresentation.Close
End With
Set oPresentation = Nothing
End Sub
The following code normally works - and gives me the number of slides
in a presentation.
But! If I use it on a ppt file which has a text box added - using the
Control Toolbox, with the ability to enter some text - then it bombs
out!
Any ideas please?
Cheers
Geoff
Sub check_number_of_slides(strMyFile As String)
Dim oPresentation As Presentation
Set oPresentation = Presentations.Open(strMyFile)
Dim CountSlides As Integer
With oPresentation
CountSlides = oPresentation.Slides.Count
MsgBox "number of slides in " & strMyFile & " is " & CountSlides
oPresentation.Save
oPresentation.Close
End With
Set oPresentation = Nothing
End Sub