Hi
I am in the process of searching a particular word in a PPT using a VB tool. Is there any way of getting the whole content of the master slide?
Ta,
K. Rajasekar
This should be adaptible to what you need:
Sub MasterText()
Dim oPres As Presentation
Dim oSlides As Slides
Dim oSlide As Slide
Dim oShapes As Shapes
Dim oSh As Shape
Dim NotesText As String
Dim SlideMasterText As String
Set oPres = ActivePresentation
Set oSlides = oPres.Slides
' Get the master text
Set oShapes = ActivePresentation.SlideMaster.Shapes
For Each oSh In oShapes
If oSh.HasTextFrame Then
If oSh.TextFrame.HasText Then
SlideMasterText = SlideMasterText & oSh.TextFrame.TextRange.Text & vbCrLf
End If
End If
Next oSh
' Get the TitleMaster text if any
If ActivePresentation.HasTitleMaster Then
Set oShapes = ActivePresentation.TitleMaster.Shapes
For Each oSh In oShapes
If oSh.HasTextFrame Then
If oSh.TextFrame.HasText Then
SlideMasterText = SlideMasterText & oSh.TextFrame.TextRange.Text & vbCrLf
End If
End If
Next oSh
End If
Debug.Print SlideMasterText
' Get the notes text for all slides
For Each oSlide In oSlides
NotesText = NotesText & "Slide " & oSlide.SlideIndex & vbCrLf
Set oShapes = oSlide.NotesPage.Shapes
For Each oSh In oShapes
If oSh.HasTextFrame Then
If oSh.TextFrame.HasText Then
NotesText = NotesText & oSh.TextFrame.TextRange.Text
End If
End If
Next oSh
NotesText = NotesText & vbCrLf
Next oSlide
End Sub