Extract Text from Textboxes in Powerpoint slides using VBA
Dedicated to good blogger friend Rahul. This code snippet loops through the slides and extracts the contents of the Textboxes
Sub Extract_TextBox_Text_FromSlides()
Dim oPres As Presentation
Dim oSlide As Slide
Dim oShapes As Shapes
Dim oShape As Shape
Set oPres = ActivePresentation
' --------------------------------------------------
' coded by Shasur for http://vbadud.blogspot.com
' --------------------------------------------------
For Each oSlide In oPres.Slides
Set oShapes = oSlide.Shapes
For Each oShape In oShapes
If oShape.Type = msoTextBox Then
Debug.Print oSlide.Name & vbTab & oShape.TextFrame.TextRange.Text
End If
Next oShape
Next oSlide
End Sub
Hi Shasur
ReplyDeletei tried to run the code, but where it is storing the text...
and one more thing please if you can include that it take only the text which is in italic. otherwise it will give so many unwanted things.
Thanks a lot
Regards
Rahul
I am Printing it to immediate window. You can replace the Debug.Print with some variable
ReplyDeleteHi Shasur,
ReplyDeleteNeed to copy the text from the slide textbox of each slide into the notes section of the corresponding slide. Pl. hint on the macro for that.
Rgds,
Murugan
Your work is very good and I appreciate you and hopping for some more informative posts. Thank you for sharing great information to us. Extract pictures from microsoft word
ReplyDeleteHi I want to take list of all slides and into the new slide at shape 2 Any one can help me?
ReplyDelete