Share via


PlaceholderFormat Interface

Contains properties that apply specifically to placeholders, such as placeholder type.

Namespace:  Microsoft.Office.Interop.PowerPoint
Assembly:  Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)

Syntax

'Declaration
<GuidAttribute("91493477-5A91-11CF-8700-00AA0060263B")> _
Public Interface PlaceholderFormat
'Usage
Dim instance As PlaceholderFormat
[GuidAttribute("91493477-5A91-11CF-8700-00AA0060263B")]
public interface PlaceholderFormat

Examples

Use the PlaceholderFormat property to return a PlaceholderFormat object. The following example adds text to placeholder one on slide one in the active presentation if that placeholder exists and is a horizontal title placeholder.

With ActivePresentation.Slides(1).Shapes.Placeholders

    If .Count > 0 Then

        With .Item(1)

            Select Case .PlaceholderFormat.Type

                Case ppPlaceholderTitle

                    .TextFrame.TextRange = "Title Text"

                Case ppPlaceholderCenterTitle

                    .TextFrame.TextRange = "Centered Title Text"

                Case Else

                    MsgBox "There's no horizontal " _

                        "title on this slide"

            End Select

        End With

    End If

End With

See Also

Reference

PlaceholderFormat Members

Microsoft.Office.Interop.PowerPoint Namespace