Supercharge your PowerPoint productivity with
|
PPTools |
ProblemSolutionThis function returns a reference to the body text placeholder on a slide.
Function BodyTextPlaceholder(oSl As Slide) As Shape
Dim oSh As Shape
For Each oSh In oSl.Shapes
If oSh.Type = msoPlaceholder Then
' change ppPlaceholderBody to another placeholder type if you
' want to get a reference to a different placeholder
If oSh.PlaceholderFormat.Type = ppPlaceholderBody Then
' we found it
Set BodyTextPlaceholder = oSh
Exit Function
End If
End If
Next ' shape
End Function
You can use this macro to test the function:
Sub TestBodyTextPlaceholder()
Dim oSl As Slide
Dim oSh As Shape
Set oSl = ActivePresentation.Slides(2)
Set oSh = BodyTextPlaceholder(oSl)
' If there's no placeholder, the function returns nothing, so test:
If Not oSh Is Nothing Then
MsgBox oSh.TextFrame.TextRange.Text
End If
End Sub
Search terms:placeholder,reference,body,text,title Español Deutsch Français Português Italiano Nederlands Greek Japanese Korean Chinese |
Supercharge your PPT Productivity with PPTools
|
content authoring & site maintenance by |
Get a reference to a placeholder on a slide
http://www.pptfaq.com/FAQ00681.htm
Last update 09 September, 2006