Format related procedures in class Presentation (PowerPoint VBA)

This page presents procedures from class Presentation related to the theme Format: ApplyTheme, ColorSchemes, EnvelopeVisible, ExtraColors, Fonts, LayoutDirection, RemoveDocumentInformation and RemovePersonalInformation

ApplyTheme

Applies a theme or design template to the specified presentation.

Syntax : expression.ApplyTheme (themeName)

themeName: The path and name of the theme file (.thmx) or design template file (.pot) to apply to the Presentation object.

Dim strthemeName As String: strthemeName ="C:\Program Files\Microsoft Office\Templates\MyTheme.thmx" 
ActivePresentation.ApplyTheme themeName:=strthemeName

ColorSchemes

Returns a ColorSchemes collection that represents the color schemes in the specified presentation.

Dim cssColorSchemes As ColorSchemes
Set cssColorSchemes = ActivePresentation.ColorSchemes

EnvelopeVisible

Determines whether the email message header is visible in the document window.

The value of the EnvelopeVisible property can be one of these MsoTriState constants.

ActivePresentation.EnvelopeVisible = msoTrue

ExtraColors

Returns an ExtraColors object that represents the extra colors available in the specified presentation.

With ActivePresentation
    Set rect = .Slides(1).Shapes _
        .AddShape(msoShapeRectangle, 50, 50, 100, 200)
    rect.Fill.ForeColor.RGB = .ExtraColors(1)
End With

Fonts

Returns a Fonts collection that represents all fonts used in the specified presentation.

Application.ActivePresentation.Fonts _
    .Replace "Times New Roman", "Courier"

LayoutDirection

Returns or sets the layout direction for the user interface.

Possible Values are ppDirectionLeftToRight - Left-to-right layout, ppDirectionMixed - Mixed layout, ppDirectionRightToLeft - Right-to-left layout.

The value of the LayoutDirection property can be one of these PpDirection constants. The default value depends on the language support you have selected or installed.

Application.ActivePresentation.LayoutDirection = ppDirectionRightToLeft

RemoveDocumentInformation

Removes document information, such as personal information, comments, and document properties, from a Microsoft PowerPoint presentation.

The Type parameter value can be a combination of one or more of these PpRemoveDocInfoType constants.

Syntax : expression.RemoveDocumentInformation (Type)

Type: Type of information to be removed.

ActivePresentation.RemoveDocumentInformation Type:=ppRDIAll

RemovePersonalInformation

Determines whether Microsoft PowerPoint should remove all user information from comments and revisions upon saving a presentation.

The value of the RemovePersonalInformation property can be one of these MsoTriState constants.

ActivePresentation.RemovePersonalInformation = msoTrue