Share via


Layout Property

Layout Property
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.  Layout property as it applies to the DiagramNode object.

Layout property as it applies to the Slide and SlideRange objects.

PpSlideLayout

PpSlideLayout can be one of these PpSlideLayout constants.
ppLayoutBlank
ppLayoutChart
ppLayoutChartAndText
ppLayoutClipartAndText
ppLayoutClipArtAndVerticalText
ppLayoutFourObjects
ppLayoutLargeObject
ppLayoutMediaClipAndText
ppLayoutMixed
ppLayoutObject
ppLayoutObjectAndText
ppLayoutObjectOverText
ppLayoutOrgchart
ppLayoutTable
ppLayoutText
ppLayoutTextAndChart
ppLayoutTextAndClipart
ppLayoutTextAndMediaClip
ppLayoutTextAndObject
ppLayoutTextAndTwoObjects
ppLayoutTextOverObject
ppLayoutTitle
ppLayoutTitleOnly
ppLayoutTwoColumnText
ppLayoutTwoObjectsAndText
ppLayoutTwoObjectsOverText
ppLayoutVerticalText
ppLayoutVerticalTitleAndText
ppLayoutVerticalTitleAndTextOverChart

expression.Layout

expression   Required. An expression that returns one of the above objects.

Example

As it applies to the DiagramNode object.

The following example changes the layout of a newly-crated diagram.

  Sub ChangeDiagramLayout()

    Dim dgnNode As DiagramNode
    Dim shpDiagram As Shape
    Dim intNodes As Integer

    Set shpDiagram = ActivePresentation.Slides(1).Shapes.AddDiagram _
        (Type:=msoDiagramOrgChart, Left:=10, Top:=15, _
        Width:=400, Height:=475)
    Set dgnNode = shpDiagram.DiagramNode.Children.AddNode

    For intNodes = 1 To 3
        dgnNode.Children.AddNode
    Next intNodes

    dgnNode.Layout = msoOrgChartLayoutRightHanging

End Sub

As it applies to the Slide object. 

This example changes the layout of slide one in the active presentation to include a title and subtitle if it initially has only a title.

  With ActivePresentation.Slides(1)
    If .Layout = ppLayoutTitleOnly Then
        .Layout = ppLayoutTitle
    End If
End With