G
Guest
Hi, I have already read previous questions and answers. "Andrew" asked about
"Select and Change all text".
I want to select all text within every textbox on my presentation in order
to copy and paste it into a word document.
I have never studied VBA before but I looked at the links provided by Kathy
J:
http://www.rdpslides.com/pptfaq/FAQ00465.htm
http://www.rdpslides.com/pptfaq/FAQ00594.htm
I thought that if I play around with the codes I could somehow get them to
select all of the text throughout my presentation.
After playing with the Record Macro function to figure out the coding for
selecting text, I wrote this code:
Sub EveryTextBoxOnSlide()
' Performs some operation on every shape that contains text on every slide
' (doesn't affect charts, tables, etc)
Dim oSh As Shape
Dim oSl As Slide
On Error GoTo ErrorHandler
For Each oSl In ActivePresentation.Slides
For Each oSh In oSl.Shapes
With oSh
If .HasTextFrame Then
If .TextFrame.HasText Then
.TextFrame.TextRange.Select
End If
End If
End With
Next ' shape
Next ' slide
NormalExit:
Exit Sub
ErrorHandler:
Resume Next
End Sub
But it only selects the text in one textbox on the current slide. I really
don't know how to do what I want to do, so I'd much appreciate some help with
coding!
Thanks
"Select and Change all text".
I want to select all text within every textbox on my presentation in order
to copy and paste it into a word document.
I have never studied VBA before but I looked at the links provided by Kathy
J:
http://www.rdpslides.com/pptfaq/FAQ00465.htm
http://www.rdpslides.com/pptfaq/FAQ00594.htm
I thought that if I play around with the codes I could somehow get them to
select all of the text throughout my presentation.
After playing with the Record Macro function to figure out the coding for
selecting text, I wrote this code:
Sub EveryTextBoxOnSlide()
' Performs some operation on every shape that contains text on every slide
' (doesn't affect charts, tables, etc)
Dim oSh As Shape
Dim oSl As Slide
On Error GoTo ErrorHandler
For Each oSl In ActivePresentation.Slides
For Each oSh In oSl.Shapes
With oSh
If .HasTextFrame Then
If .TextFrame.HasText Then
.TextFrame.TextRange.Select
End If
End If
End With
Next ' shape
Next ' slide
NormalExit:
Exit Sub
ErrorHandler:
Resume Next
End Sub
But it only selects the text in one textbox on the current slide. I really
don't know how to do what I want to do, so I'd much appreciate some help with
coding!
Thanks