ThrottleWorks
Excel Ninja
Hi,
I am trying to use code from below URL.
Extracting all text from a powerpoint file in VBA - Stack Overflow
When trying to run this code, am getting bug as 'Class not registered' at Set p = ActivePresentation this line.
Can anyone please help me in this.
I am trying to use code from below URL.
Extracting all text from a powerpoint file in VBA - Stack Overflow
When trying to run this code, am getting bug as 'Class not registered' at Set p = ActivePresentation this line.
Can anyone please help me in this.
Code:
Sub GetAllText()
Dim s As Slide
Dim sh As Shape
Dim p As Presentation
Set PPT = CreateObject("PowerPoint.Application")
If PPT Is Nothing Then Set PPT = CreateObject(class:="PowerPoint.Application")
Set p = ActivePresentation
For Each s In p.Slides
For Each sh In s.Shapes
If sh.HasTextFrame Then
If sh.TextFrame.HasText Then
Debug.Print sh.TextFrame.TextRange.Text
End If
End If
Next
Next
End Sub