Microsoft Office Tutorials and References
In Depth Information
Grabbing All Text
Option Explicit¶
' * * * * *¶
Sub BlueSquares()¶
'Declare the counter variables used to cycle¶
' thru the objects and slides¶
Dim varSlideNumber As Integer¶
Dim varShapeNumber As Integer¶
With ActivePresentation¶
For varSlideNumber = 1 To .Slides.Count Step 1¶
With .Slides(varSlideNumber)¶
For varShapeNumber = 1 To .Shapes.Count Step 1¶
With .Shapes(varShapeNumber)¶
Select Case .AutoShapeType¶
Case Is = msoShapeRectangle¶
If ActiveWindow.Selection.ShapeRange(1).AutoShapeType = _¶
msoShapeRectangle Then¶
.Fill.ForeColor.RGB = _¶
ActiveWindow.Selection.ShapeRange(1).Fill.ForeColor.RGB¶
Else¶
.Fill.ForeColor.RGB = RGB(0, 0, 255)¶
End If¶
Case Else¶
'Insert code for objects other than autoshapes here.¶
'Close each of the selecting tools, loops and with
statements in turn.¶
End Select¶
End With¶
Next varShapeNumber¶
End With¶
Next varSlideNumber¶
End With¶
End Sub¶
Pwr
Grabbing All Text
This procedure exports all the text from every shape or text box in a
PowerPoint presentation to a simple text file with the option to label which text
came from which slide/shape.
Example file:
P003.ppt
Scenario: The boss loved the presentation on the product
and wants to send the wording only over to the Advertising
department. The entire text from the presentation needs to
be extracted. One way to do this is to cut and paste each
text section into a text application from PowerPoint, but this
is very slow and tedious. This macro exports all the text from
a presentation into a single simple text file that can be
imported to any other application.
 
Search JabSto ::




Custom Search