Class Guide (PowerPoint VBA)

The class Guide represents a drawing guide in the presentation or custom layout. To use a Guide class variable it first needs to be instantiated, for example


Dim gui as Guide
Set gui = ActivePresentation.SlideMaster.CustomLayouts(1).Guides(Index:=1)

Color

Returns a ColorFormat object that represents the color of the drawing guide.


Dim cftColor As ColorFormat
Set cftColor = ActivePresentation.SlideMaster.CustomLayouts(1).Guides(1).Color

Delete

Removes the drawing guide from the presentation or custom layout.


ActivePresentation.SlideMaster.CustomLayouts(1).Guides(1).Delete

Orientation

Returns the orientation of the drawing guide (horizontal or vertical) as a constant from the PpGuideOrientation enumeration. Possible return values are ppHorizontalGuide - Represents a horizontal guide, spanning from the left to right of the slide editing window, ppVerticalGuide - Represents a vertical guide, spanning from top edge to bottom of the slide editing window.


Dim pgoOrientation As PpGuideOrientation
pgoOrientation = ActivePresentation.SlideMaster.CustomLayouts(1).Guides(1).Orientation

Position

Returns or sets a Single that represents the position of the drawing guide along the x- or y-axis.


ActivePresentation.SlideMaster.CustomLayouts(1).Guides(1).Position =