PowerPoint 2013

 Copy code hover
[image]

PowerPoint 2013
Send feedback

Published: March 5, 2013

PowerPoint product logo

Use PowerPoint 2013 to create powerful presentation solutions.

Explore PowerPoint 2013 developer resources

New features and scenarios

New features

What's new for PowerPoint 2013 developers

Get started

Get started

Getting Started with VBA in PowerPoint 2010

References

Reference

PowerPoint 2013 developer reference

Find training and other resources about Office

Email us to suggest content Subscribe to the Office developer RSS Read Office developer blogs Read Office developer forums Visit MSDN Office and SharePoint on Facebook Follow @MSDN_Office on Twitter

Download

Office updates

Office 365

Office code samples

Office scripts and sample files

Office downloads

Office 365 downloads

How To

Train Office 2010 end users

Office developer videos

Office IT pro training

Office IT pro videos

Sites

Office 365 IT pros

Office 2013 Resource Kit

SharePoint developers

SharePoint IT pros

Office.com

Microsoft.com: Office 365

Additional resources

  • Access 2013

  • Excel 2013

  • InfoPath 2013

  • Office 2013

  • OneNote 2013

  • Outlook 2013

  • Project 2013

  • Publisher 2013

  • SharePoint 2013

  • Visio 2013

  • Word 2013

© 2013 Microsoft Corporation. All rights reserved.


PpBaselineAlignment Enumeration (PowerPoint)

 Copy code hover
[image]

PpBaselineAlignment Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the base line alignment for a paragraph.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppBaselineAlignBaseline | 1 | Aligned to the baseline.
ppBaselineAlignCenter | 3 | Aligned to the center.
ppBaselineAlignFarEast50 | 4 | Align FarEast50.
ppBaselineAlignMixed | -2 | Mixed alignment.
ppBaselineAlignTop | 2 | Aligned to the top.


AnimationSettings.AnimationOrder Property (PowerPoint)

 Copy code hover
[image]

AnimationSettings.AnimationOrder Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets an integer that represents the position of the specified shape within the collection of shapes to be animated. Read/write.

Syntax

expression .AnimationOrder

expression A variable that represents an AnimationSettings object.

Return Value

Long

Remarks

You won't see effects of setting this property unless the specified shape gets animated. For a shape to be animated, the TextLevelEffect property of the AnimationSettings object for the shape must be set to something other than ppAnimateLevelNone and the Animate property must be set to True.

Note Note

Setting the AnimationOrder property to a value that is less than the greatest existing AnimationOrder property value can shift the animation order.

Example

This example specifies that shape two on slide two in the active presentation be animated second.

VBA Copy code Copy code
ActivePresentation.Slides(2).Shapes(2) _

    .AnimationSettings.AnimationOrder = 2

See also

Concepts

AnimationSettings Object

Other resources

AnimationSettings Object Members


LegendEntry Properties (PowerPoint)

 Copy code hover
[image]

LegendEntry Properties (PowerPoint)
Send feedback

Published: July 12, 2012

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Font | Returns the font of the specified object. Read-only ChartFont.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Height | Returns the height, in points, of the object. Read-only Double.
Index | Returns the index number of the object within the collection of similar objects. Read-only Long.
Left | Returns the distance, in points, from the left edge of the object to the left edge of the chart area. Read-only Double.
LegendKey | Returns the legend key that is associated with the entry. Read-only LegendKey.
Parent | Returns the parent for the specified object. Read-only Object.
Top | Returns the distance, in points, from the top edge of the object to the top of the first row (on a worksheet) or the top of the chart area (on a chart). Read-only Double.
Width | Returns the width, in points, of the object. Read-only Double.


ShapeRange Object (PowerPoint)

 Copy code hover
[image]

ShapeRange Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a shape range, which is a set of shapes on a document. A shape range can contain as few as a single shape or as many as all the shapes on the document.

Remarks

You can include whichever shapes you want — chosen from among all the shapes on the document or all the shapes in the selection — to construct a shape range. For example, you could construct a ShapeRange collection that contains the first three shapes on a document, all the selected shapes on a document, or all the freeforms on a document.

For an overview of how to work with either a single shape or with more than one shape at a time, see How to: Work with Shapes (Drawing Objects) .

The following examples describe how to:

  • Return a set of shapes you specify by name or index number.

  • Return all or some of the selected shapes on a document.

Example

Use Shapes.Range(index), where index is the name or index number of the shape or an array that contains either names or index numbers of shapes, to return a ShapeRange collection that represents a set of shapes on a document. You can use the Array function to construct an array of names or index numbers. The following example sets the fill pattern for shapes one and three on myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes.Range(Array(1, 3)).Fill _

    .Patterned msoPatternHorizontalBrick

The following example sets the fill pattern for the shapes named "Oval 4" and "Rectangle 5" on myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

Set myRange = myDocument.Shapes _

    .Range(Array("Oval 4", "Rectangle 5"))

myRange.Fill.Patterned msoPatternHorizontalBrick

Although you can use the Range method to return any number of shapes or slides, it is simpler to use the Item method if you want to return only a single member of the collection. For example, Shapes(1) is simpler than Shapes.Range(1).

Use the ShapeRange property of the Selection object to return all the shapes in the selection. The following example sets the fill foreground color for all the shapes in the selection in window one, assuming that there's at least one shape in the selection.

VBA Copy code Copy code
Windows(1).Selection.ShapeRange.Fill.ForeColor _

    .RGB = RGB(255, 0, 255)

Use Selection.ShapeRange(index), where index is the shape name or the index number, to return a single shape within the selection. The following example sets the fill foreground color for shape two in the collection of selected shapes in window one, assuming that there are at least two shapes in the selection.

VBA Copy code Copy code
Windows(1).Selection.ShapeRange(2).Fill.ForeColor _

    .RGB = RGB(255, 0, 255)

See also

Concepts

PowerPoint Object Model Reference

Other resources

ShapeRange Object Members


SlideRange.Layout Property (PowerPoint)

 Copy code hover
[image]

SlideRange.Layout Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a PpSlideLayout constant that represents the slide layout. Read/write.

Syntax

expression .Layout

expression A variable that represents a SlideRange object.

Remarks

The value of the Layout property 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

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


Chart.ChartStyle Property (PowerPoint)

 Copy code hover
[image]

Chart.ChartStyle Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the chart style for the chart. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ChartStyle

expression A variable that represents a Chart object.

Remarks

You can use a number from 1 to 48 to set the chart style.

See also

Concepts

Chart Object

Other resources

Chart Object Members


Learn About Language-Specific Information (PowerPoint)

 Copy code hover
[image]

Learn About Language-Specific Information (PowerPoint)
Send feedback

Language-specific Help topics apply only if the language-specific feature is available. To learn about working in another language or installing the proofing tools for another language, see Office.com, or see your system administrator for more information.


DataLabel.Characters Property (PowerPoint)

 Copy code hover
[image]

DataLabel.Characters Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a ChartCharacters object that represents a range of characters within the object text. You can use the ChartCharacters object to format characters within a text string.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Characters(Start, Length)

expression A variable that represents a DataLabel object.

Parameters

Name | Required/Optional | Data Type | Description
Start | Optional | Variant | The first character to be returned. If this argument is either 1 or omitted, this property returns a range of characters starting with the first character.
Length | Optional | Variant | The number of characters to be returned. If this argument is omitted, this property returns the remainder of the string (everything after the Start character).

Remarks

The ChartCharacters object is not a collection.

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


Chart.Perspective Property (PowerPoint)

 Copy code hover
[image]

Chart.Perspective Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the perspective for the 3-D chart view. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Perspective

expression A variable that represents a Chart object.

Remarks

The value of this property must be between 0 and 100. This property is ignored if the RightAngleAxes property is set to True.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the perspective of the first chart in the active document to 70. You should run the example on a 3-D chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.RightAngleAxes = False

        .Chart.Perspective = 70

    End If

End With

See also

Concepts

Chart Object

Other resources

Chart Object Members


Object model reference (PowerPoint 2013 developer reference)

 Copy code hover
[image]

Object model reference (PowerPoint 2013 developer reference)
Send feedback

This section of the Microsoft PowerPoint 2010 Developer Reference contains documentation for all of the objects, properties, methods, and events contained in the PowerPoint object model. You can use the table of contents to navigate through the documentation.


XlChartPicturePlacement Enumeration (PowerPoint)

 Copy code hover
[image]

XlChartPicturePlacement Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the placement of a user-selected picture on a bar in a 3-D bar or column.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlAllFaces | 7 | Display on all faces.
xlEnd | 2 | Display on end.
xlEndSides | 3 | Display on end and sides.
xlFront | 4 | Display on front.
xlFrontEnd | 6 | Display on front and end.
xlFrontSides | 5 | Display on front and sides.
xlSides | 1 | Display on sides.


Chart.ChartTitle Property (PowerPoint)

 Copy code hover
[image]

Chart.ChartTitle Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the title of the specified chart. Read-only ChartTitle.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ChartTitle

expression A variable that represents a Chart object.

Remarks

The ChartTitle object does not exist and cannot be used unless the HasTitle property for the chart is True.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the text for the title of the first chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1).Chart

    .HasTitle = True

    .ChartTitle.Text = "First Quarter Sales"

End With

See also

Concepts

Chart Object

Other resources

Chart Object Members


Font.NameFarEast Property (PowerPoint)

 Copy code hover
[image]

Font.NameFarEast Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the Asian font name. Read/write.

Syntax

expression .NameFarEast

expression A variable that represents a Font object.

Return Value

String

Remarks

Use the Replace method to change the font that's applied to all text and that appears in the Font box on the Font tab.

Example

This example displays the name of the Asian font applied to the selection.

VBA Copy code Copy code
MsgBox ActiveWindow.Selection.ShapeRange _

    .TextFrame.TextRange.Font.NameFarEast

See also

Concepts

Font Object

Other resources

Font Object Members


ChartGroups.Item Method (PowerPoint)

 Copy code hover
[image]

ChartGroups.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single object from a collection.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Item(Index)

expression A variable that represents a ChartGroups object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Variant | The index number for the object.

Return Value

A ChartGroup object contained by the collection.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example adds drop lines to chart group one for the first chart group of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.ChartGroups.Item(1).HasDropLines = True

    End If

End With

See also

Concepts

ChartGroups Object

Other resources

ChartGroups Object Members


TimeLine Object (PowerPoint)

 Copy code hover
[image]

TimeLine Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Stores animation information for a Master, Slide, or SlideRange object.

Example

Use the TimeLine property of the Master , Slide , or SlideRange object to return a TimeLine object.

The TimeLine object's MainSequence property gains access to the main animation sequence, while the InteractiveSequences property gains access to the collection of interactive animation sequences of a slide or slide range.

To reference a timeline object, use syntax similar to these code examples:

VBA Copy code Copy code
ActivePresentation.Slides(1).TimeLine.MainSequence

ActivePresentation.SlideMaster.TimeLine.InteractiveSequences

ActiveWindow.Selection.SlideRange.TimeLine.InteractiveSequences

See also

Concepts

PowerPoint Object Model Reference

Other resources

TimeLine Object Members


LineFormat.ForeColor Property (PowerPoint)

 Copy code hover
[image]

LineFormat.ForeColor Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets a ColorFormat object that represents the foreground color for the fill, line, or shadow. Read/write.

Syntax

expression .ForeColor

expression A variable that represents a LineFormat object.

Return Value

ColorFormat

Example

This example adds a rectangle to myDocument and then sets the foreground color, background color, and gradient for the rectangle's fill.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes _

        .AddShape(msoShapeRectangle, 90, 90, 90, 50).Fill

    .ForeColor.RGB = RGB(128, 0, 0)

    .BackColor.RGB = RGB(170, 170, 170)

    .TwoColorGradient msoGradientHorizontal, 1

End With

This example adds a patterned line to myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddLine(10, 100, 250, 0).Line

    .Weight = 6

    .ForeColor.RGB = RGB(0, 0, 255)

    .BackColor.RGB = RGB(128, 0, 0)

    .Pattern = msoPatternDarkDownwardDiagonal

End With

See also

Concepts

LineFormat Object

Other resources

LineFormat Object Members


DataLabel.ShowPercentage Property (PowerPoint)

 Copy code hover
[image]

DataLabel.ShowPercentage Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True to display the percentage value for the data labels on a chart. False to hide the value. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ShowPercentage

expression A variable that represents a DataLabel object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example enables the percentage value to be shown for the data labels of the first series on the first chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).DataLabels. _

            ShowPercentage = True

    End If

End With

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


ActionSetting Members (PowerPoint)

 Copy code hover
[image]

ActionSetting Members (PowerPoint)
Send feedback

Published: July 16, 2012

Contains information about how the specified shape or text range reacts to mouse actions during a slide show.

Properties

Name | Description
Action | Returns or sets the type of action that will occur when the specified shape is clicked or the mouse pointer is positioned over the shape during a slide show. Read/write.
ActionVerb | Returns or sets a string that contains the OLE verb that will be run when the user clicks the specified shape or passes the mouse pointer over it during a slide show. Read/write.
AnimateAction | Specifies whether the color of the specified shape is momentarily inverted when the specified mouse action occurs. Read/write.
Application | Returns an Application object that represents the creator of the specified object.
Hyperlink | Returns a Hyperlink object that represents the hyperlink for the specified shape. Read-only.
Parent | Returns the parent object for the specified object.
Run | Returns or sets the name of the presentation or macro to be run when the specified shape is clicked or the mouse pointer passes over the shape during a slide show. Read/write.
ShowAndReturn | Determines if and under what circumstances Microsoft PowerPoint returns to the initiating slide show. Read/write.
SlideShowName | Returns or sets the name of the custom slide show to run in response to a mouse action on the shape during a slide show. Read/write.
SoundEffect | Returns a SoundEffect object that represents the sound to be played during the transition to the specified slide. Read-only.


Application.SmartArtLayouts Property (PowerPoint)

 Copy code hover
[image]

Application.SmartArtLayouts Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the SmartArt layout of the current Application object. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .SmartArtLayouts

expression A variable that represents an Application object.

See also

Concepts

Application Object

Other resources

Application Object Members


Presentations Object (PowerPoint)

 Copy code hover
[image]

Presentations Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

A collection of all the Presentation objects in Microsoft PowerPoint. Each Presentation object represents a presentation that's currently open in PowerPoint.

Remarks

The Presentations collection doesn't include open add-ins, which are a special kind of hidden presentation. You can, however, return a single open add-in if you know its file name. For example Presentations("oscar.ppa") will return the open add-in named "Oscar.ppa" as a Presentation object. However, it is recommended that the AddIns collection be used to return open add-ins.

If your Visual Studio solution includes the Microsoft.Office.Interop.PowerPoint reference, this collection maps to the following types:

  • Microsoft.Office.Interop.PowerPoint.Presentations.GetEnumerator (to enumerate the Presentation objects.)

Example

Use the Presentations property to return the Presentations collection. Use the Add method to create a new presentation and add it to the collection. The following example creates a new presentation, adds a slide to the presentation, and then saves the presentation.

VBA Copy code Copy code
Set newPres = Presentations.Add(True)
newPres.Slides.Add 1, 1
newPres.SaveAs "Sample"

Use Presentations(index), where index is the presentation's name or index number, to return a single Presentation object. The following example prints presentation one.

VBA Copy code Copy code
Presentations(1).PrintOut

Use the Open method to open a presentation and add it to the Presentations collection. The following example opens the file Sales.ppt as a read-only presentation.

VBA Copy code Copy code
Presentations.Open FileName:="sales.ppt", ReadOnly:=True

See also

Concepts

PowerPoint Object Model Reference

Other resources

Presentations Object Members


Timing.TriggerShape Property (PowerPoint)

 Copy code hover
[image]

Timing.TriggerShape Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns a Shape object that represents the shape associated with an animation trigger. Read/write.

Syntax

expression .TriggerShape

expression A variable that represents a Timing object.

Return Value

Shape

Example

The following example adds two shapes to a slide, adds an animation to a shape, and begins the animation when the other shape is clicked.

VBA Copy code Copy code
Sub AddShapeSetTiming()

    Dim effDiamond As Effect

    Dim shpRectangle As Shape

    Set shpOval = _

      ActivePresentation.Slides(1).Shapes. _

      AddShape(Type:=msoShapeOval, Left:=400, Top:=100, Width:=100, Height:=50)

    Set shpRectangle = ActivePresentation.Slides(1).Shapes.  _

      AddShape(Type:=msoShapeRectangle, Left:=100, Top:=100, Width:=50, Height:=50)

    Set effDiamond = ActivePresentation.Slides(1).TimeLine. _

      InteractiveSequences.Add().AddEffect(Shape:=shpRectangle,  _

      effectId:=msoAnimEffectPathDiamond, trigger:=msoAnimTriggerOnShapeClick)

    With effDiamond.Timing

        .Duration = 5

        .TriggerShape = shpOval

    End With

End Sub

See also

Concepts

Timing Object

Other resources

Timing Object Members


CellRange Members (PowerPoint)

 Copy code hover
[image]

CellRange Members (PowerPoint)
Send feedback

Published: July 16, 2012

A collection of Cell objects in a table column or row. The CellRange collection represents all the cells in the specified column or row. To use the CellRange collection, use the Cells keyword.

Methods

Name | Description
Item | Returns a single Cell object from the specified CellRange collection.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Borders | Returns a Borders collection that represents the borders and diagonal lines for the specified Cell object or CellRange collection. Read-only.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


SetEffect Properties (PowerPoint)

 Copy code hover
[image]

SetEffect Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Parent | Returns the parent object for the specified object.
Property | Sets or returns an MsoAnimProperty constant that represents an animation property. Read/write.
To | Sets or returns a Variant that represents the value or ending value of the SetEffect object's Type property. Read/write.


Point.ApplyPictToSides Property (PowerPoint)

 Copy code hover
[image]

Point.ApplyPictToSides Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if a picture is applied to the sides of the point or all points in the series. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ApplyPictToSides

expression A variable that represents a Point object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example applies pictures to the sides of all points in the first series of the first chart in the active document. The series must already have pictures applied to it (setting this property changes the picture orientation).

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).ApplyPictToSides = True

    End If

End With

See also

Concepts

Point Object

Other resources

Point Object Members


ShadowFormat Object (PowerPoint)

 Copy code hover
[image]

ShadowFormat Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents shadow formatting for a shape.

Example

Use the Shadow property to return a ShadowFormat object. The following example adds a shadowed rectangle to myDocument. The semitransparent, blue shadow is offset 5 points to the right of the rectangle and 3 points above it.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddShape(msoShapeRectangle, _

        50, 50, 100, 200).Shadow

    .ForeColor.RGB = RGB(0, 0, 128)

    .OffsetX = 5

    .OffsetY = -3

    .Transparency = 0.5

    .Visible = True

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

ShadowFormat Object Members


ParagraphFormat.LineRuleWithin Property (PowerPoint)

 Copy code hover
[image]

ParagraphFormat.LineRuleWithin Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether line spacing between base lines is set to a specific number of points or lines. Read/write.

Syntax

expression .LineRuleWithin

expression A variable that represents a ParagraphFormat object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | Line spacing between base lines is set to a specific number of points.
msoTrue | Line spacing between base lines is set to a specific number of lines.

Example

This example displays a message box that shows the setting for line spacing for text in shape two on slide one in the active presentation.

VBA Copy code Copy code
With Application.ActivePresentation.Slides(1).Shapes(2).TextFrame

    With .TextRange.ParagraphFormat

        ls = .SpaceWithin

        If .LineRuleWithin Then

            lsUnits = " lines"

        Else

            lsUnits = " points"

        End If

    End With

End With

MsgBox "Current line spacing: " & ls & lsUnits

See also

Concepts

ParagraphFormat Object

Other resources

ParagraphFormat Object Members


TextRange.Runs Method (PowerPoint)

 Copy code hover
[image]

TextRange.Runs Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a TextRange object that represents the specified subset of text runs. A text run consists of a range of characters that share the same font attributes.

Syntax

expression .Runs(Start, Length)

expression A variable that represents a TextRange object.

Parameters

Name | Required/Optional | Data Type | Description
Start | Optional | Long | The first run in the returned range.
Length | Optional | Long | The number of runs to be returned.

Return Value

TextRange

Remarks

If both Start and Length are omitted, the returned range starts with the first run and ends with the last paragraph in the specified range.

If Start is specified but Length is omitted, the returned range contains one run.

If Length is specified but Start is omitted, the returned range starts with the first run in the specified range.

If Start is greater than the number of runs in the specified text, the returned range starts with the last run in the specified range.

If Length is greater than the number of runs from the specified starting run to the end of the text, the returned range contains all those runs.

A run consists of all characters from the first character after a font change to the second-to-last character that has the same font attributes. For example, consider the following sentence:

This italic word is not bold.

In the preceding sentence, the first run consists of the word "This" only if the space after the word "This" isn't formatted as italic (if the space is italic, the first run is only the first three characters, or "Thi"). Likewise, the second run contains the word "italic" only if the space after the word is formatted as italic.

For information about counting or looping through the runs in a text range, see the TextRange object.

Example

This example formats the second run in shape two on slide one in the active presentation as bold italic if it is already italic.

VBA Copy code Copy code
With Application.ActivePresentation.Slides(1).Shapes(2) _

        .TextFrame.TextRange

    With .Runs(2).Font

        If .Italic Then

            .Bold = True

        End If

    End With

End With

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


Legend.Creator Property (PowerPoint)

 Copy code hover
[image]

Legend.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents a Legend object.

See also

Concepts

Legend Object

Other resources

Legend Object Members


Shapes.AddTextbox Method (PowerPoint)

 Copy code hover
[image]

Shapes.AddTextbox Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Creates a text box. Returns a Shape object that represents the new text box.

Syntax

expression .AddTextbox(Orientation, Left, Top, Width, Height)

expression A variable that represents a Shapes object.

Parameters

Name | Required/Optional | Data Type | Description
Orientation | Required | MsoTextOrientation | The text orientation. Some of these constants may not be available to you, depending on the language support (U.S. English, for example) that you've selected or installed.
Left | Required | Single | The position, measured in points, of the left edge of the text box relative to the left edge of the slide.
Top | Required | Single | The position, measured in points, of the top edge of the text box relative to the top edge of the slide.
Width | Required | Single | The width of the text box, measured in points.
Height | Required | Single | The height of the text box, measured in points.

Return Value

Shape

Example

This example adds a text box that contains the text "Test Box" to myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)
myDocument.Shapes.AddTextbox(Type:=msoTextOrientationHorizontal, _
    Left:=100, Top:=100, Width:=200, Height:=50).TextFrame _
    .TextRange.Text = "Test Box"

See also

Concepts

Shapes Object

Other resources

Shapes Object Members


Application.AfterShapeSizeChange Event (PowerPoint)

 Copy code hover
[image]

Application.AfterShapeSizeChange Event (PowerPoint)
Send feedback

Occurs after an object (shape, picture, text box, chart, SmartArt as examples) has been resized on the slide.

Version information

Version Added: PowerPoint 2013

Syntax

expression .AfterShapeSizeChange(shp)

expression A variable that represents a Application object.

Parameters

Name | Required/Optional | Data type | Description
shp | Required | Shape | The shape that was resized.
shp | Required | SHAPE |


CalloutFormat.Application Property (PowerPoint)

 Copy code hover
[image]

CalloutFormat.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a CalloutFormat object.

Return Value

Object

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

CalloutFormat Object

Other resources

CalloutFormat Object Members


ChartTitle.Shadow Property (PowerPoint)

 Copy code hover
[image]

ChartTitle.Shadow Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a value that indicates whether the object has a shadow. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Shadow

expression A variable that represents a ChartTitle object.

See also

Concepts

ChartTitle Object

Other resources

ChartTitle Object Members


SlideRange.FollowMasterBackground Property (PowerPoint)

 Copy code hover
[image]

SlideRange.FollowMasterBackground Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the range of slides follows the slide master background. Read/write.

Syntax

expression .FollowMasterBackground

expression A variable that represents a SlideRange object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified slide or range of slides has a custom background.
msoTrue | The specified slide or range of slides follows the slide master background.

When you create a new slide, the default value for this property is True. If you copy a slide from another presentation, it retains the setting it had in the original presentation. That is, if the slide followed the slide master background in the original presentation, it will automatically follow the slide master background in the new presentation; or, if the slide had a custom background, it will retain that custom background.

Note that the look of the slide's background is determined by the color scheme and background objects and by the background itself. If setting the FollowMasterBackground property alone doesn't give you the results you want, try setting the ColorScheme and DisplayMasterShapes properties as well.

Example

This example copies slide one from presentation two, pastes the slide at the end of presentation one, and matches the slide's background, color scheme, and background objects to the rest of presentation one.

VBA Copy code Copy code
Presentations(2).Slides(1).Copy

With Presentations(1).Slides.Paste

    .FollowMasterBackground = msoTrue

    .ColorScheme = Presentations(1).SlideMaster.ColorScheme

    .DisplayMasterShapes = True

End With

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


Walls.ClearFormats Method (PowerPoint)

 Copy code hover
[image]

Walls.ClearFormats Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Clears the formatting of the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ClearFormats

expression A variable that represents a Walls object.

See also

Concepts

Walls Object

Other resources

Walls Object Members


Gridlines.Border Property (PowerPoint)

 Copy code hover
[image]

Gridlines.Border Property (PowerPoint)
Send feedback

Published: July 16, 2012

Returns the border of the object. Read-only ChartBorder.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Border

expression A variable that represents a GridLines object.


ProtectedViewWindow.Application Property (PowerPoint)

 Copy code hover
[image]

ProtectedViewWindow.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a ProtectedViewWindow object.

See also

Concepts

ProtectedViewWindow Object

Other resources

ProtectedViewWindow Object Members


Adjustments.Application Property (PowerPoint)

 Copy code hover
[image]

Adjustments.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents an Adjustments object.

Return Value

Object

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

Adjustments Object

Other resources

Adjustments Object Members


CustomerData Members (PowerPoint)

 Copy code hover
[image]

CustomerData Members (PowerPoint)
Send feedback

Published: July 12, 2012

Stores information about a customer (such as name, address, telephone number, and so on) or other information in XML form, as a collection of CustomXMLPart objects associated with a Microsoft PowerPoint object.

Methods

Name | Description
Add | Adds a CustomXMLPart to the CustomerData collection of a CustomLayout, Master, Presentation, Shape, or Slide object and returns the CustomXMLPart object created.
Delete | Deletes the specified CustomXMLPart object from the CustomerData collection of a CustomLayout, Master, Presentation, Shape, or Slide object.
Item | Returns the specified CustomXMLPart object from the CustomerData collection. Read-only.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified CustomerData object. Read-only.
Count | Returns the number of CustomXMLPart objects in the CustomerData collection. Read-only.
Parent | Returns the parent object of the specified CustomerData object. Read-only.


RotationEffect.Application Property (PowerPoint)

 Copy code hover
[image]

RotationEffect.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a RotationEffect object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

RotationEffect Object

Other resources

RotationEffect Object Members


Shape.Duplicate Method (PowerPoint)

 Copy code hover
[image]

Shape.Duplicate Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Creates a duplicate of the specified Shape object, adds the new shape to the Shapes collection, and then returns a new ShapeRange object. The duplicated objects are placed at the end of the Shapes collection.

Syntax

expression .Duplicate

expression A variable that represents a Shape object.

Return Value

ShapeRange

Example

This example adds a new, blank slide at the end of the active presentation, adds a diamond shape to the new slide, duplicates the diamond, and then sets properties for the duplicate. The first diamond will have the default fill color for the active color scheme; the second diamond will be offset from the first one and will have the default shadow color.

VBA Copy code Copy code
Set mySlides = ActivePresentation.Slides

Set newSlide = mySlides.Add(mySlides.Count + 1, ppLayoutBlank)

Set firstObj = newSlide.Shapes _

    .AddShape(msoShapeDiamond, 10, 10, 250, 350)

With firstObj.Duplicate

    .Left = 150

    .Fill.ForeColor.SchemeColor = ppShadow

End With

See also

Concepts

Shape Object

Other resources

Shape Object Members


DataLabels.VerticalAlignment Property (PowerPoint)

 Copy code hover
[image]

DataLabels.VerticalAlignment Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets the vertical alignment of the specified object. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .VerticalAlignment

expression A variable that represents a DataLabels object.

Remarks

You can set the value of this property to one of the following XlConstants constants:

  • xlBottom

  • xlCenter

  • xlDistributed

  • xlJustify

  • xlTop

See also

Concepts

DataLabels Object

Other resources

DataLabels Object Members


AddIn.Path Property (PowerPoint)

 Copy code hover
[image]

AddIn.Path Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a String that represents the path to the specified AddIn object. Read-only.

Syntax

expression .Path

expression A variable that represents an AddIn object.

Return Value

String

Remarks

The path doesn't include the final backslash (\) or the name of the specified object.

See also

Concepts

AddIn Object

Other resources

AddIn Object Members


Presentation.CreateVideoStatus Property (PowerPoint)

 Copy code hover
[image]

Presentation.CreateVideoStatus Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the status of creating a video in the current Presentation. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .CreateVideoStatus

expression A variable that represents a Presentation object.

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


SlideShowView.MediaControlsVisible Property (PowerPoint)

 Copy code hover
[image]

SlideShowView.MediaControlsVisible Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Indicates whether the media controls are visible. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .MediaControlsVisible

expression A variable that represents a SlideShowView object.

Return Value

MsoTriState

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


Application.WindowActivate Event (PowerPoint)

 Copy code hover
[image]

Application.WindowActivate Event (PowerPoint)
See also Send feedback

Published: July 16, 2012

Occurs when the application window or any document window is activated.

Syntax

expression .WindowActivate(Pres, Wn)

expression A variable that represents an Application object.

Parameters

Name | Required/Optional | Data Type | Description
Pres | Required | Presentation | The presentation displayed in the activated window.
Wn | Required | DocumentWindow | The activated document window.

Remarks

For information about using events with the Application object, see How to: Use Events with the Application Object.

If your Visual Studio solution includes the Microsoft.Office.Interop.PowerPoint reference, this event maps to the following types:

  • Microsoft.Office.Interop.PowerPoint.EApplication_WindowActivateEventHandler (the WindowActivate delegate.)

  • Microsoft.Office.Interop.PowerPoint.EApplication_Event.WindowActivate (the WindowActivate event.)

Example

This example opens every activated presentation in slide sorter view.

VBA Copy code Copy code
Private Sub App_WindowActivate (ByVal Pres As Presentation, ByVal Wn As DocumentWindow)
    Wn.ViewType = ppViewSlideSorter
End Sub

See also

Concepts

Application Object

Other resources

Application Object Members


FillFormat.Solid Method (PowerPoint)

 Copy code hover
[image]

FillFormat.Solid Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Sets the specified fill to a uniform color. Use this method to convert a gradient, textured, patterned, or background fill back to a solid fill.

Syntax

expression .Solid

expression A variable that represents a FillFormat object.

Example

This example converts all fills on myDocument to uniform red fills.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

For Each s In myDocument.Shapes

    With s.Fill

        .Solid

        .ForeColor.RGB = RGB(255, 0, 0)

    End With

Next

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


SeriesCollection.Creator Property (PowerPoint)

 Copy code hover
[image]

SeriesCollection.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents a SeriesCollection object.

See also

Concepts

SeriesCollection Object

Other resources

SeriesCollection Object Members


Slide.CustomLayout Property (PowerPoint)

 Copy code hover
[image]

Slide.CustomLayout Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a CustomLayout object that represents the custom layout associated with the specified slide. Read-only.

Syntax

expression .CustomLayout

expression A variable that represents a Slide object.

Return Value

CustomLayout

See also

Concepts

Slide Object

Other resources

Slide Object Members


Timing.Restart Property (PowerPoint)

 Copy code hover
[image]

Timing.Restart Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents whether the animation effect restarts after the effect has started once. Read/write.

Syntax

expression .Restart

expression A variable that represents a Timing object.

Return Value

MsoAnimEffectRestart

Remarks

The value of the Restart property can be one of these MsoAnimEffectRestart constants. The default is msoAnimEffectRestartNever.

msoAnimEffectRestartAlways

msoAnimEffectRestartNever

msoAnimEffectRestartWhenOff

Example

The following example adds a shape and an animation to it, then sets the animation's restart behavior.

VBA Copy code Copy code
Sub AddShapeSetTiming()

    Dim effDiamond As Effect

    Dim shpRectangle As Shape

    'Adds shape and sets animation

    Set shpRectangle = ActivePresentation.Slides(1).Shapes _

        .AddShape(Type:=msoShapeRectangle, Left:=100, Top:=100, _

        Width:=50, Height:=50)

    Set effDiamond = ActivePresentation.Slides(1).TimeLine.MainSequence _

        .AddEffect(Shape:=shpRectangle, effectId:=msoAnimEffectPathDiamond)

    With effDiamond.Timing

        .Duration = 3

        .RepeatDuration = 5

        .RepeatCount = 3

        .Restart = msoAnimEffectRestartAlways

    End With

End Sub

See also

Concepts

Timing Object

Other resources

Timing Object Members


Trendline.Format Property (PowerPoint)

 Copy code hover
[image]

Trendline.Format Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Format

expression A variable that represents a Trendline object.

See also

Concepts

Trendline Object

Other resources

Trendline Object Members


PlotArea.Application Property (PowerPoint)

 Copy code hover
[image]

PlotArea.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents a PlotArea object.

See also

Concepts

PlotArea Object

Other resources

PlotArea Object Members


Slide.Hyperlinks Property (PowerPoint)

 Copy code hover
[image]

Slide.Hyperlinks Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Hyperlinks collection that represents all the hyperlinks on the specified slide. Read-only.

Syntax

expression .Hyperlinks

expression A variable that represents a Slide object.

Return Value

Hyperlinks

Example

This example allows the user to update an outdated Internet address for all hyperlinks in the active presentation.

VBA Copy code Copy code
oldAddr = InputBox("Old Internet address")

newAddr = InputBox("New Internet address")

For Each s In ActivePresentation.Slides

    For Each h In s.Hyperlinks

        If LCase(h.Address) = oldAddr Then h.Address = newAddr

    Next

Next

See also

Concepts

Slide Object

Other resources

Slide Object Members


PpSelectionType Enumeration (PowerPoint)

 Copy code hover
[image]

PpSelectionType Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Constants that specify the type of selection, returned by the Type property of the Selection object.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppSelectionNone | 0 | None
ppSelectionShapes | 2 | Shapes
ppSelectionSlides | 1 | Slides
ppSelectionText | 3 | Text


SlideShowView.Parent Property (PowerPoint)

 Copy code hover
[image]

SlideShowView.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a SlideShowView object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


ShapeRange.Cut Method (PowerPoint)

 Copy code hover
[image]

ShapeRange.Cut Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the specified object and places it on the Clipboard.

Syntax

expression .Cut

expression A variable that represents a ShapeRange object.

Example

This example deletes shapes one and two from slide one in the active presentation, places copies of them on the Clipboard, and then pastes the copies onto slide two.

VBA Copy code Copy code
With ActivePresentation

    .Slides(1).Shapes.Range(Array(1, 2)).Cut

    .Slides(2).Shapes.Paste

End With

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


RulerLevels.Application Property (PowerPoint)

 Copy code hover
[image]

RulerLevels.Application Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a RulerLevels object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

RulerLevels Object

Other resources

RulerLevels Object Members


AddIn.FullName Property (PowerPoint)

 Copy code hover
[image]

AddIn.FullName Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the name of the specified add-in or saved presentation, including the path, the current file system separator, and the file name extension. Read-only.

Syntax

expression .FullName

expression A variable that represents an AddIn object.

Return Value

String

Remarks

This property is equivalent to the Path property, followed by the current file system separator, followed by the Name property.

Example

This example displays the path and file name of every available add-in.

VBA Copy code Copy code
For Each a In Application.AddIns

    MsgBox a.FullName

Next a

This example displays the path and file name of the active presentation (assuming that the presentation has been saved).

VBA Copy code Copy code
MsgBox Application.ActivePresentation.FullName

See also

Concepts

AddIn Object

Other resources

AddIn Object Members


Broadcast.PresenterServiceUrl Property (PowerPoint)

 Copy code hover
[image]

Broadcast.PresenterServiceUrl Property (PowerPoint)
Send feedback

If a broadcast is in progress, returns a String that represents the URL of the presenter service hosting the broadcast. Read-only.

Version information

Version Added: PowerPoint 2013

Syntax

expression .PresenterServiceUrl

expression A variable that represents a Broadcast object.

Remarks

If a broadcast is not in progress, PresenterServiceUrl returns an empty string.

Property value

STRING


PlotArea Methods (PowerPoint)

 Copy code hover
[image]

PlotArea Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
ClearFormats | Clears the formatting of the object.
Select | Selects the object.


TextStyleLevel Properties (PowerPoint)

 Copy code hover
[image]

TextStyleLevel Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Font | Returns a Font object that represents character formatting. Read-only.
ParagraphFormat | Returns a ParagraphFormat object that represents paragraph formatting for the specified text. Read-only.
Parent | Returns the parent object for the specified object.


ThreeDFormat.ContourWidth Property (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.ContourWidth Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the width of the contour around the specified ThreeDFormat object, in points. Read/write.

Syntax

expression .ContourWidth

expression A variable that represents a ThreeDFormat object.

Return Value

Single

Remarks

The maximum value of the ContourWidth property is 144 points.

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


PublishObjects Properties (PowerPoint)

 Copy code hover
[image]

PublishObjects Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


ActionSettings.Count Property (PowerPoint)

 Copy code hover
[image]

ActionSettings.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents an ActionSettings object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

ActionSettings Object

Other resources

ActionSettings Object Members


PrintOptions.SlideShowName Property (PowerPoint)

 Copy code hover
[image]

PrintOptions.SlideShowName Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the name of the custom slide show to print. Read/write .

Syntax

expression .SlideShowName

expression A variable that represents a PrintOptions object.

Return Value

String

Remarks

To print a custom slide show, you must first set the RangeType property to ppPrintNamedSlideShow .

Example

This example prints an existing custom slide show named "tech talk."

VBA Copy code Copy code
With ActivePresentation.PrintOptions

    .RangeType = ppPrintNamedSlideShow

    .SlideShowName = "tech talk"

End With

ActivePresentation.PrintOut

See also

Concepts

PrintOptions Object

Other resources

PrintOptions Object Members


PpUpdateOption Enumeration (PowerPoint)

 Copy code hover
[image]

PpUpdateOption Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Constants that specify how hyperlinks in presentaitons should be updated, passed to and returned by the AutoUpdate property of the LinkFormat object.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppUpdateOptionAutomatic | 2 | Link will be updated each time the presentation is opened or the source file changes.
ppUpdateOptionManual | 1 | Link will be updated only when the user specifically asks to update the presentation.
ppUpdateOptionMixed | -2 | Mixed


CalloutFormat.CustomLength Method (PowerPoint)

 Copy code hover
[image]

CalloutFormat.CustomLength Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Specifies that the first segment of the callout line (the segment attached to the text callout box) retain a fixed length whenever the callout is moved.

Syntax

expression .CustomLength(Length)

expression A variable that represents a CalloutFormat object.

Parameters

Name | Required/Optional | Data Type | Description
Length | Required | Single | The length of the first segment of the callout, in points.

Return Value

Nothing

Remarks

Use the AutomaticLength method to specify that the first segment of the callout line be scaled automatically whenever the callout is moved. Applies only to callouts whose lines consist of more than one segment (types msoCalloutThree and msoCalloutFour).

Applying this method sets the AutoLength property to False and sets the Length property to the value specified for the Length argument.

Example

This example switches between an automatically scaling first segment and one with a fixed length for the callout line for shape one on myDocument. For the example to work, shape one must be a callout.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(1).Callout

    If .AutoLength Then

        .CustomLength 50

    Else

        .AutomaticLength

    End If

End With

See also

Concepts

CalloutFormat Object

Other resources

CalloutFormat Object Members


CustomLayout.MoveTo Method (PowerPoint)

 Copy code hover
[image]

CustomLayout.MoveTo Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Moves the specified CustomLayout object to a different position in the CustomLayouts collection.

Syntax

expression .MoveTo(toPos)

expression A variable that represents a CustomLayout object.

Parameters

Name | Required/Optional | Data Type | Description
toPos | Required | Long | The index position in the CustomLayouts collection to which the CustomLayout object will be moved.

See also

Concepts

CustomLayout Object

Other resources

CustomLayout Object Members


Application.FileDialog Property (PowerPoint)

 Copy code hover
[image]

Application.FileDialog Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a FileDialog object that represents a single instance of a file dialog box. Read-only.

Syntax

expression .FileDialog(Type)

expression A variable that represents an Application object.

Parameters

Name | Required/Optional | Data Type | Description
Type | Required | MsoFileDialogType | The type of dialog to return.

Return Value

FileDialog

Remarks

The value of the Type parameter can be one of these MsoFileDialogType constants.

msoFileDialogFilePicker

msoFileDialogFolderPicker

msoFileDialogOpen

msoFileDialogSaveAs

Example

This example displays the Save As dialog box.

VBA Copy code Copy code
Sub ShowSaveAsDialog()

    Dim dlgSaveAs As FileDialog

    Set dlgSaveAs = Application.FileDialog( _

        Type:=msoFileDialogSaveAs)

    dlgSaveAs.Show

End Sub

This example displays the Open dialog box and allows a user to select multiple files to open.

VBA Copy code Copy code
Sub ShowFileDialog()

    Dim dlgOpen As FileDialog

    Set dlgOpen = Application.FileDialog( _

        Type:=msoFileDialogOpen)

    With dlgOpen

        .AllowMultiSelect = True

        .Show

    End With

End Sub

See also

Concepts

Application Object

Other resources

Application Object Members


DisplayUnitLabel Properties (PowerPoint)

 Copy code hover
[image]

DisplayUnitLabel Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Caption | Returns or sets the display unit label text. Read/write String.
Characters | Returns a ChartCharacters object that represents a range of characters within the object text. You can use the ChartCharacters object to format characters within a text string.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Formula | Returns or sets the object's formula in A1-style notation. Read/write.
FormulaLocal | Returns or sets the formula for the object, using A1-style references in the language of the user. Read/write String.
FormulaR1C1 | Returns or sets the formula for the object, using R1C1-style notation in the language of the macro. Read/write String.
FormulaR1C1Local | Returns or sets the formula for the object, using R1C1-style notation in the language of the user. Read/write String.
Height | Returns the height, in points, of the object. Read-only.
HorizontalAlignment | Returns or sets the horizontal alignment for the specified object. Read/write Variant.
Left | Returns or sets the distance, in points, from the left edge of the object to the left edge of the chart area. Read/write Double.
Name | Returns the name of the object. Read-only String.
Orientation | Returns or sets the text orientation. Read/write Long.
Parent | Returns the parent for the specified object. Read-only Object.
Position | Returns or sets the position of the unit label on an axis in the chart. Read/write XlChartElementPosition.
ReadingOrder | Returns or sets an XlReadingOrder constant that represents the reading order for the specified object. Read/write Long.
Shadow | Returns or sets a value that indicates whether the object has a shadow. Read/write Boolean.
Text | Returns or sets the text for the specified object. Read/write String.
Top | Returns or sets the distance, in points, from the top edge of the object to the top of the first row (on a worksheet) or the top of the chart area (on a chart). Read/write Double.
VerticalAlignment | Returns or sets the vertical alignment of the specified object. Read/write Variant.
Width | Returns the width, in points, of the object. Read-only.


ExtraColors.Add Method (PowerPoint)

 Copy code hover
[image]

ExtraColors.Add Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Adds a color to the extra colors available to a presentation, if the color hasn't already been added.

Syntax

expression .Add(Type)

expression A variable that represents an ExtraColors object.

Parameters

Name | Required/Optional | Data Type | Description
Type | Required | MsoRGBType | The red-green-blue (RGB) value of the color to be added.

See also

Concepts

ExtraColors Object

Other resources

ExtraColors Object Members


Ruler Members (PowerPoint)

 Copy code hover
[image]

Ruler Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents the ruler for the text in the specified shape or for all text in the specified text style. Contains tab stops and the indentation settings for text outline levels.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Levels | Returns a RulerLevels object that represents outline indent formatting. Read-only.
Parent | Returns the parent object for the specified object.
TabStops | Returns a TabStops collection that represents the tab stops for the specified text. Read-only.


ChartGroup.ShowNegativeBubbles Property (PowerPoint)

 Copy code hover
[image]

ChartGroup.ShowNegativeBubbles Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if negative bubbles are shown for the chart group. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ShowNegativeBubbles

expression A variable that represents a ChartGroup object.

Remarks

The property is valid only for bubble charts.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example causes Microsoft Word to display negative bubbles for the first chart group of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.ChartGroups(1).ShowNegativeBubbles = True

    End If

End With

See also

Concepts

ChartGroup Object

Other resources

ChartGroup Object Members


Point.DataLabel Property (PowerPoint)

 Copy code hover
[image]

Point.DataLabel Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the data label associated with the point. Read-only DataLabel.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .DataLabel

expression A variable that represents a Point object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example enables the data label for point seven in series three of the first chart in the active document, and then it sets the data label color to blue.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.SeriesCollection(3).Points(7)

            .HasDataLabel = True

            .ApplyDataLabels type:=xlValue

            .DataLabel.Font.ColorIndex = 5

        End With

    End If

End With

See also

Concepts

Point Object

Other resources

Point Object Members


SlideShowTransition.AdvanceOnClick Property (PowerPoint)

 Copy code hover
[image]

SlideShowTransition.AdvanceOnClick Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the specified slide advances when it is clicked during a slide show. Read/write.

Syntax

expression .AdvanceOnClick

expression A variable that represents an SlideShowTransition object.

Return Value

MsoTriState

Remarks

To set the slide to advance automatically after a certain amount of time elapses, set the AdvanceOnTime property to True and set the AdvanceTime property to the amount of time you want the slide to be shown. If you set both the AdvanceOnClick and the AdvanceOnTime properties to True, the slide advances either when it is clicked or when the specified amount of time has elapsed — whichever comes first.

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

Constant | Description
msoFalse | The specified slide does not advance when it is clicked during a slide show.
msoTrue | The specified slide advances when it is clicked during a slide show.

Example

This example sets slide one in the active presentation to advance after five seconds have passed or when the mouse is clicked — whichever occurs first.

VBA Copy code Copy code
With ActivePresentation.Slides(1).SlideShowTransition

    .AdvanceOnClick = msoTrue

    .AdvanceOnTime = msoTrue

    .AdvanceTime = 5

End With

See also

Concepts

SlideShowTransition Object

Other resources

SlideShowTransition Object Members


TimeLine Members (PowerPoint)

 Copy code hover
[image]

TimeLine Members (PowerPoint)
Send feedback

Published: July 16, 2012

Stores animation information for a Master, Slide, or SlideRange object.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
InteractiveSequences | Returns a Sequences object that represents animations that are triggered by click a specified shape.
MainSequence | Returns a Sequence object that represents the collection of Effect objects in the main animation sequence of a slide.
Parent | Returns the parent object for the specified object.


FileConverter.Path Property (PowerPoint)

 Copy code hover
[image]

FileConverter.Path Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the disk or Web path to the specified object. Read-only String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Path

expression Required. A variable that represents a FileConverter object.

See also

Concepts

FileConverter Object

Other resources

FileConverter Object Members


SlideShowSettings.AdvanceMode Property (PowerPoint)

 Copy code hover
[image]

SlideShowSettings.AdvanceMode Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a value that indicates how the slide show advances. Read/write.

Syntax

expression .AdvanceMode

expression A variable that represents a SlideShowSettings object.

Remarks

The value of the AdvanceMode property can be one of these PpSlideShowAdvanceMode constants.

ppSlideShowManualAdvance

ppSlideShowRehearseNewTimings

ppSlideShowUseSlideTimings

See also

Concepts

SlideShowSettings Object

Other resources

SlideShowSettings Object Members


MediaBookmarks Properties (PowerPoint)

 Copy code hover
[image]

MediaBookmarks Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Count | Returns the number of bookmarks. Read-only.


Shape.AlternativeText Property (PowerPoint)

 Copy code hover
[image]

Shape.AlternativeText Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the alternative text associated with a shape in a Web presentation. Read/write.

Syntax

expression .AlternativeText

expression A variable that represents a Shape object.

Return Value

String

Example

The following example sets the alternative text for the selected shape in the active window. The selected shape is a picture of a mallard duck.

VBA Copy code Copy code
ActiveWindow.Selection.ShapeRange.AlternativeText = "This is a mallard duck."

See also

Concepts

Shape Object

Other resources

Shape Object Members


SoundEffect.Parent Property (PowerPoint)

 Copy code hover
[image]

SoundEffect.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a SoundEffect object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

SoundEffect Object

Other resources

SoundEffect Object Members


TextStyle.Ruler Property (PowerPoint)

 Copy code hover
[image]

TextStyle.Ruler Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a Ruler object that represents the ruler for the specified text. Read-only.

Syntax

expression .Ruler

expression A variable that represents a TextStyle object.

Return Value

Ruler

Example

This example sets a left-aligned tab stop at 2 inches (144 points) for the text in shape two on myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes(2).TextFrame.Ruler.TabStops _

    .Add ppTabStopLeft, 144

See also

Concepts

TextStyle Object

Other resources

TextStyle Object Members


Cell Members (PowerPoint)

 Copy code hover
[image]

Cell Members (PowerPoint)
Send feedback

Published: July 12, 2012

Represents a table cell. The Cell object is a member of the CellRange collection. The CellRange collection represents all the cells in the specified column or row. To use the CellRange collection, use the Cells keyword.

Methods

Name | Description
Merge | Merges one table cell with another. The result is a single table cell.
Select | Selects the specified object.
Split | Splits a single table cell into multiple cells.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Borders | Returns a Borders collection that represents the borders and diagonal lines for the specified Cell object or CellRange collection. Read-only.
Parent | Returns the parent object for the specified object.
Selected | Returns True if the specified table cell is selected. Read-only.
Shape | Returns a Shape object that represents a shape in a table cell. Read-only.


PageSetup.NotesOrientation Property (PowerPoint)

 Copy code hover
[image]

PageSetup.NotesOrientation Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the on-screen and printed orientation of notes pages, handouts, and outlines for the specified presentation. Read/write.

Syntax

expression .NotesOrientation

expression A variable that represents a PageSetup object.

Return Value

MsoOrientation

Remarks

The value returned by the NotesOrientation property can be one of these MsoOrientation constants.

msoOrientationHorizontal

msoOrientationMixed

msoOrientationVertical

Example

This example sets the orientation of all notes pages, handouts, and outlines in the active presentation to horizontal (landscape).

VBA Copy code Copy code
Application.ActivePresentation.PageSetup.NotesOrientation = msoOrientationHorizontal

See also

Concepts

PageSetup Object

Other resources

PageSetup Object Members


Fonts Object (PowerPoint)

 Copy code hover
[image]

Fonts Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

A collection of all the Font objects in the specified presentation.

Remarks

Each Font object represents a font that's used in the presentation.

The Fonts collection is used by the Geni Wizard to determine whether any of the fonts in the specified presentation won't be supported when Genigraphics images the slides. If you just want to set character formatting for a particular bullet or text range, use the Font property to return the Font object for the bullet or text range.

Example

Use the Fonts property to return the Fonts collection. The following example displays the number of fonts used in the active presentation.

VBA Copy code Copy code
MsgBox ActivePresentation.Fonts.Count

Use Fonts(index), where index is the font's name or index number, to return a single Font object. The following example checks to see whether font one in the active presentation is embedded in the presentation.

VBA Copy code Copy code
If ActivePresentation.Fonts(1).Embedded = True Then
    MsgBox "Font 1 is embedded"

See also

Concepts

PowerPoint Object Model Reference

Other resources

Fonts Object Members


Series.IsFiltered Property (PowerPoint)

 Copy code hover
[image]

Series.IsFiltered Property (PowerPoint)
Send feedback

Returns or sets a Boolean that determines whether the specified chart series is filtered out from the chart. Read-write.

Version information

Version Added: PowerPoint 2013

Syntax

expression .IsFiltered

expression A variable that represents a Series object.

Property value

BOOL


ResampleMediaTask Members (PowerPoint)

 Copy code hover
[image]

ResampleMediaTask Members (PowerPoint)
Send feedback

Published: July 16, 2012

Properties

Name | Description
AudioCompressionType | Returns the audio compression type. Read-only.
AudioSamplingRate | Returns the audio sampling rate per second. Read-only.
ContainerType | Returns the format type of the container of the sample. Read-only.
IsEmbedded | Returns whether the sample is embedded. Read-only.
IsLinked | Returns whether the sample is linked. Read-only.
profile | Returns the media mobilization profile for the specified media asset. Read-only.
SampleHeight | Returns the resolution height of the sample. Read-only.
SampleWidth | Returns the resolution width of the sample. Read-only.
Shape | Returns the shape that is associated with the specified media asset. Read-only.
VideoCompressionType | Returns the video compression format of the sample. Read-only.
VideoFrameRate | Returns the video frame rate per second of the sample. Read-only.


ShapeRange.Shadow Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.Shadow Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a ShadowFormat object that contains shadow formatting properties for the specified shapes. Read-only.

Syntax

expression .Shadow

expression A variable that represents a ShapeRange object.

Example

This example adds a shadowed rectangle to slide one in the active presentation. The blue, embossed shadow is offset 3 points to the right of and 2 points down from the rectangle.

VBA Copy code Copy code
Set myShap = Application.ActivePresentation.Slides(1).Shapes

With myShap.AddShape(msoShapeRectangle, 10, 10, 150, 90).Shadow

    .Type = msoShadow17

    .ForeColor.RGB = RGB(0, 0, 128)

    .OffsetX = 3

    .OffsetY = 2

End With

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


LegendKey Properties (PowerPoint)

 Copy code hover
[image]

LegendKey Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Height | Returns the height, in points, of the object. Read-only Double.
InvertIfNegative | True if Microsoft Word inverts the pattern in the object when it corresponds to a negative number. Read/write Variant.
Left | Returns the distance, in points, from the left edge of the object to the left edge of the chart area. Read-only Double.
MarkerBackgroundColor | Sets the marker background color as an RGB value or returns the corresponding color index value. Read/write Long.
MarkerBackgroundColorIndex | Returns or sets the marker background color as an index into the current color palette, or as one of the following XlColorIndex constants: xlColorIndexAutomatic or xlColorIndexNone. Read/write Long.
MarkerForegroundColor | Sets the marker foreground color as an RGB value or returns the corresponding color index value. Read/write Long.
MarkerForegroundColorIndex | Returns or sets the marker foreground color as an index into the current color palette, or as one of the following XlColorIndex constants: xlColorIndexAutomatic or xlColorIndexNone. Read/write Long.
MarkerSize | Returns or sets the data-marker size, in points. Read/write Long.
MarkerStyle | Returns or sets the marker style for a point or series in a line chart, scatter chart, or radar chart. Read/write XlMarkerStyle.
Parent | Returns the parent for the specified object. Read-only Object.
PictureType | Returns or sets the way pictures are displayed on a legend key. Read/write XlChartPictureType.
PictureUnit2 | Returns or sets the unit for each picture on the chart if the PictureType property is set to xlStackScale; otherwise, this property is ignored. Read/write Double.
Shadow | Returns or sets a value that indicates whether the object has a shadow. Read/write Boolean.
Smooth | True if curve smoothing is turned on for the legend key. Read/write Boolean.
Top | Returns the distance, in points, from the top edge of the object to the top of the first row (on a worksheet) or the top of the chart area (on a chart). Read-only Double.
Width | Returns the width, in points, of the object. Read-only Double.


FilterEffect.Reveal Property (PowerPoint)

 Copy code hover
[image]

FilterEffect.Reveal Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines how the embedded objects will be revealed. Read/write.

Syntax

expression .Reveal

expression A variable that represents a FilterEffect object.

Return Value

MsoTriState

Remarks

Setting a value of msoTrue for the Reveal property when the filter effect type is msoAnimFilterEffectTypeWipe will make the shape appear. Setting a value of msoFalse will make the object disappear. In other words, if your filter is set to wipe and Reveal is true, you will get a wipe-in effect, and when Reveal is false, you will get a wipe-out effect.

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

msoFalse

msoTrue

Example

The following example adds a shape to the first slide of the active presentation and sets a filter effect animation behavior.

VBA Copy code Copy code
Sub ChangeFilterEffect()

    Dim sldFirst As Slide

    Dim shpHeart As Shape

    Dim effNew As Effect

    Dim bhvEffect As AnimationBehavior

    Set sldFirst = ActivePresentation.Slides(1)

    Set shpHeart = sldFirst.Shapes.AddShape(Type:=msoShapeHeart, _

        Left:=100, Top:=100, Width:=100, Height:=100)

    Set effNew = sldFirst.TimeLine.MainSequence.AddEffect _

        (Shape:=shpHeart, EffectID:=msoAnimEffectChangeFillColor, _

        Trigger:=msoAnimTriggerAfterPrevious)

    Set bhvEffect = effNew.Behaviors.Add(msoAnimTypeFilter)

    With bhvEffect.FilterEffect

         .Type = msoAnimFilterEffectTypeWipe

         .Subtype = msoAnimFilterEffectSubtypeUp

         .Reveal = msoTrue

    End With

End Sub

See also

Concepts

FilterEffect Object

Other resources

FilterEffect Object Members


PageSetup Properties (PowerPoint)

 Copy code hover
[image]

PageSetup Properties (PowerPoint)
Send feedback

Published: July 12, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
FirstSlideNumber | Returns or sets the slide number for the first slide in the presentation. Read/write.
NotesOrientation | Returns or sets the on-screen and printed orientation of notes pages, handouts, and outlines for the specified presentation. Read/write.
Parent | Returns the parent object for the specified object.
SlideHeight | Returns or sets the slide height, in points. Read/write.
SlideOrientation | Returns or sets the on-screen and printed orientation of slides in the specified presentation. Read/write.
SlideSize | Returns or sets the slide size for the specified presentation. Read/write.
SlideWidth | Returns or sets the slide width, in points. Read/write.


How to: Create UserForms

 Copy code hover
[image]

How to: Create UserForms
Send feedback

To create a custom dialog box, you must create a UserForm. To create a UserForm, click UserForm on the Insert menu in the Microsoft Visual Basic Editor.

Use the Properties window to change the name, behavior, and appearance of the form. For example, to change the caption on a form, set the Caption property.


ChartTitle.Text Property (PowerPoint)

 Copy code hover
[image]

ChartTitle.Text Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the text for the specified object. Read/write String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Text

expression A variable that represents a ChartTitle object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the text for the chart title of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.HasTitle = True

        .Chart.ChartTitle.Text = "First Quarter Sales"

    End If

End With

See also

Concepts

ChartTitle Object

Other resources

ChartTitle Object Members


AxisTitle.Left Property (PowerPoint)

 Copy code hover
[image]

AxisTitle.Left Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the distance, in points, from the left edge of the object to the left edge of the chart area. Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Left

expression A variable that represents an AxisTitle object.

See also

Concepts

AxisTitle Object

Other resources

AxisTitle Object Members


ChartCategory.Parent Property (PowerPoint)

 Copy code hover
[image]

ChartCategory.Parent Property (PowerPoint)
Send feedback

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2013

Syntax

expression .Parent

expression A variable that represents a ChartCategory object.


TextFrame2.WarpFormat Property (PowerPoint)

 Copy code hover
[image]

TextFrame2.WarpFormat Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the warp format (how the text is warped) for the specified text frame. Read/write.

Syntax

expression .WarpFormat

expression An expression that returns a TextFrame2 object.

Return Value

MsoWarpFormat

Remarks

The value of the WarpFormat property can be one of the MsoWarpFormat constants.

Example

This example shows how to set the warp format for shape one on slide one of the active presentation.

VBA Copy code Copy code
Public Sub WarpFormat_Example()

    Dim pptSlide As Slide
    Set pptSlide = ActivePresentation.Slides(1)
    pptSlide.Shapes(1).TextFrame2.WarpFormat = msoWarpFormat15

End Sub

See also

Concepts

TextFrame2 Object

Other resources

TextFrame2 Object Members


Slide.Delete Method (PowerPoint)

 Copy code hover
[image]

Slide.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the specified Slide object.

Syntax

expression .Delete

expression A variable that represents a Slide object.

See also

Concepts

Slide Object

Other resources

Slide Object Members


NamedSlideShow Properties (PowerPoint)

 Copy code hover
[image]

NamedSlideShow Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Name | You cannot use this property to set the name for a custom slide show. Use the Add method to redefine a custom slide show under a new name. Read-only.
Parent | Returns the parent object for the specified object.
SlideIDs | Returns an array of slide IDs for the specified named slide show. Read-only.


Tags.Delete Method (PowerPoint)

 Copy code hover
[image]

Tags.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes a tag.

Syntax

expression .Delete(Name)

expression A variable that represents a Tags object.

Parameters

Name | Required/Optional | Data Type | Description
Name | Required | String | Tthe name of the tag to be deleted.

See also

Concepts

Tags Object

Other resources

Tags Object Members


CustomLayouts.Item Method (PowerPoint)

 Copy code hover
[image]

CustomLayouts.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single object from the specified collection.

Syntax

expression .Item(Index)

expression A variable that represents a CustomLayouts object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Variant | The name or index number of the single object in the collection to be returned.

Return Value

CustomLayout

See also

Concepts

CustomLayouts Object

Other resources

CustomLayouts Object Members


ThemeVariants.Parent Property (PowerPoint)

 Copy code hover
[image]

ThemeVariants.Parent Property (PowerPoint)
Send feedback

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2013

Syntax

expression .Parent

expression A variable that represents a ThemeVariants object.


Table Methods (PowerPoint)

 Copy code hover
[image]

Table Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
ApplyStyle | Applies a table style to the specified table.
Cell | Returns a Cell object that represents a cell in a table.
ScaleProportionally | Scales all cell heights and widths, font sizes, and internal margins in the table by a specified proportion.


SlideShowView.EndNamedShow Method (PowerPoint)

 Copy code hover
[image]

SlideShowView.EndNamedShow Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Switches from running a custom, or named, slide show to running the entire presentation of which the custom show is a subset. When the slide show advances from the current slide, the next slide displayed will be the next one in the entire presentation, not the next one in the custom slide show.

Syntax

expression .EndNamedShow

expression A variable that represents a SlideShowView object.

Example

If a custom slide show is currently running in slide show window one, this example redefines the slide show to include all the slides in the presentation from which the slides in the custom show were selected.

VBA Copy code Copy code
SlideShowWindows(1).View.EndNamedShow

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


SlideShowWindow.IsFullScreen Property (PowerPoint)

 Copy code hover
[image]

SlideShowWindow.IsFullScreen Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns whether the specified slide show window occupies the entire screen. Read-only.

Syntax

expression .IsFullScreen

expression A variable that represents an SlideShowWindow object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified slide show window does not occupy the entire screen.
msoTrue | The specified slide show window occupies the entire screen.

Example

This example reduces the height of a full-screen slide show window just enough so that you can see the taskbar.

VBA Copy code Copy code
With Application.SlideShowWindows(1)

    If .IsFullScreen Then

        .Height = .Height - 20

    End If

End With

See also

Concepts

SlideShowWindow Object

Other resources

SlideShowWindow Object Members


ShapeNode.Points Property (PowerPoint)

 Copy code hover
[image]

ShapeNode.Points Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Variant that represents the position of the specified node as a coordinate pair. Read-only.

Syntax

expression .Points

expression A variable that represents a ShapeNode object.

Return Value

Variant

Remarks

Each coordinate is expressed in points. Use the SetPosition method to set the value of this property.

Example

This example moves node two in shape three in the active presentation to the right 200 points and down 300 points. Shape three must be a freeform drawing.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(3).Nodes

    pointsArray = .Item(2).Points

    currXvalue = pointsArray(1, 1)

    currYvalue = pointsArray(1, 2)

    .SetPosition Index:=2, X1:=currXvalue + 200, Y1:=currYvalue + 300

End With

See also

Concepts

ShapeNode Object

Other resources

ShapeNode Object Members


ChartTitle Members (PowerPoint)

 Copy code hover
[image]

ChartTitle Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents the chart title.

Methods

Name | Description
Delete | Deletes the object.
Select | Selects the object.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Caption | Returns or sets the chart title text. Read/write String.
Characters | Returns a ChartCharacters object that represents a range of characters within the object text. You can use the ChartCharacters object to format characters within a text string.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Formula | Returns or sets the object's formula in A1-style notation. Read/write.
FormulaLocal | Returns or sets the formula for the object, using A1-style references in the language of the user. Read/write String.
FormulaR1C1 | Returns or sets the formula for the object, using R1C1-style notation in the language of the macro. Read/write String.
FormulaR1C1Local | Returns or sets the formula for the object, using R1C1-style notation in the language of the user. Read/write String.
Height | Returns or sets a Double value that represents the height, in points, of the object. Read-only.
HorizontalAlignment | Returns or sets the horizontal alignment for the specified object. Read/write Variant.
IncludeInLayout | True if a chart title will occupy the chart layout space when a chart layout is being determined. The default is True. Read/write Boolean.
Left | Returns or sets the distance, in points, from the left edge of the object to the left edge of the chart area. Read/write Double.
Name | Returns the name of the object. Read-only String.
Orientation | Returns or sets the text orientation. Read/write Long.
Parent | Returns the parent for the specified object. Read-only Object.
Position | Returns or sets the position of the chart title on the chart. Read/write XlChartElementPosition.
ReadingOrder | Returns or sets an XlReadingOrder constant that represents the reading order for the specified object. Read/write Long.
Shadow | Returns or sets a value that indicates whether the object has a shadow. Read/write Boolean.
Text | Returns or sets the text for the specified object. Read/write String.
Top | Returns or sets the distance, in points, from the top edge of the object to the top of the first row (on a worksheet) or the top of the chart area (on a chart). Read/write Double.
VerticalAlignment | Returns or sets the vertical alignment of the specified object. Read/write Variant.
Width | Returns or sets a Double value that represents the width, in points, of the object. Read-only.


TickLabels.Offset Property (PowerPoint)

 Copy code hover
[image]

TickLabels.Offset Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the distance between the levels of labels, and the distance between the first level and the axis line. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Offset

expression A variable that represents a TickLabels object.

Remarks

The default distance is 100 percent, which represents the default spacing between the axis labels and the axis line. The value can be an integer percentage from 0 through 1000, relative to the axis label's font size.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the label spacing of the category axis for the first chart in the active document to twice the current setting, if the offset is less than 500.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.Axes(xlCategory).TickLabels

            If .Offset < 500 then

                .Offset = .Offset * 2

            End If

        End With

    End If

End With

See also

Concepts

TickLabels Object

Other resources

TickLabels Object Members


Axis.Select Method (PowerPoint)

 Copy code hover
[image]

Axis.Select Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Selects the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Select

expression A variable that represents an Axis object.

See also

Concepts

Axis Object

Other resources

Axis Object Members


Chart.Legend Property (PowerPoint)

 Copy code hover
[image]

Chart.Legend Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the legend for the chart. Read-only Legend.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Legend

expression A variable that represents a Chart object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example enables the legend for the first chart in the active document and then sets the legend font color to blue.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart

            .HasLegend = True

            .Legend.Font.ColorIndex = 5

        End With

    End If

End With

See also

Concepts

Chart Object

Other resources

Chart Object Members


MediaBookmark Properties (PowerPoint)

 Copy code hover
[image]

MediaBookmark Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Index | Returns the index position of the bookmark. Read-only.
Name | Returns the name of the bookmark. Read-only.
Position | Returns the time that is associated with the bookmark. Read-only.


PpColorSchemeIndex Enumeration (PowerPoint)

 Copy code hover
[image]

PpColorSchemeIndex Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the color in the applied color scheme that is associated with the specified object.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppAccent1 | 6 | Accent1
ppAccent2 | 7 | Accent2
ppAccent3 | 8 | Accent3
ppBackground | 1 | Background
ppFill | 5 | Fill
ppForeground | 2 | Foreground
ppNotSchemeColor | 0 | Not scheme color
ppSchemeColorMixed | -2 | Mixed scheme color
ppShadow | 3 | Shadow
ppTitle | 4 | Title


ProtectedViewWindow Members (PowerPoint)

 Copy code hover
[image]

ProtectedViewWindow Members (PowerPoint)
Send feedback

Published: July 12, 2012

Represents a presentation window that is in protected view.

Methods

Name | Description
Activate | Activates the specified window.
Close | Closes the specified window.
Edit | Changes the password of the ProtectedViewWindow object.

Properties

Name | Description
Active | Returns whether the specified window is active. Read-only.
Application | Returns an Application object that represents the creator of the specified object.
Caption | Returns the text that appears in the title bar of the specified window. Read-only.
Height | Returns or sets the height of the specified object, in points. Read/write.
Left | Returns or sets the distance in points from the left edge of the specified window to the left edge of the application window's client area. Read/write.
Parent | Returns the parent object for the specified object. Read-only.
Presentation | Returns a Presentation object that represents the presentation in which the specified window was created. Read-only.
SourceName | Returns the source name of the current ProtectedViewWindow object. Read-only.
SourcePath | Returns the source path of the current ProtectedViewWindow object. Read-only.
Top | Returns or sets the distance in points from the top edge of the specified window to the top edge of the application window's client area. Read/write.
Width | Returns or sets the width of the specified object, in points. Read/write.
WindowState | Returns or sets the state of the specified window. Read/write.


Cell.Borders Property (PowerPoint)

 Copy code hover
[image]

Cell.Borders Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Borders collection that represents the borders and diagonal lines for the specified Cell object or CellRange collection. Read-only.

Syntax

expression .Borders

expression A variable that represents a Cell object.

Return Value

Borders

Example

This example sets the thickness of the left border for the first cell in the second row of the selected table to three points.

VBA Copy code Copy code
ActiveWindow.Selection.ShapeRange.Table.Rows(2) _

    .Cells(1).Borders.Item(ppBorderLeft).Weight = 3

See also

Concepts

Cell Object

Other resources

Cell Object Members


View Properties (PowerPoint)

 Copy code hover
[image]

View Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
DisplaySlideMiniature | Determines if and when the slide miniature window is displayed automatically. Read/write.
MediaControlsHeight | Returns the height, in points, of the media controls. Read-only.
MediaControlsLeft | Returns the distance, in points, from the left edge of the media control bounding box to the left edge of the slide. Read-only.
MediaControlsTop | Returns the distance, in points, from the top edge of the media control bounding box to the top edge of the slide. Read-only.
MediaControlsVisible | Indicates whether the media controls are currently visible. Read-only.
MediaControlsWidth | Returns the width, in points, of the media control bounding box. Read-only.
Parent | Returns the parent object for the specified object.
PrintOptions | Returns a PrintOptions object that represents print options that are saved with the specified presentation. Read-only.
Slide | Returns or sets a Slide object that represents the slide that's currently displayed in the specified document window view. Read/write.
Type | Represents the type of view. Read-only.
Zoom | Returns or sets the zoom setting of the specified view as a percentage of normal size. Read/write.
ZoomToFit | Determines whether the view is zoomed to fit the dimensions of the document window every time the document window is resized. Read/write.


SlideRange.DisplayMasterShapes Property (PowerPoint)

 Copy code hover
[image]

SlideRange.DisplayMasterShapes Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the specified range of slides displays the background objects on the slide master. Read/write.

Syntax

expression .DisplayMasterShapes

expression A variable that represents a SlideRange object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified range of slides does not display the background objects on the slide master.
msoTrue | The specified range of slides displays the background objects on the slide master. These background objects can include text, drawings, OLE objects, and clip art you add to the slide master. Headers and footers aren't included.

Example

This example copies slide one from presentation two, pastes it at the end of presentation one, and matches the slide's background, color scheme, and background objects to the rest of presentation one.

VBA Copy code Copy code
Presentations(2).Slides(1).Copy

With Presentations(1).Slides.Paste

    .FollowMasterBackground = True

    .ColorScheme = Presentations(1).SlideMaster.ColorScheme

    .DisplayMasterShapes = msoTrue

End With

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


DataLabels.ShowRange Property (PowerPoint)

 Copy code hover
[image]

DataLabels.ShowRange Property (PowerPoint)
Send feedback

Set to True to display the Value From Cells range field in all the chart data labels for a specified chart. Set to False to hide that field. Read/write Boolean.

Version information

Version Added: PowerPoint 2013

Syntax

expression .ShowRange

expression A variable that represents a DataLabels object.

Property value

BOOL


FilterEffect.Subtype Property (PowerPoint)

 Copy code hover
[image]

FilterEffect.Subtype Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns the subtype of the filter effect. Read/write.

Syntax

expression .Subtype

expression A variable that represents a FilterEffect object.

Return Value

MsoAnimFilterEffectSubtype

Example

The following example adds a shape to the first slide of the active presentation and sets a filter effect animation behavior.

VBA Copy code Copy code
Sub ChangeFilterEffect()

    Dim sldFirst As Slide

    Dim shpHeart As Shape

    Dim effNew As Effect

    Dim bhvEffect As AnimationBehavior

    Set sldFirst = ActivePresentation.Slides(1)

    Set shpHeart = sldFirst.Shapes.AddShape(Type:=msoShapeHeart, _

        Left:=100, Top:=100, Width:=100, Height:=100)

    Set effNew = sldFirst.TimeLine.MainSequence.AddEffect _

        (Shape:=shpHeart, EffectID:=msoAnimEffectChangeFillColor, _

        Trigger:=msoAnimTriggerAfterPrevious)

    Set bhvEffect = effNew.Behaviors.Add(msoAnimTypeFilter)

    With bhvEffect.FilterEffect

         .Type = msoAnimFilterEffectTypeWipe

         .Subtype = msoAnimFilterEffectSubtypeUp

         .Reveal = msoTrue

    End With

End Sub

See also

Concepts

FilterEffect Object

Other resources

FilterEffect Object Members


Table.ScaleProportionally Method (PowerPoint)

 Copy code hover
[image]

Table.ScaleProportionally Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Scales all cell heights and widths, font sizes, and internal margins in the table by a specified proportion.

Syntax

expression .ScaleProportionally(scale)

expression A variable that represents a Table object.

Parameters

Name | Required/Optional | Data Type | Description
scale | Required | Single | The proportion to scale the table, between 0.01 and 100. For example, a scale value of 1 keeps the table layout unchanged; a value of 2 makes it twice as large; a value of 0.5 makes it half the size.

Remarks

Use the ScaleProportionally method to resize a table and maintain the text layout as close as possible to the original layout.

See also

Concepts

Table Object

Other resources

Table Object Members


How to: Work with Tables

 Copy code hover
[image]

How to: Work with Tables
Send feedback

In Microsoft Office PowerPoint, you can create native tables without having to import them from Microsoft Office Word. Tables are members of the Shapes collection. Each cell, column, and row in a table is a separate programmable object.

Creating a Table

To create a table on a slide, use the AddTable method. This method adds a table to the Shapes collection with the number of rows and columns designated by the NumRows and NumColumns arguments. This example adds a table with three rows and four columns to slide two.

VBA Copy code Copy code
ActivePresentation.Slides(2).Shapes _
    .AddTable NumRows:=3, NumColumns:=4, Left:=10, _
    Top:=10, Width:=288, Height:=288

Testing to See Whether a Shape Is a Table

Before you can work with the contents or objects in a table, you must first know if the shape you are working with is a table. To see whether a shape is a table, use the HasTable property. For example, assume that slide one has numerous shapes and you know one of them is a table. You want to resize this table so that it is the proper size to accept the data you are going to import from another source. This code walks through the Shapes collection on slide two to find the table and then it resizes the width of the columns.

VBA Copy code Copy code
With ActivePresentation.Slides(2)
    For sh = 1 To .Shapes.Count
        If .Shapes(sh).HasTable Then
            For Each col In .Shapes(sh).Table.Columns
                col.Width = 110
            Next col
        End If
    Next
End With

Working with Cells, Columns, and Rows

To return the contents and properties of an individual column or row, use a specific member of either the Columns or the Rows collection. The Cell method returns a single Cell object within a Table. This example changes various attributes of the table represented by shape five on slide two. It changes the color of row two, the width of column one, and the text contained in the row two, column one cell.

VBA Copy code Copy code
With ActivePresentation.Slides(2).Shapes(4).Table
    For Each cl In .Rows(2).Cells
        cl.Shape.Fill.ForeColor.RGB = RGB(50, 125, 0)
    Next cl
    .Columns(1).Width = 110
    .Cell(2, 1).Shape.TextFrame.TextRange.Text = "Mallard"
End With


Selection.Type Property (PowerPoint)

 Copy code hover
[image]

Selection.Type Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the type of objects in a selection. Read-only.

Syntax

expression .Type

expression A variable that represents a Selection object.

Return Value

PpSelectionType

Remarks

The value of the Type property can be one of these PpSelectionType constants.

ppSelectionNone

ppSelectionShapes

ppSelectionSlides

ppSelectionText

See also

Concepts

Selection Object

Other resources

Selection Object Members


ThemeVariant.Width Property (PowerPoint)

 Copy code hover
[image]

ThemeVariant.Width Property (PowerPoint)
Send feedback

Returns the height of the theme variation. Read-only.

Version information

Version Added: PowerPoint 2013

Syntax

expression .Width

expression A variable that represents a ThemeVariant object.

Property value

INT32


How to: Create Custom Dialog Boxes

 Copy code hover
[image]

How to: Create Custom Dialog Boxes
Send feedback

Use the following procedure to create a custom dialog box:

  1. Create a UserForm

    On the Insert menu in the Visual Basic Editor, click UserForm.

  2. Add controls to UserForms

    Find the control you want to add in the Toolbox and drag the control onto the form.

  3. Set control properties

    Right-click a control in design mode and click Properties to display the Properties window.

  4. Initialize the controls

    You can initialize controls in a procedure before you show a form, or you can add code to the Initialize event of the form.

  5. Write event procedures

    All controls have a predefined set of events. For example, a command button has a Click event that occurs when the user clicks the command button. You can write event procedures that run when the events occur.

  6. Display the custom dialog box

    Use the Show method to display a UserForm.

  7. Use control values while code is running

    Some properties can be set at run time. Changes made to the dialog box by the user are lost when the dialog box is closed.


Master.Name Property (PowerPoint)

 Copy code hover
[image]

Master.Name Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets the name of the specified object. Read/write.

Syntax

expression .Name

expression A variable that represents a Master object.

Return Value

String

Remarks

You can use the object's name in conjunction with the Item method to return a reference to the object if the Item method for the collection that contains the object takes a Variant argument. For example, if the value of the Name property for a shape is Rectangle 2, then .Shapes("Rectangle 2") will return a reference to that shape.

See also

Concepts

Master Object

Other resources

Master Object Members


Table.Parent Property (PowerPoint)

 Copy code hover
[image]

Table.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a Table object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

Table Object

Other resources

Table Object Members


Guides Properties (PowerPoint)

 Copy code hover
[image]

Guides Properties (PowerPoint)
Send feedback

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent for the specified object. Read-only Object.


SlideShowView.MediaControlsLeft Property (PowerPoint)

 Copy code hover
[image]

SlideShowView.MediaControlsLeft Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the distance, in points, from the left edge of the media control bounding box to the left edge of the Slide. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .MediaControlsLeft

expression A variable that represents a SlideShowView object.

Return Value

Single

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


PpMediaTaskStatus Enumeration (PowerPoint)

 Copy code hover
[image]

PpMediaTaskStatus Enumeration (PowerPoint)
Send feedback

Indicates the status of the media resampling task.

Version information

Version Added: PowerPoint 2013

Members

Name | Value | Description
ppMediaTaskStatusNone | 0 | No status
ppMediaTaskStatusInProgress | 1 | In progress
ppMediaTaskStatusQueued | 2 | Queued
ppMediaTaskStatusDone | 3 | Done
ppMediaTaskStatusFailed | 4 | Failed
ppMediaTaskStatusDone | 3 |
ppMediaTaskStatusFailed | 4 |
ppMediaTaskStatusInProgress | 1 |
ppMediaTaskStatusNone | 0 |
ppMediaTaskStatusQueued | 2 |


DataLabel.ShowLegendKey Property (PowerPoint)

 Copy code hover
[image]

DataLabel.ShowLegendKey Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

True if the data label legend key is visible. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ShowLegendKey

expression A variable that represents a DataLabel object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the data labels for series one of the first chart in the active document to show values and the legend key.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).DataLabels. _

            ShowLegendKey = True

        .Chart.SeriesCollection(1).DataLabels.Type = xlShowValue

    End If

End With

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


Presentation.UpdateLinks Method (PowerPoint)

 Copy code hover
[image]

Presentation.UpdateLinks Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Updates linked OLE objects in the specified presentation.

Syntax

expression .UpdateLinks

expression A variable that represents an Presentation object.

Example

This example updates all OLE links in the active presentation.

VBA Copy code Copy code
ActivePresentation.UpdateLinks

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


TableBackground Members (PowerPoint)

 Copy code hover
[image]

TableBackground Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents the background associated with a Table object.

Properties

Name | Description
Fill | Returns a FillFormat object that represents the formatting of the fill associated with the table background. Read-only.
Picture | Returns a PictureFormat object that represents the formatting of the picture associated with the table background. Read-only.
Reflection | Returns an ReflectionFormat object that represents the reflection effect associated with the table background. Read-only.
Shadow | Returns a ShadowFormat object that represents the formatting of the shadow associated with the table background. Read-only.


Research Members (PowerPoint)

 Copy code hover
[image]

Research Members (PowerPoint)
Send feedback

Published: July 16, 2012

Provides access to the research service feature of Microsoft PowerPoint.

Methods

Name | Description
IsResearchService | Indicates whether the GUID specified in the ServiceID parameter corresponds to a currently configured research service.
Query | Specifies a research query.
SetLanguagePair | Sets the languages for the translation service.

Properties

Name | Description
Application | Returns an Application object that represents the Microsoft PowerPoint application. Read-only.
Parent | Returns an Object that represents the parent object of the specified Research object. Read-only.


AnimationPoint.Application Property (PowerPoint)

 Copy code hover
[image]

AnimationPoint.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents an AnimationPoint object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

AnimationPoint Object

Other resources

AnimationPoint Object Members


ConnectorFormat.EndConnectedShape Property (PowerPoint)

 Copy code hover
[image]

ConnectorFormat.EndConnectedShape Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Shape object that represents the shape that the end of the specified connector is attached to. Read-only.

Syntax

expression .EndConnectedShape

expression A variable that represents an ConnectorFormat object.

Return Value

Shape

Remarks

If the end of the specified connector isn't attached to a shape, this property generates an error.

Example

This example assumes that the fist slide in the active presentation already contains two shapes attached by a connector named "Conn1To2." The code adds a rectangle and a connector to the first slide. The end of the new connector will be attached to the same connection site as the end of the connector named "Conn1To2," and the beginning of the new connector will be attached to connection site one on the new rectangle.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    Set r3 = .AddShape(msoShapeRectangle, 100, 420, 200, 100)

    .AddConnector(msoConnectorCurve, 0, 0, 10, 10) _

        .Name = "Conn1To3"

    With .Item("Conn1To2").ConnectorFormat

        endConnSite1 = .EndConnectionSite

        Set endConnShape1 = .EndConnectedShape

    End With

    With .Item("Conn1To3").ConnectorFormat

        .BeginConnect r3, 1

        .EndConnect endConnShape1, endConnSite1

    End With

End With

See also

Concepts

ConnectorFormat Object

Other resources

ConnectorFormat Object Members


PpRevisionInfo Enumeration (PowerPoint)

 Copy code hover
[image]

PpRevisionInfo Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Constants that specify the status of revision information in a presentation. In previous versions of Microsoft PowerPoint, these constants were returned by the HasRevisionInfo property of the Presentation object. In Microsoft Office PowerPoint 2007, theHasRevisionInfo property was deprecated.

Name | Value | Description
ppRevisionInfoBaseline | 1 | Information baseline.
ppRevisionInfoMerged | 2 | Information merged.
ppRevisionInfoNone | 0 | No information.


CustomerData Object (PowerPoint)

 Copy code hover
[image]

CustomerData Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Stores information about a customer (such as name, address, telephone number, and so on) or other information in XML form, as a collection of CustomXMLPart objects associated with a Microsoft PowerPoint object.

Remarks

You can store customer data in CustomLayout, Master,Presentation, Shape, and Slide objects. You can associate one or more CustomXMLPart objects with the same object.

  • Customer data persists from one instance to the next in a PowerPoint document only when you save the document in XML file format, as a PowerPoint XML presentation. Customer data does not persist in documents saved in .ppt, .htm, or .mht formats.

  • There is no user interface associated with customer data in PowerPoint. The only way that you can assign and manipulate customer data is programmatically.

Use the Add method to add a new CustomXMLPart object to the CustomerData collection.

Use the Delete method to delete a CustomXMLPart object from the CustomerData collection.

Use the Item method to get a specific CustomXMLPart object from the collection. Individual items in the collection are represented by GUIDs (globally unique identifiers).

You can use customer data in the same way that you used Tags objects in versions of PowerPoint previous to Microsoft Office PowerPoint 2007--that is, to associate data with objects. Customer data is more powerful than tags, however, because you can store the data as XML instead of as a simple string.

You can associate customer data in PowerPoint with external data by storing the IDs of custom XML parts in a spreadsheet or database along with the external data.

When you copy an object that contains customer data, the customer data is copied to the new object. PowerPoint creates a new CustomXMLPart object to hold the copied data, because two CustomLayout, Master, Presentation, Shape, or Slide objects can never be associated with the same CustomXMLPart object.

Example

The following example shows how to add a CustomXMLPart object to the CustomerData collection of the first shape on the first slide of the active presentation, and how to load an XML string into the custom XML part. It prints the ID of the custom XML part and the XML string in the Immediate window.

VBA Copy code Copy code
Public Sub CustomerData_Example()

    Dim pptCustomXMLPart As CustomXMLPart

    Set pptCustomXMLPart = ActivePresentation.Slides(1).Shapes(1).customerData.Add

    Debug.Print pptCustomXMLPart.Id

    pptCustomXMLPart.LoadXML ("<Customer><CustomerID>Customer #1</CustomerID></Customer>")

    Debug.Print pptCustomXMLPart.xml

End Sub

See also

Concepts

PowerPoint Object Model Reference

Other resources

CustomerData Object Members


ThreeDFormat.Perspective Property (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.Perspective Property (PowerPoint)
Send feedback

Published: July 16, 2012

Determines whether the extrusion appears in perspective. Read/write.

Syntax

expression .Perspective

expression A variable that represents a ThreeDFormat object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The extrusion is a parallel, or orthographic, projection—that is, if the walls don't narrow toward a vanishing point.
msoTrue | The extrusion appears in perspective—that is, if the walls of the extrusion narrow toward a vanishing point.

Example

This example sets the extrusion depth for shape one on myDocument to 100 points and specifies that the extrusion be parallel, or orthographic.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(1).ThreeD

    .Visible = True

    .Depth = 100

    .Perspective = msoFalse

End With


RGBColor Object (PowerPoint)

 Copy code hover
[image]

RGBColor Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a single color in a color scheme.

Example

Use the Colors method to return an RGBColor object. You can set an RGBColor object to another RGBColor object. You can use the RGB property to set or return the explicit red-green-blue value for an RGBColor object, with the exception of the RGBColor objects defined by the ppNotSchemeColor and ppSchemeColorMixed constants. The RGB property can be returned, but not set, for these two objects. The following example sets the background color in color scheme one in the active presentation to red and sets the title color to the title color that's defined for color scheme two.

VBA Copy code Copy code
With ActivePresentation.ColorSchemes

    .Item(1).Colors(ppBackground).RGB = RGB(255, 0, 0)

    .Item(1).Colors(ppTitle) = .Item(2).Colors(ppTitle)

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

RGBColor Object Members


Shape Object (PowerPoint)

 Copy code hover
[image]

Shape Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents an object in the drawing layer, such as an AutoShape, freeform, OLE object, or picture.

Remarks

Note Note

There are three objects that represent shapes: the Shapes collection, which represents all the shapes on a document; the ShapeRange collection, which represents a specified subset of the shapes on a document (for example, a ShapeRange object could represent shapes one and four on the document, or it could represent all the selected shapes on the document); the Shape object, which represents a single shape on a document. If you want to work with several shape at the same time or with shapes within the selection, use a ShapeRange collection. For an overview of how to work with either a single shape or with more than one shape at a time, see How to: Work with Shapes (Drawing Objects) .

The following examples describe how to:

  • Return an existing shape on a slide, indexed by name or number.

  • Return a newly created shape on a slide.

  • Return a shape within the selection.

  • Return the slide title and other placeholders on a slide.

  • Return the shapes attached to the ends of a connector.

  • Return the default shape for a presentation.

  • Return a newly created freeform.

  • Return a single shape from within a group.

  • Return a newly formed group of shapes.

Example

Use Shapes(index), where index is the shape name or the index number, to return a Shape object that represents a shape on a slide. The following example horizontally flips shape one and the shape named Rectangle 1 on myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes(1).Flip msoFlipHorizontal

myDocument.Shapes("Rectangle 1").Flip msoFlipHorizontal

Each shape is assigned a default name when you add it to the Shapes collection. To give the shape a more meaningful name, use the Name property. The following example adds a rectangle to myDocument, gives it the name Red Square, and then sets its foreground color and line style.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddShape(Type:=msoShapeRectangle, _

        Top:=144, Left:=144, Width:=72, Height:=72)

    .Name = "Red Square"

    .Fill.ForeColor.RGB = RGB(255, 0, 0)

    .Line.DashStyle = msoLineDashDot

End With

To add a shape to a slide and return a Shape object that represents the newly created shape, use one of the following methods of the Shapes collection: AddCallout, AddComment, AddConnector, AddCurve, AddLabel, AddLine, AddMediaObject, AddOLEObject, AddPicture, AddPlaceholder, AddPolyline, AddShape, AddTable, AddTextbox, AddTextEffect, AddTitle.

Use Selection.ShapeRange(index), where index is the shape name or the index number, to return a Shape object that represents a shape within the selection. The following example sets the fill for the first shape in the selection in the active window, assuming that there's at least one shape in the selection.

VBA Copy code Copy code
ActiveWindow.Selection.ShapeRange(1).Fill _

    .ForeColor.RGB = RGB(255, 0, 0)

Use Shapes.Title to return a Shape object that represents an existing slide title. Use Shapes.AddTitle to add a title to a slide that doesn't already have one and return a Shape object that represents the newly created title. Use Shapes.Placeholders(index), where index is the placeholder's index number, to return a Shape object that represents a placeholder. If you have not changed the layering order of the shapes on a slide, the following three statements are equivalent, assuming that slide one has a title.

VBA Copy code Copy code
ActivePresentation.Slides(1).Shapes.Title _

    .TextFrame.TextRange.Font.Italic = True

ActivePresentation.Slides(1).Shapes.Placeholders(1) _

    .TextFrame.TextRange.Font.Italic = True

ActivePresentation.Slides(1).Shapes(1).TextFrame _

    .TextRange.Font.Italic = True

To return a Shape object that represents one of the shapes attached by a connector, use the BeginConnectedShape or EndConnectedShape property.

To return a Shape object that represents the default shape for a presentation, use the DefaultShape property.

Use the BuildFreeform and AddNodes methods to define the geometry of a new freeform, and use the ConvertToShape method to create the freeform and return the Shape object that represents it.

Use GroupItems(index), where index is the shape name or the index number within the group, to return a Shape object that represents a single shape in a grouped shape.

Use the Group or Regroup method to group a range of shapes and return a single Shape object that represents the newly formed group. After a group has been formed, you can work with the group the same way you work with any other shape.

See also

Concepts

PowerPoint Object Model Reference

Other resources

Shape Object Members


Point.Parent Property (PowerPoint)

 Copy code hover
[image]

Point.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents a Point object.

See also

Concepts

Point Object

Other resources

Point Object Members


Application.AfterDragDropOnSlide Event (PowerPoint)

 Copy code hover
[image]

Application.AfterDragDropOnSlide Event (PowerPoint)
Send feedback

Occurs after a shape has been dropped onto a slide in an open presentation.

Version information

Version Added: PowerPoint 2013

Syntax

expression .AfterDragDropOnSlide(Sld,X,Y)

expression A variable that represents a Application object.

Parameters

Name | Required/Optional | Data type | Description
Sld | Required | Slide | The slide that raised the event (that is, had a shape added to it).
X | Required | Single |
Y | Required | Single |
Sld | Required | SLIDE |
X | Required | FLOAT |
Y | Required | FLOAT |


ChartArea.Height Property (PowerPoint)

 Copy code hover
[image]

ChartArea.Height Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets the height, in points, of the object. Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Height

expression A variable that represents a ChartArea object.

See also

Concepts

ChartArea Object

Other resources

ChartArea Object Members


Shape.Left Property (PowerPoint)

 Copy code hover
[image]

Shape.Left Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a Single that represents the distance in points from the left edge of the shape's bounding box to the left edge of the slide. Read/write.

Syntax

expression .Left

expression A variable that represents a Shape object.

See also

Concepts

Shape Object

Other resources

Shape Object Members


Presentation.Convert2 Method (PowerPoint)

 Copy code hover
[image]

Presentation.Convert2 Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Converts a file to a different file type.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Convert2(FileName)

expression A variable that represents a Presentation object.

Parameters

Name | Required/Optional | Data Type | Description
FileName | Required | String | The name of the file to be converted.

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


ObjectVerbs Properties (PowerPoint)

 Copy code hover
[image]

ObjectVerbs Properties (PowerPoint)
Send feedback

Published: July 12, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


TextRange.Start Property (PowerPoint)

 Copy code hover
[image]

TextRange.Start Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the position of the first character in the specified text range relative to the first character in the shape that contains the text. Read-only.

Syntax

expression .Start

expression A variable that represents a TextRange object.

Return Value

Long

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


Axes.Creator Property (PowerPoint)

 Copy code hover
[image]

Axes.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents an Axes object.

See also

Concepts

Axes Object

Other resources

Axes Object Members


ColorSchemes.Add Method (PowerPoint)

 Copy code hover
[image]

ColorSchemes.Add Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Adds a color scheme to the collection of available schemes. Returns a ColorScheme object that represents the added color scheme.

Syntax

expression .Add(Scheme)

expression A variable that represents a ColorSchemes object.

Parameters

Name | Required/Optional | Data Type | Description
Scheme | Optional | ColorScheme | The color scheme to add. Can be a ColorScheme object from any slide or master or an item in the ColorSchemes collection from any open presentation. If you omit this parameter, the first ColorScheme object (the first standard color scheme) in the specified presentation's ColorSchemes collection is used.

Return Value

ColorScheme

Remarks

The new color scheme is based on the colors used on the specified slide or master or on the colors in the specified color scheme from an open presentation.

The ColorSchemes collection can contain up to 16 color schemes. If you need to add another color scheme and the ColorSchemes collection is already full, use the Delete method to remove an existing color scheme.

Note that although Microsoft PowerPoint automatically checks whether a color scheme is a duplicate when a user attempts to add it by using the user interface, PowerPoint doesn't check when you attempt to add a color scheme programmatically. Your procedure must do its own checking to avoid adding redundant color schemes.

See also

Concepts

ColorSchemes Object

Other resources

ColorSchemes Object Members


MotionEffect.FromX Property (PowerPoint)

 Copy code hover
[image]

MotionEffect.FromX Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns a Single that represents the starting width or horizontal position of a MotionEffect object, specified as a percent of the screen width. Read/write.

Syntax

expression .FromX

expression A variable that represents a MotionEffect object.

Return Value

Single

Remarks

The default value of this property is Empty, in which case the current position of the object is used.

Use this property in conjunction with the ToX property to resize or jump from one position to another.

Do not confuse this property with the From property of the ColorEffect , RotationEffect , or PropertyEffect objects, which is used to set or change colors, rotations, or other properties of an animation behavior, respectively.

Example

The following example adds a motion path and sets the starting and ending horizontal and vertical positions.

VBA Copy code Copy code
Sub AddMotionPath()

    Dim effCustom As Effect

    Dim animMotion As AnimationBehavior

    Dim shpRectangle As Shape

    'Adds shape and sets effect and animation properties

    Set shpRectangle = ActivePresentation.Slides(1).Shapes _

        .AddShape(Type:=msoShapeRectangle, Left:=100, _

        Top:=100, Width:=50, Height:=50)

    Set effCustom = ActivePresentation.Slides(1).TimeLine.MainSequence _

        .AddEffect(Shape:=shpRectangle, effectId:=msoAnimEffectCustom)

    Set animMotion = effCustom.Behaviors.Add(msoAnimTypeMotion)

    'Sets starting and ending horizontal and vertical positions

    With animMotion.MotionEffect

        .FromX = 0

        .FromY = 0

        .ToX = 50

        .ToY = 50

    End With

End Sub

See also

Concepts

MotionEffect Object

Other resources

MotionEffect Object Members


PpPrintOutputType Enumeration (PowerPoint)

 Copy code hover
[image]

PpPrintOutputType Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

A value that indicates which component (slides, handouts, notes pages, or an outline) of the presentation is to be printed.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppPrintOutputBuildSlides | 7 | Build Slides
ppPrintOutputFourSlideHandouts | 8 | Four Slide Handouts
ppPrintOutputNineSlideHandouts | 9 | Nine Slide Handouts
ppPrintOutputNotesPages | 5 | Notes Pages
ppPrintOutputOneSlideHandouts | 10 | Single Slide Handouts
ppPrintOutputOutline | 6 | Outline
ppPrintOutputSixSlideHandouts | 4 | Six Slide Handouts
ppPrintOutputSlides | 1 | Slides
ppPrintOutputThreeSlideHandouts | 3 | Three Slide Handouts
ppPrintOutputTwoSlideHandouts | 2 | Two Slide Handouts


ThreeDFormat.RotationY Property (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.RotationY Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets the rotation of the extruded shape around the y-axis, in degrees. Read/write.

Syntax

expression .RotationY

expression A variable that represents a ThreeDFormat object.

Return Value

Single

Remarks

Can be a value from - 90 through 90. A positive value indicates rotation to the left; a negative value indicates rotation to the right.

To set the rotation of the extruded shape around the x-axis, use the RotationX property of the ThreeDFormat object.

To set the rotation of the extruded shape around the z-axis, use the Rotation property of the Shape object.

To change the direction of the extrusion's sweep path without rotating the front face of the extrusion, use the SetExtrusionDirection method.

Example

This example adds three identical extruded ovals to myDocument and sets their rotation around the y-axis to - 30, 0, and 30 degrees, respectively.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    With .AddShape(msoShapeOval, 30, 30, 50, 25).ThreeD

        .Visible = True

        .RotationY = -30

    End With

    With .AddShape(msoShapeOval, 30, 70, 50, 25).ThreeD

        .Visible = True

        .RotationY = 0

    End With

    With .AddShape(msoShapeOval, 30, 110, 50, 25).ThreeD

        .Visible = True

        .RotationY = 30

    End With

End With

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


DisplayUnitLabel.HorizontalAlignment Property (PowerPoint)

 Copy code hover
[image]

DisplayUnitLabel.HorizontalAlignment Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the horizontal alignment for the specified object. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .HorizontalAlignment

expression A variable that represents a DisplayUnitLabel object.

Remarks

You can set the value of this property to one of the following XlConstants constants:

  • xlCenter

  • xlDistributed

  • xlJustify

  • xlLeft

  • xlRight

Some of these constants may not be available to you, depending on the language support (for example, U.S. English) that you have selected or installed.

See also

Concepts

DisplayUnitLabel Object

Other resources

DisplayUnitLabel Object Members


Cell Methods (PowerPoint)

 Copy code hover
[image]

Cell Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Merge | Merges one table cell with another. The result is a single table cell.
Select | Selects the specified object.
Split | Splits a single table cell into multiple cells.


XlTickLabelPosition Enumeration (PowerPoint)

 Copy code hover
[image]

XlTickLabelPosition Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the position of tick-mark labels on the specified axis.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlTickLabelPositionHigh | -4127 | The top or right side of the chart.
xlTickLabelPositionLow | -4134 | The bottom or left side of the chart.
xlTickLabelPositionNextToAxis | 4 | Next to the axis (where the axis is not at either side of the chart).
xlTickLabelPositionNone | -4142 | No tick marks.


ShapeRange.Reflection Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.Reflection Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the reflection format for the specified range of shapes. Read-only.

Syntax

expression .Reflection

expression A variable that represents a ShapeRange object.

Return Value

MsoReflectionType

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


Timing.Parent Property (PowerPoint)

 Copy code hover
[image]

Timing.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a Timing object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

Timing Object

Other resources

Timing Object Members


OLEFormat.DoVerb Method (PowerPoint)

 Copy code hover
[image]

OLEFormat.DoVerb Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Requests that an OLE object perform one of its verbs.

Syntax

expression .DoVerb(Index)

expression A variable that represents an OLEFormat object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Optional | Integer | The verb to perform. If this argument is omitted, the default verb is performed.

Remarks

Use the ObjectVerbs property to determine the available verbs for an OLE object.

Example

This example performs the default verb for shape three on slide one in the active presentation if shape three is a linked or embedded OLE object.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(3)

    If .Type = msoEmbeddedOLEObject Or _

            .Type = msoLinkedOLEObject Then

        .OLEFormat.DoVerb

    End If

End With

This example performs the verb "Open" for shape three on slide one in the active presentation if shape three is an OLE object that supports the verb "Open."

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(3)

    If .Type = msoEmbeddedOLEObject Or _

            .Type = msoLinkedOLEObject Then

        For Each sVerb In .OLEFormat.ObjectVerbs

            nCount = nCount + 1

            If sVerb = "Open" Then

                .OLEFormat.DoVerb nCount

                Exit For

            End If

        Next

    End If

End With

See also

Concepts

OLEFormat Object

Other resources

OLEFormat Object Members


AddIns Methods (PowerPoint)

 Copy code hover
[image]

AddIns Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Add | Returns an AddIn object that represents an add-in file added to the list of add-ins.
Item | Returns a single Addin object from the specified Addins collection.
Remove | Removes an add-in from the collection of add-ins.


PageSetup.SlideSize Property (PowerPoint)

 Copy code hover
[image]

PageSetup.SlideSize Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the slide size for the specified presentation. Read/write.

Syntax

expression .SlideSize

expression A variable that represents a PageSetup object.

Return Value

PpSlideSizeType

Remarks

The value of the SlideSize property can be one of these PpSlideSizeType constants.

ppSlideSize35MM

ppSlideSizeA3Paper

ppSlideSizeA4Paper

ppSlideSizeB4ISOPaper

ppSlideSizeB4JISPaper

ppSlideSizeB5ISOPaper

ppSlideSizeB5JISPaper

ppSlideSizeBanner

ppSlideSizeCustom

ppSlideSizeHagakiCard

ppSlideSizeLedgerPaper

ppSlideSizeLetterPaper

ppSlideSizeOnScreen

ppSlideSizeOverhead

Example

This example sets the slide size to overhead for the active presentation.

VBA Copy code Copy code
Application.ActivePresentation.PageSetup _

    .SlideSize = ppSlideSizeOverhead

See also

Concepts

PageSetup Object

Other resources

PageSetup Object Members


Selection.Parent Property (PowerPoint)

 Copy code hover
[image]

Selection.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a Selection object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

Selection Object

Other resources

Selection Object Members


Comments Object (PowerPoint)

 Copy code hover
[image]

Comments Object (PowerPoint)
See also Send feedback

Published: July 12, 2012

Represents a collection of Comment objects.

Example

Use the Comments property to refer to the Comments collection. The following example displays the number of comments on the current slide.

VBA Copy code Copy code
Sub CountComments()

    MsgBox "You have " & ActiveWindow.Selection.SlideRange(1) _

        .Comments.Count & " comments on this slide."

End Sub

Use the Add method to add a comment to a slide. This example adds a new comment to the first slide of the active presentation.

VBA Copy code Copy code
Sub AddComment()

    Dim sldNew As Slide

    Dim cmtNew As Comment

    Set sldNew = ActivePresentation.Slides.Add(Index:=1, _

        Layout:=ppLayoutBlank)

    Set cmtNew = sldNew.Comments.Add(Left:=12, Top:=12, _

        Author:="Jeff Smith", AuthorInitials:="JS", _

        Text:="You might consider reviewing the new specs" & _

        "for more up-to-date information.")

End Sub

See also

Concepts

PowerPoint Object Model Reference

Other resources

Comments Object Members


Hyperlinks Properties (PowerPoint)

 Copy code hover
[image]

Hyperlinks Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


MotionEffect Properties (PowerPoint)

 Copy code hover
[image]

MotionEffect Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
ByX | Sets or returns a Single that represents scaling or moving an object horizontally by a specified percentage of the screen width, depending on whether it used in conjunction with a ScaleEffect or MotionEffect object, respectively. For example, a value of 50 for a motion effect means to move the object half the screen width to the right. Read/write.
ByY | Sets or returns a Single that represents scaling or moving an object vertically by a specified percentage of the screen width, depending on whether it is used in conjunction with a ScaleEffect or MotionEffect object, respectively. Read/write.
FromX | Sets or returns a Single that represents the starting width or horizontal position of a MotionEffect object, specified as a percent of the screen width. Read/write.
FromY | Returns or sets a Single that represents the vertical position of a MotionEffect object, specified as a percentage of the screen width. Read/write.
Parent | Returns the parent object for the specified object.
Path | Returns a String that represents the path followed by a MotionEffect object. Read-only.
ToX | Sets or returns a Single that represents the horizontal position of a MotionEffect object, specified as a percent of the screen width. Read/write.
ToY | Returns or sets a Single that represents the vertical position of a MotionEffect object, specified as a percentage of the screen width. Read/write.


ColorFormat.TintAndShade Property (PowerPoint)

 Copy code hover
[image]

ColorFormat.TintAndShade Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns the lightening or darkening of the the color of a specified shape. Read/write.

Syntax

expression .TintAndShade

expression A variable that represents a ColorFormat object.

Return Value

Single

Remarks

You can enter a value from -1 (darkest) to 1 (lightest) for the TintAndShade property, 0 (zero) being neutral.

Example

This example creates a new shape in the active document, sets the fill color, and lightens the color shade.

VBA Copy code Copy code
Sub PrinterPlate()

    Dim shpHeart As Shape

    Set shpHeart = ActivePresentation.Slides(1).Shapes _

        .AddShape(Type:=msoShapeHeart, Left:=150, _

        Top:=150, Width:=250, Height:=250)

    With shpHeart.Fill.ForeColor

        .CMYK = 16111872

        .TintAndShade = 0.3

        .OverPrint = msoTrue

        .Ink(Index:=1) = 0

        .Ink(Index:=2) = 1

        .Ink(Index:=3) = 1

        .Ink(Index:=4) = 0

    End With

End Sub

See also

Concepts

ColorFormat Object

Other resources

ColorFormat Object Members


DataLabels.Count Property (PowerPoint)

 Copy code hover
[image]

DataLabels.Count Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the number of objects in the collection. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Count

expression A variable that represents a DataLabels object.

See also

Concepts

DataLabels Object

Other resources

DataLabels Object Members


Guide.Application Property (PowerPoint)

 Copy code hover
[image]

Guide.Application Property (PowerPoint)
Send feedback

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2013

Syntax

expression .Application

expression A variable that represents a Guide object.


PictureFormat.Application Property (PowerPoint)

 Copy code hover
[image]

PictureFormat.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a PictureFormat object.

Return Value

Object

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

PictureFormat Object

Other resources

PictureFormat Object Members


Shapes.AddTitle Method (PowerPoint)

 Copy code hover
[image]

Shapes.AddTitle Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Restores a previously deleted title placeholder to a slide. Returns a Shape object that represents the restored title.

Syntax

expression .AddTitle

expression A variable that represents a Shapes object.

Return Value

Shape

Remarks

This method will cause an error if you haven't previously deleted the title placeholder from the specified slide. Use the HasTitle property to determine whether the title placeholder has been deleted.

Example

This example restores the title placeholder to slide one in the active presentation if this placeholder has been deleted. The text of the restored title is "Restored title."

VBA Copy code Copy code
With ActivePresentation.Slides(1)

    If .Layout <> ppLayoutBlank Then

        With .Shapes

            If Not .HasTitle Then

                .AddTitle.TextFrame.TextRange.Text = "Restored title"

            End If

        End With

    End If

End With

See also

Concepts

Shapes Object

Other resources

Shapes Object Members


MsoAnimEffect Enumeration (PowerPoint)

 Copy code hover
[image]

MsoAnimEffect Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the type of animation effect.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
msoAnimEffectAppear | 1 | Appears
msoAnimEffectArcUp | 47 | Arcs Up
msoAnimEffectAscend | 39 | Ascends
msoAnimEffectBlast | 64 | Blasts
msoAnimEffectBlinds | 3 | Blinds
msoAnimEffectBoldFlash | 63 | Bold Flash
msoAnimEffectBoldReveal | 65 | Bold Reveals
msoAnimEffectBoomerang | 25 | Boomerangs
msoAnimEffectBounce | 26 | Bounce
msoAnimEffectBox | 4 | Box
msoAnimEffectBrushOnColor | 66 | Brush on Color
msoAnimEffectBrushOnUnderline | 67 | Brush on Underline
msoAnimEffectCenterRevolve | 40 | Center Revolves
msoAnimEffectChangeFillColor | 54 | FillColor Changes
msoAnimEffectChangeFont | 55 | Font Changes
msoAnimEffectChangeFontColor | 56 | Font Color Changes
msoAnimEffectChangeFontSize | 57 | Font Size Changes
msoAnimEffectChangeFontStyle | 58 | Font Style Changes
msoAnimEffectChangeLineColor | 60 | Line color Changes
msoAnimEffectCheckerboard | 5 | Checkerboard Effect
msoAnimEffectCircle | 6 | Circle
msoAnimEffectColorBlend | 68 | Color Bleeds
msoAnimEffectColorReveal | 27 | Color Revealed
msoAnimEffectColorWave | 69 | Color Wave
msoAnimEffectComplementaryColor | 70 | Complementary Color
msoAnimEffectComplementaryColor2 | 71 | Complementary Color2
msoAnimEffectContrastingColor | 72 | Contrasting Color
msoAnimEffectCrawl | 7 | Crawl Effect
msoAnimEffectCredits | 28 | Credits Effect
msoAnimEffectCustom | 0 | Custom Effect
msoAnimEffectDarken | 73 | Darken Effect
msoAnimEffectDesaturate | 74 | Desaturate Effect
msoAnimEffectDescend | 42 | Descend Effect
msoAnimEffectDiamond | 8 | Diamond Effect
msoAnimEffectDissolve | 9 | Dissolve Effect
msoAnimEffectEaseIn | 29 | EaseIn Effect
msoAnimEffectExpand | 50 | Expand Effect
msoAnimEffectFade | 10 | Fade Effect
msoAnimEffectFadedSwivel | 41 | Faded Swivel Effect
msoAnimEffectFadedZoom | 48 | Faded Zoom Effect
msoAnimEffectFlashBulb | 75 | Flash Bulb Effect
msoAnimEffectFlashOnce | 11 | Flash Once
msoAnimEffectFlicker | 76 | Flicker Effect
msoAnimEffectFlip | 51 | Flip Effect
msoAnimEffectFloat | 30 | Float Effect
msoAnimEffectFly | 2 | Fly Effect
msoAnimEffectFold | 53 | Fold Effect
msoAnimEffectGlide | 49 | Glide Effect
msoAnimEffectGrowAndTurn | 31 | Grow and Turn Effect
msoAnimEffectGrowShrink | 59 | Grow and Shrink Effect
msoAnimEffectGrowWithColor | 77 | Grow with Color Effect
msoAnimEffectLighten | 78 | Lighten Effect
msoAnimEffectLightSpeed | 32 | Light Speed Effect
msoAnimEffectMediaPause | 84 | Media Pause Effect
msoAnimEffectMediaPlay | 83 | Media Play Effect
msoAnimEffectMediaStop | 85 | Media Stop Effect
msoAnimEffectPath4PointStar | 101 | Path4PointStar Effect
msoAnimEffectPath5PointStar | 90 | Path5PointStar Effect
msoAnimEffectPath6PointStar | 96 | Path6PointStar Effect
msoAnimEffectPath8PointStar | 102 | Path8PointStar Effect
msoAnimEffectPathArcDown | 122 | Moves on the Arc Down path
msoAnimEffectPathArcLeft | 136 | Moves on the Arc Left path
msoAnimEffectPathArcRight | 143 | Moves on the Arc Right Path
msoAnimEffectPathArcUp | 129 | Moves on the Arc Up path
msoAnimEffectPathBean | 116 | Moves on the Bean path
msoAnimEffectPathBounceLeft | 126 | Moves on the Bounce Left path
msoAnimEffectPathBounceRight | 139 | Moves on the Bounce Right path
msoAnimEffectPathBuzzsaw | 110 | Moves on the Buzzsaw path
msoAnimEffectPathCircle | 86 | Moves on a Circular Path
msoAnimEffectPathCrescentMoon | 91 | Moves on a Crescent Moon path
msoAnimEffectPathCurvedSquare | 105 | Moves on a CurvedSquare path
msoAnimEffectPathCurvedX | 106 | Moves on a Curved X path
msoAnimEffectPathCurvyLeft | 133 | Moves on a Curvy Left path
msoAnimEffectPathCurvyRight | 146 | Moves on a Curvy Right path
msoAnimEffectPathCurvyStar | 108 | Moves on a Curvy Star path
msoAnimEffectPathDecayingWave | 145 | Moves on a Decaying Wave path
msoAnimEffectPathDiagonalDownRight | 134 | Moves on a Diagonal Down-Right path
msoAnimEffectPathDiagonalUpRight | 141 | Moves on a Diagonal Up-Right path
msoAnimEffectPathDiamond | 88 | Moves on a Diamond path
msoAnimEffectPathDown | 127 | Moves on a Down path
msoAnimEffectPathEqualTriangle | 98 | Moves on a equilateral triangle path
msoAnimEffectPathFigure8Four | 113 | Moves on a Figure8Four path
msoAnimEffectPathFootball | 97 | Moves on a Football path
msoAnimEffectPathFunnel | 137 | Moves on a Funnel path
msoAnimEffectPathHeart | 94 | Moves on a Heart shape path
msoAnimEffectPathHeartbeat | 130 | Moves on a Heart Beat path
msoAnimEffectPathHexagon | 89 | Moves on a Hexagon path
msoAnimEffectPathHorizontalFigure8 | 111 | Moves on a Horizontal Figure8 path
msoAnimEffectPathInvertedSquare | 119 | Moves on a Inverted Square path
msoAnimEffectPathInvertedTriangle | 118 | Moves on a Inverted Triangle path
msoAnimEffectPathLeft | 120 | Moves on a Left path
msoAnimEffectPathLoopdeLoop | 109 | Moves on a LoopdeLoop path
msoAnimEffectPathNeutron | 114 | Moves on a Neutron path
msoAnimEffectPathOctagon | 95 | Moves on a Octagon path
msoAnimEffectPathParallelogram | 99 | Moves on a Parallelogram path
msoAnimEffectPathPeanut | 112 | Moves on a Peanut path
msoAnimEffectPathPentagon | 100 | Moves on a Pentagon path
msoAnimEffectPathPlus | 117 | Moves on a Plus path
msoAnimEffectPathPointyStar | 104 | Moves on a PointyStar path
msoAnimEffectPathRight | 149 | Moves on a Right path
msoAnimEffectPathRightTriangle | 87 | Moves on a RightTriangle path
msoAnimEffectPathSCurve1 | 144 | Moves on a SCurve1 path
msoAnimEffectPathSCurve2 | 124 | Moves on a SCurve2 path
msoAnimEffectPathSineWave | 125 | Moves on a SineWave path
msoAnimEffectPathSpiralLeft | 140 | Moves on a SpiralLeft path
msoAnimEffectPathSpiralRight | 131 | Moves on a SpiralRight path
msoAnimEffectPathSpring | 138 | Moves on a Spring path
msoAnimEffectPathSquare | 92 | Moves on a Square path
msoAnimEffectPathStairsDown | 147 | Moves on a StairsDown path
msoAnimEffectPathSwoosh | 115 | Moves on a Swoosh path
msoAnimEffectPathTeardrop | 103 | Moves on a Teardrop path
msoAnimEffectPathTrapezoid | 93 | Moves on a Trapezoid path
msoAnimEffectPathTurnDown | 135 | Moves on a TurnDown path
msoAnimEffectPathTurnRight | 121 | Moves on a TurnRight path
msoAnimEffectPathTurnUp | 128 | Moves on a TurnUp path
msoAnimEffectPathTurnUpRight | 142 | Moves on a TurnUpRight path
msoAnimEffectPathUp | 148 | Moves on an Up path
msoAnimEffectPathVerticalFigure8 | 107 | Moves on a VerticalFigure8 path
msoAnimEffectPathWave | 132 | Moves on a Wave path
msoAnimEffectPathZigzag | 123 | Moves on a Zigzag path
msoAnimEffectPeek | 12 | Peek effect
msoAnimEffectPinwheel | 33 | Pinwel effect
msoAnimEffectPlus | 13 | Plus effect
msoAnimEffectRandomBars | 14 | Random Bars effect
msoAnimEffectRandomEffects | 24 | Random effects
msoAnimEffectRiseUp | 34 | Rise Up effect
msoAnimEffectShimmer | 52 | Shimmer effect
msoAnimEffectSling | 43 | Sling effect
msoAnimEffectSpin | 61 | Spin effect
msoAnimEffectSpinner | 44 | Spinner effect
msoAnimEffectSpiral | 15 | Spiral effect
msoAnimEffectSplit | 16 | Split effect
msoAnimEffectStretch | 17 | Stretch effect
msoAnimEffectStretchy | 45 | Stretchy effect
msoAnimEffectStrips | 18 | Strips effect
msoAnimEffectStyleEmphasis | 79 | Emphasis effect
msoAnimEffectSwish | 35 | Swish effect
msoAnimEffectSwivel | 19 | Swivel effect
msoAnimEffectTeeter | 80 | Teeter effect
msoAnimEffectThinLine | 36 | Thin line effect
msoAnimEffectTransparency | 62 | Transparency effect
msoAnimEffectUnfold | 37 | Unfold effect
msoAnimEffectVerticalGrow | 81 | Vertical Grow effect
msoAnimEffectWave | 82 | Wave effect
msoAnimEffectWedge | 20 | Wedge effect
msoAnimEffectWheel | 21 | Wheel effect
msoAnimEffectWhip | 38 | Whip effect
msoAnimEffectWipe | 22 | Wipe effect
msoAnimEffectZip | 46 | Zip effect
msoAnimEffectZoom | 23 | Zoom effect


TableBackground.Picture Property (PowerPoint)

 Copy code hover
[image]

TableBackground.Picture Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a PictureFormat object that represents the formatting of the picture associated with the table background. Read-only.

Syntax

expression .Picture

expression An expression that returns a TableBackground object.

Return Value

PictureFormat

See also

Concepts

TableBackground Object

Other resources

TableBackground Object Members


FullSeriesCollection.Parent Property (PowerPoint)

 Copy code hover
[image]

FullSeriesCollection.Parent Property (PowerPoint)
Send feedback

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2013

Syntax

expression .Parent

expression A variable that represents a FullSeriesCollection object.


MediaFormat.ResamplingStatus Property (PowerPoint)

 Copy code hover
[image]

MediaFormat.ResamplingStatus Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the resampling task status. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .ResamplingStatus

expression An expression that returns a MediaFormat object.

Return Value

PpMediaTaskStatus

Remarks

ResamplingStatus returns one of the following PpMediaTaskStatus values:

Constant | Value | Description
ppMediaTaskStatusNone | 0 | No status
ppMediaTaskStatusInProgress | 1 | In progress
ppMediaTaskStatusQueued | 2 | Queued
ppMediaTaskStatusDone | 3 | Done
ppMediaTaskStatusFailed | 4 | Failed

See also

Concepts

MediaFormat Object

Other resources

MediaFormat Object Members


HiLoLines Members (PowerPoint)

 Copy code hover
[image]

HiLoLines Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents the high-low lines in a chart group.

Methods

Name | Description
Delete | Deletes the object.
Select | Selects the object.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Border | Returns the border of the object. Read-only ChartBorder.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Name | Returns the name of the object. Read-only String.
Parent | Returns the parent for the specified object. Read-only Object.


SlideShowView.MediaControlsWidth Property (PowerPoint)

 Copy code hover
[image]

SlideShowView.MediaControlsWidth Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the width, in points, of the media control bounding box. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .MediaControlsWidth

expression A variable that represents a SlideShowView object.

Return Value

Single

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


PrintRanges Properties (PowerPoint)

 Copy code hover
[image]

PrintRanges Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


ChartGroup.CategoryCollection Method (PowerPoint)

 Copy code hover
[image]

ChartGroup.CategoryCollection Method (PowerPoint)
Send feedback

Returns all the visible categories in the chart group, or the specified visible category.

Version information

Version Added: PowerPoint 2013

Syntax

expression .CategoryCollection(Index)

expression A variable that represents a ChartGroup object.

Parameters

Name | Required/Optional | Data type | Description
Index | Optional | Variant | The index number in the visible category collection of the category to return.
Index | Optional | VARIANT |

Return value

OBJECT


AxisTitle.FormulaR1C1 Property (PowerPoint)

 Copy code hover
[image]

AxisTitle.FormulaR1C1 Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the formula for the object by using R1C1-style notation. Read/write.

Syntax

expression .FormulaR1C1

expression A variable that represents an AxisTitle object.

See also

Concepts

AxisTitle Object

Other resources

AxisTitle Object Members


LegendKey.InvertIfNegative Property (PowerPoint)

 Copy code hover
[image]

LegendKey.InvertIfNegative Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if Microsoft Word inverts the pattern in the object when it corresponds to a negative number. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .InvertIfNegative

expression A variable that represents a LegendKey object.

See also

Concepts

LegendKey Object

Other resources

LegendKey Object Members


TickLabels.Font Property (PowerPoint)

 Copy code hover
[image]

TickLabels.Font Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the font of the specified object. Read-only ChartFont.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Font

expression A variable that represents a TickLabels object.

See also

Concepts

TickLabels Object

Other resources

TickLabels Object Members


ShapeRange.Table Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.Table Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a Table object that represents a table in a shape or in a shape range. Read-only.

Syntax

expression .Table

expression A variable that represents a ShapeRange object.

Return Value

Table

Example

This example sets the width of the first column in the table in shape five on the second slide to 80 points.

VBA Copy code Copy code
ActivePresentation.Slides(2).Shapes(5).Table.Columns(1).Width = 80

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


CommandEffect Object (PowerPoint)

 Copy code hover
[image]

CommandEffect Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a command effect for an animation behavior. You can send events, call functions, and send OLE verbs to embedded objects using this object.

Remarks

Use the CommandEffect property of the AnimationBehavior object to return a CommandEffect object. Command effects can be changed using the CommandEffect object's Command and Type properties.

Example

The following example shows how to set a command effect animation behavior.

VBA Copy code Copy code
Set bhvEffect = effectNew.Behaviors.Add(msoAnimTypeCommand)

    With bhvEffect.CommandEffect

         .Type = msoAnimCommandTypeVerb

         .Command = Play

    End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

CommandEffect Object Members


HeaderFooter Members (PowerPoint)

 Copy code hover
[image]

HeaderFooter Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a header, footer, date and time, slide number, or page number on a slide or master. All the HeaderFooter objects for a slide or master are contained in a HeadersFooters object.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Format | Returns or sets the format for the automatically updated date and time. Read/write.
Parent | Returns the parent object for the specified object.
Text | Returns or sets a String that represents the text contained in the specified object. Read/write.
UseFormat | Determines whether the date and time object contains automatically updated information. Read/write.
Visible | Returns or sets the visibility of the specified object or the formatting applied to the specified object. Read/write.


TextRange.InsertAfter Method (PowerPoint)

 Copy code hover
[image]

TextRange.InsertAfter Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Appends a string to the end of the specified text range. Returns a TextRange object that represents the appended text. When used without an argument, this method returns a zero-length string at the end of the specified range.

Syntax

expression .InsertAfter(NewText)

expression A variable that represents an TextRange object.

Parameters

Name | Required/Optional | Data Type | Description
NewText | Optional | String | The text to be inserted. The default value is an empty string.

Example

This example appends the string ": Test version" to the end of the title on slide one in the active presentation.

VBA Copy code Copy code
With Application.ActivePresentation.Slides(1).Shapes(1)

    .TextFrame.TextRange.InsertAfter ": Test version"

End With

This example appends the contents of the Clipboard to the end of the title on slide one.

VBA Copy code Copy code
Application.ActivePresentation.Slides(1).Shapes(1).TextFrame _

    .TextRange.InsertAfter.Paste

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


AutoCorrect.DisplayAutoLayoutOptions Property (PowerPoint)

 Copy code hover
[image]

AutoCorrect.DisplayAutoLayoutOptions Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether Microsoft PowerPoint should display the AutoLayout Options button. Read/write.

Syntax

expression .DisplayAutoLayoutOptions

expression A variable that represents an AutoCorrect object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | Do not display the AutoLayout Options button.
msoTrue | Display the AutoLayout Options button.

Example

This example disables display of the AutoCorrect Options and AutoLayout Options buttons.

VBA Copy code Copy code
Sub HideAutoCorrectOpButton()

    With Application.AutoCorrect

        .DisplayAutoLayoutOptions = msoFalse

        .DisplayAutoLayoutOptions = msoFalse

    End With

End Sub

See also

Concepts

AutoCorrect Object

Other resources

AutoCorrect Object Members


ProtectedViewWindows Methods (PowerPoint)

 Copy code hover
[image]

ProtectedViewWindows Methods (PowerPoint)
Send feedback

Published: July 12, 2012

This object has the following methods:

Methods

Name | Description
Item | Returns a single ProtectedViewWindow object from the specified ProtectedViewWindows collection.
Open | Open and return a ProtectedViewWindow object from the ProtectedViewWindows collection.


Chart.ChartArea Property (PowerPoint)

 Copy code hover
[image]

Chart.ChartArea Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the complete chart area for the chart. Read-only ChartArea.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ChartArea

expression A variable that represents a Chart object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the chart area interior color of the first chart in the active document to red and sets the border color to blue.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1).Chart.ChartArea

    .Interior.ColorIndex = 3

    .Border.ColorIndex = 5

End With

See also

Concepts

Chart Object

Other resources

Chart Object Members


Ruler.Parent Property (PowerPoint)

 Copy code hover
[image]

Ruler.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a Ruler object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

Ruler Object

Other resources

Ruler Object Members


Adjustments Properties (PowerPoint)

 Copy code hover
[image]

Adjustments Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
Item | Returns or sets the adjustment value specified by the Index argument. Read/write.
Parent | Returns the parent object for the specified object.


FreeformBuilder Methods (PowerPoint)

 Copy code hover
[image]

FreeformBuilder Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
AddNodes | Inserts a new segment at the end of the freeform that's being created, and adds the nodes that define the segment. You can use this method as many times as you want to add nodes to the freeform you're creating. When you finish adding nodes, use the ConvertToShape method to create the freeform you've just defined. To add nodes to a freeform after it is been created, use the Insert method of the ShapeNodes collection.
ConvertToShape | Creates a shape that has the geometric characteristics of the specified FreeformBuilder object. Returns a Shape object that represents the new shape.


PublishObjects Members (PowerPoint)

 Copy code hover
[image]

PublishObjects Members (PowerPoint)
Send feedback

Published: July 16, 2012

A collection of PublishObject objects representing the set of complete or partial loaded presentations that are available for publishing to HTML.

Methods

Name | Description
Item | Returns a single PublishObject object from the specified PublishObjects collection.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


XlChartGallery Enumeration (PowerPoint)

 Copy code hover
[image]

XlChartGallery Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies a chart gallery.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlAnyGallery | 23 | Either of the galleries.
xlBuiltIn | 21 | The built-in gallery.
xlUserDefined | 22 | The user-defined gallery.


FileConverter.OpenFormat Property (PowerPoint)

 Copy code hover
[image]

FileConverter.OpenFormat Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the file format of the specified file converter. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .OpenFormat

expression Required. A variable that represents a FileConverter object.

See also

Concepts

FileConverter Object

Other resources

FileConverter Object Members


ParagraphFormat.Bullet Property (PowerPoint)

 Copy code hover
[image]

ParagraphFormat.Bullet Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a BulletFormat object that represents bullet formatting for the specified paragraph format. Read-only.

Syntax

expression .Bullet

expression A variable that represents a ParagraphFormat object.

Return Value

BulletFormat

Example

This example sets the bullet size and bullet color for the paragraphs in shape two on slide one in the active presentation.

VBA Copy code Copy code
With Application.ActivePresentation.Slides(1).Shapes(2).TextFrame

    With .TextRange.ParagraphFormat.Bullet

        .Visible = True

        .RelativeSize = 1.25

        .Font.Color = RGB(255, 0, 255)

    End With

End With

See also

Concepts

ParagraphFormat Object

Other resources

ParagraphFormat Object Members


Sequences Methods (PowerPoint)

 Copy code hover
[image]

Sequences Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Add | Returns a Sequence object that represents a new sequence.
Item | Returns a single Sequence object from the specified Sequences collection.


MediaBookmarks.Add Method (PowerPoint)

 Copy code hover
[image]

MediaBookmarks.Add Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Adds a new MediaBookmark at the specified time and using the specified name.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Add(Position, Name)

expression A variable that represents a MediaBookmarks object.

Parameters

Name | Required/Optional | Data Type | Description
Position | Required | Long | The position of the MediaBookmark.
Name | Required | String | The name of the MediaBookmark.

Return Value

MediaBookmark

Remarks

The collection is automatically re-sorted incrementally by time. This method returns an error if the bookmark already exists at that position, if the maximum number of bookmarks exceeds 512, or if the user tries to assign a name that has a length greater than 255 characters.

See also

Concepts

MediaBookmarks Object

Other resources

MediaBookmarks Object Members


TickLabels Object (PowerPoint)

 Copy code hover
[image]

TickLabels Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the tick-mark labels associated with tick marks on a chart axis.

Version Information

Version Added: PowerPoint 2007

Remarks

This object is not a collection. There is no object that represents a single tick-mark label; you must return all the tick-mark labels as a unit.

Tick-mark label text for the category axis comes from the name of the associated category in the chart. The default tick-mark label text for the category axis is the number that indicates the position of the category relative to the left end of this axis. To change the number of unlabeled tick marks between tick-mark labels, you must change the TickLabelSpacing property for the category axis.

Tick-mark label text for the value axis is calculated based on the MajorUnit, MinimumScale, and MaximumScale properties of the value axis. To change the tick-mark label text for the value axis, you must change the values of these properties.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

Use the TickLabels property to return the TickLabels object. The following example sets the number format for the tick-mark labels on the value axis for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.Axes(xlValue).TickLabels.NumberFormat = "0.00"

    End If

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

TickLabels Object Members


TextRange.Delete Method (PowerPoint)

 Copy code hover
[image]

TextRange.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the specified TextRange object.

Syntax

expression .Delete

expression A variable that represents a TextRange object.

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


Shape.Adjustments Property (PowerPoint)

 Copy code hover
[image]

Shape.Adjustments Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Adjustments object that contains adjustment values for all the adjustments in the specified shape. Applies to any Shape object that represents an AutoShape, WordArt, or a connector. Read-only.

Syntax

expression .Adjustments

expression A variable that represents a Shape object.

Return Value

Adjustments

Example

This example sets to 0.25 the value of adjustment one for shape three on myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes(3).Adjustments(1) = 0.25

See also

Concepts

Shape Object

Other resources

Shape Object Members


Shapes.AddShape Method (PowerPoint)

 Copy code hover
[image]

Shapes.AddShape Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Creates an AutoShape. Returns a Shape object that represents the new AutoShape.

Syntax

expression .AddShape(Type, Left, Top, Width, Height)

expression A variable that represents a Shapes object.

Parameters

Name | Required/Optional | Data Type | Description
Type | Required | MsoAutoShapeType | Specifies the type of AutoShape to create.
Left | Required | Single | The position, measured in points, of the left edge of the AutoShape relative to the left edge of the slide.
Top | Required | Single | The position, measured in points, of the top edge of the AutoShape relative to the top edge of the slide.
Width | Required | Single | The width of the AutoShape, measured in points.
Height | Required | Single | The height of the AutoShape, measured in points.

Return Value

Shape

Remarks

To change the type of an AutoShape that you've added, set the AutoShapeType property.

Example

This example adds a rectangle to myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)
myDocument.Shapes.AddShape Type:=msoShapeRectangle, _
    Left:=50, Top:=50, Width:=100, Height:=200

See also

Concepts

Shapes Object

Other resources

Shapes Object Members


HiLoLines.Application Property (PowerPoint)

 Copy code hover
[image]

HiLoLines.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents a HiLoLines object.

See also

Concepts

HiLoLines Object

Other resources

HiLoLines Object Members


DataLabel.VerticalAlignment Property (PowerPoint)

 Copy code hover
[image]

DataLabel.VerticalAlignment Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the vertical alignment of the specified object. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .VerticalAlignment

expression A variable that represents a DataLabel object.

Remarks

You can set the value of this property to one of the following XlConstants constants:

  • xlBottom

  • xlCenter

  • xlDistributed

  • xlJustify

  • xlTop

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


Series.Format Property (PowerPoint)

 Copy code hover
[image]

Series.Format Property (PowerPoint)
Send feedback

Published: July 16, 2012

Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Format

expression A variable that represents a Series object.


Presentation.NewWindow Method (PowerPoint)

 Copy code hover
[image]

Presentation.NewWindow Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Opens a new window that contains the specified presentation. Returns a DocumentWindow object that represents the new window.

Syntax

expression .NewWindow

expression A variable that represents a Presentation object.

Return Value

DocumentWindow

Example

This example creates a new window that contains the contents of the active window (thereby activating the new window) and then switches back to the first window.

VBA Copy code Copy code
Set oldW = Application.ActiveWindow

Set newW = oldW.NewWindow

oldW.Activate

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


ChartArea Object (PowerPoint)

 Copy code hover
[image]

ChartArea Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the chart area of a chart.

Version Information

Version Added: PowerPoint 2007

Remarks

The chart area includes everything, including the plot area. However, the PlotArea object has its own formatting, so formatting the plot area does not format the chart area.

Use the ChartArea property to return the ChartArea object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example turns off the border for the chart area in the first chart of the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1).Chart

    ChartArea.Format.Line.Visible = False

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

ChartArea Object Members


Presentation.RemoveDocumentInformation Method (PowerPoint)

 Copy code hover
[image]

Presentation.RemoveDocumentInformation Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

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

Syntax

expression .RemoveDocumentInformation(Type)

expression An expression that returns a Presentation object.

Parameters

Name | Required/Optional | Data Type | Description
Type | Required | PpRemoveDocInfoType | Type of information to be removed.

Remarks

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

Constant | Description
ppRDIAll | Remove all document information.
ppRDIComments | Remove comments.
ppRDIContentType | Remove content type information.
ppRDIDocumentManagementPolicy | Remove document management policy information.
ppRDIDocumentProperties | Remove document properties.
ppRDIDocumentServerProperties | Remove document server properties.
ppRDIDocumentWorkspace | Remove document workspace information.
ppRDIInkAnnotations | Remove Ink annotations.
ppRDIPublishPath | Remove publication path information.
ppRDIRemovePersonalInformation | Remove personal information.
ppRDISlideUpdateInformation | Remove slide update information.

Example

The following example shows how to use the RemoveDocumentInformation method to remove comments and Ink annotations from the active presentation.

VBA Copy code Copy code
Public Sub RemoveDocumentInformation_Example()

    ActivePresentation.RemoveDocumentInformation (ppRDIComments + ppRDIInkAnnotations)

End Sub

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


Point.ClearFormats Method (PowerPoint)

 Copy code hover
[image]

Point.ClearFormats Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Clears the formatting of the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ClearFormats

expression A variable that represents a Point object.

See also

Concepts

Point Object

Other resources

Point Object Members


CalloutFormat Members (PowerPoint)

 Copy code hover
[image]

CalloutFormat Members (PowerPoint)
Send feedback

Published: July 16, 2012

Contains properties and methods that apply to line callouts.

Methods

Name | Description
AutomaticLength | Specifies that the first segment of the callout line (the segment attached to the text callout box) be scaled automatically when the callout is moved. Use the CustomLength method to specify that the first segment of the callout line retain the fixed length returned by the Length property whenever the callout is moved. Applies only to callouts whose lines consist of more than one segment (types msoCalloutThree and msoCalloutFour).
CustomDrop | Sets the vertical distance (in points) from the edge of the text bounding box to the place where the callout line attaches to the text box. This distance is measured from the top of the text box unless the AutoAttach property is set to True and the text box is to the left of the origin of the callout line (the place that the callout points to). In this case the drop distance is measured from the bottom of the text box.
CustomLength | Specifies that the first segment of the callout line (the segment attached to the text callout box) retain a fixed length whenever the callout is moved.
PresetDrop | Specifies whether the callout line attaches to the top, bottom, or center of the callout text box or whether it attaches at a point that's a specified distance from the top or bottom of the text box.

Properties

Name | Description
Accent | Determines whether a vertical accent bar separates the callout text from the callout line. Read/write.
Angle | Returns or sets the angle of the callout line. If the callout line contains more than one line segment, this property returns or sets the angle of the segment that is farthest from the callout text box. Read/write.
Application | Returns an Application object that represents the creator of the specified object.
AutoAttach | Determines whether the place where the callout line attaches to the callout text box changes, depending on whether the origin of the callout line (where the callout points to) is to the left or right of the callout text box. Read/write.
AutoLength | Determines whether the first segment of the callout retains the fixed length specified by the Length property, or is scaled automatically, whenever the callout is moved. Read-only.
Border | Determines whether the text in the specified callout is surrounded by a border. Read/write.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
Drop | For callouts with an explicitly set drop value, this property returns the vertical distance (in points) from the edge of the text bounding box to the place where the callout line attaches to the text box. Read-only.
DropType | Returns a value that indicates where the callout line attaches to the callout text box. Read-only.
Gap | Returns or sets the horizontal distance (in points) between the end of the callout line and the text bounding box. Read/write.
Length | When the AutoLength property of the specified callout is set to False, the Length property returns the length (in points) of the first segment of the callout line (the segment attached to the text callout box). Read-only.
Parent | Returns the parent object for the specified object.
Type | Represents the type of callout. Read/write.


ThreeDFormat.Z Property (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.Z Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the distance the specified ThreeDFormat object is moved away from the ground plane, in points. Read/write.

Syntax

expression .Z

expression A variable that represents a ThreeDFormat object.

Return Value

Single

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


RotationEffect Properties (PowerPoint)

 Copy code hover
[image]

RotationEffect Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
By | Sets or returns a Single that represents the rotation of an object by the specified number of degrees; for example, a value of 180 means to rotate the object by 180 degrees. Read/write.
From | Sets or returns a Single that represents the starting angle in degrees, specified relative to the screen (for example, 90 degrees is completely horizontal). Read/write.
Parent | Returns the parent object for the specified object.
To | Sets or returns a Single that represents the ending rotation of an object in degrees, specified relative to the screen (for example, 90 degrees is completely horizontal). Read/write.


CommandEffect.bookmark Property (PowerPoint)

 Copy code hover
[image]

CommandEffect.bookmark Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Sets or returns the bookmark of the specified object. Read/write.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Bookmark

expression A variable that represents a CommandEffect object.

See also

Concepts

CommandEffect Object

Other resources

CommandEffect Object Members


Row.Cells Property (PowerPoint)

 Copy code hover
[image]

Row.Cells Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a CellRange collection that represents the cells in a table column or row. Read-only.

Syntax

expression .Cells

expression A variable that represents a Row object.

Return Value

CellRange

Example

This example creates a new presentation, adds a slide, inserts a 3x3 table on the slide, and assigns the column and row number to each cell in the table.

VBA Copy code Copy code
Dim i As Integer

Dim j As Integer

With Presentations.Add

    .Slides.Add(1, ppLayoutBlank).Shapes.AddTable(3, 3).Select

    Set myTable = .Slides(1).Shapes(1).Table

    For i = 1 To myTable.Columns.Count

        For j = 1 To myTable.Columns(i).Cells.Count

            myTable.Columns(i).Cells(j).Shape.TextFrame _

                .TextRange.Text = "col. " & i & "row " & j

        Next j

    Next i

End With

See also

Concepts

Row Object

Other resources

Row Object Members


Presentations Properties (PowerPoint)

 Copy code hover
[image]

Presentations Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


BulletFormat.Style Property (PowerPoint)

 Copy code hover
[image]

BulletFormat.Style Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the bullet style. Read/write.

Syntax

expression .Style

expression A variable that represents a BulletFormat object.

Return Value

PpNumberedBulletStyle

Remarks

Some of the PpNumberedBulletStyle constants may not be available to you, depending on the language support (U.S. English, for example) that you've selected or installed.

Example

This example sets the bullet style for the bulleted list, represented by shape one on the first slide, to a shadow color number with circular background of normal text color.

VBA Copy code Copy code
ActivePresentation.Slides(1).Shapes(1).TextFrame _

    .TextRange.ParagraphFormat.Bullet _

        .Style = ppBulletCircleNumWDBlackPlain

See also

Concepts

BulletFormat Object

Other resources

BulletFormat Object Members


AnimationSettings.PlaySettings Property (PowerPoint)

 Copy code hover
[image]

AnimationSettings.PlaySettings Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a PlaySettings object that contains information about how the specified media clip plays during a slide show. Read-only.

Syntax

expression .PlaySettings

expression A variable that represents an AnimationSettings object.

Return Value

PlaySettings

Example

This example inserts a movie named Clock.avi onto slide one in the active presentation, sets it to play automatically after the slide transition, and specifies that the movie object be hidden during a slide show except when it is playing.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes.AddOLEObject(Left:=10, _

        Top:=10, Width:=250, Height:=250, _

        FileName:="c:\winnt\Clock.avi")

    With .AnimationSettings.PlaySettings

        .PlayOnEntry = True

        .HideWhileNotPlaying = True

    End With

End With

See also

Concepts

AnimationSettings Object

Other resources

AnimationSettings Object Members


ResampleMediaTasks.Pause Method (PowerPoint)

 Copy code hover
[image]

ResampleMediaTasks.Pause Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Pauses the media represented by the specified object.

Syntax

expression .Pause

expression A variable that represents a ResampleMediaTasks object.

See also

Concepts

ResampleMediaTasks Object

Other resources

ResampleMediaTasks Object Members


DataLabel.ShowValue Property (PowerPoint)

 Copy code hover
[image]

DataLabel.ShowValue Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True to display a specified chart's data label values. False to hide the values. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ShowValue

expression A variable that represents a DataLabel object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example enables the value to be shown for the data labels of the first series in the first chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).DataLabels. _

            ShowValue = True

    End If

End With

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


TextRange Properties (PowerPoint)

 Copy code hover
[image]

TextRange Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
ActionSettings | Returns an ActionSettings object that contains information about what action occurs when the user clicks or moves the mouse over the specified shape or text range during a slide show. Read-only.
Application | Returns an Application object that represents the creator of the specified object.
BoundHeight | Returns the height (in points) of the text bounding box for the specified text frame. Read-only.
BoundLeft | Returns the distance (in points) from the left edge of the text bounding box for the specified text frame to the left edge of the slide. Read-only.
BoundTop | Returns the distance (in points) from the top of the of the text bounding box for the specified text frame to the top of the slide. Read-only.
BoundWidth | Returns the width (in points) of the text bounding box for the specified text frame. Read-only.
Count | Returns the number of objects in the specified collection. Read-only.
Font | Returns a Font object that represents character formatting. Read-only.
IndentLevel | Returns or sets the the indent level for the specified text as an integer from 1 to 5, where 1 indicates a first-level paragraph with no indentation. Read/write.
LanguageID | Returns or sets the language for the specified text range. Read/write.
Length | Returns the length of the specified text range, in characters. Read-only.
ParagraphFormat | Returns a ParagraphFormat object that represents paragraph formatting for the specified text. Read-only.
Parent | Returns the parent object for the specified object.
Start | Returns the position of the first character in the specified text range relative to the first character in the shape that contains the text. Read-only.
Text | Returns or sets a String that represents the text contained in the specified object. Read/write.


ChartData.Workbook Property (PowerPoint)

 Copy code hover
[image]

ChartData.Workbook Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the workbook that contains the chart data associated with the chart. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Workbook

expression A variable that represents a ChartData object.

Remarks

Note Note

You must call the Activate method before referencing this property; otherwise, an error occurs.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example activates the Microsoft Excel workbook associated with the first chart in the active document. If the Excel workbook has multiple windows, the example activates the first window. The example then copies the contents of cells B1 through B5 and pastes the cell contents into the chart.

Note Note

Excel must be open to modify data in the workbook.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.ChartData.Activate

        .Chart.ChartData.Workbook. _

            Worksheets("Sheet1").Range("B1:B5").Copy

        .Chart.Paste

    End If

End With

See also

Concepts

ChartData Object

Other resources

ChartData Object Members


Shape.Ungroup Method (PowerPoint)

 Copy code hover
[image]

Shape.Ungroup Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Ungroups any grouped shapes in the specified shape or range of shapes. Disassembles pictures and OLE objects within the specified shape or range of shapes. Returns the ungrouped shapes as a single ShapeRange object.

Syntax

expression .Ungroup

expression A variable that represents a Shape object.

Return Value

ShapeRange

Remarks

Because a group of shapes is treated as a single object, grouping and ungrouping shapes changes the number of items in the Shapes collection and changes the index numbers of items that come after the affected items in the collection.

Example

This example ungroups any grouped shapes and disassembles any pictures or OLE objects on myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

For Each s In myDocument.Shapes

    s.Ungroup

Next

This example ungroups any grouped shapes on myDocument without disassembling pictures or OLE objects on the slide.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

For Each s In myDocument.Shapes

    If s.Type = msoGroup Then s.Ungroup

Next

See also

Concepts

Shape Object

Other resources

Shape Object Members


ProtectedViewWindow.Height Property (PowerPoint)

 Copy code hover
[image]

ProtectedViewWindow.Height Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the height of the specified object, in points. Read/write.

Syntax

expression .Height

expression A variable that represents a ProtectedViewWindow object.

See also

Concepts

ProtectedViewWindow Object

Other resources

ProtectedViewWindow Object Members


Selection.SlideRange Property (PowerPoint)

 Copy code hover
[image]

Selection.SlideRange Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a SlideRange object that represents a range of selected slides. Read-only.

Syntax

expression .SlideRange

expression A variable that represents a Selection object.

Return Value

SlideRange

Remarks

A slide range can be constructed in slide view, slide sorter view, normal view, notes page view, or outline view. In slide view, SlideRange returns one slide — the current, displayed slide.

Example

This example sets the background scheme color for all the selected slides in window one.

VBA Copy code Copy code
Windows(1).Selection.SlideRange.ColorScheme _

    .Colors(ppBackground).RGB = RGB(0, 0, 255)

See also

Concepts

Selection Object

Other resources

Selection Object Members


PublishObject.SpeakerNotes Property (PowerPoint)

 Copy code hover
[image]

PublishObject.SpeakerNotes Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether speaker notes are to be published with the presentation. Read/write.

Syntax

expression .SpeakerNotes

expression A variable that represents a PublishObject object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | Speaker notes are not to be published with the presentation.
msoTrue | Speaker notes are to be published with the presentation.

Example

This example publishes slides three through five of the active presentation to HTML. It includes the associated speaker's notes with the published presentation and names it Mallard.htm.

VBA Copy code Copy code
With ActivePresentation.PublishObjects(1)

    .FileName = "C:\Test\Mallard.htm"

    .SourceType = ppPublishSlideRange

    .RangeStart = 3

    .RangeEnd = 5

    .SpeakerNotes = msoTrue

    .Publish

End With

See also

Concepts

PublishObject Object

Other resources

PublishObject Object Members


ChartGroups Object (PowerPoint)

 Copy code hover
[image]

ChartGroups Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents one or more series plotted in a chart with the same format.

Version Information

Version Added: PowerPoint 2007

Remarks

A ChartGroups collection is a collection of all the ChartGroup objects in the specified chart. A chart contains one or more chart groups, each chart group contains one or more series, and each series contains one or more points. For example, a single chart might contain both a line chart group, containing all the series plotted with the line chart format, and a bar chart group, containing all the series plotted with the bar chart format.

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example displays the number of chart groups on the first chart of the active document. Use the ChartGroups method to return the ChartGroups collection.

VBA Copy code Copy code
MsgBox ActiveDocument.InlineShapes(1).Chart._

    ChartGroups.Count

The following example adds drop lines to chart group 1 on chart sheet 1. Use ChartGroups(index), where Index is the chart group index number, to return a single ChartGroup object.

VBA Copy code Copy code
ActiveDocument.InlineShapes(1).Chart._

    ChartGroups(1).HasDropLines = True

See also

Concepts

PowerPoint Object Model Reference

Other resources

ChartGroups Object Members


ThreeDFormat.PresetLightingSoftness Property (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.PresetLightingSoftness Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the intensity of the extrusion lighting. Read/write.

Syntax

expression .PresetLightingSoftness

expression A variable that represents a ThreeDFormat object.

Return Value

MsoPresetLightingSoftness

Remarks

The value of the PresetLightingSoftness property can be one of these MsoPresetLightingSoftness constants.

msoLightingBright

msoLightingDim

msoLightingNormal

msoPresetLightingSoftnessMixed

Example

This example specifies that the extrusion for shape one on myDocument be lit brightly from the left.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(1).ThreeD

    .Visible = True

    .PresetLightingSoftness = msoLightingBright

    .PresetLightingDirection = msoLightingLeft

End With

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


LeaderLines.Creator Property (PowerPoint)

 Copy code hover
[image]

LeaderLines.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents a LeaderLines object.

See also

Concepts

LeaderLines Object

Other resources

LeaderLines Object Members


SetEffect Members (PowerPoint)

 Copy code hover
[image]

SetEffect Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a set effect for an animation behavior. You can use the SetEffect object to set the value of a property.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Parent | Returns the parent object for the specified object.
Property | Sets or returns an MsoAnimProperty constant that represents an animation property. Read/write.
To | Sets or returns a Variant that represents the value or ending value of the SetEffect object's Type property. Read/write.


ThreeDFormat.ExtrusionColorType Property (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.ExtrusionColorType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a value that indicates whether the extrusion color is based on the extruded shape's fill (the front face of the extrusion) and automatically changes when the shape's fill changes, or whether the extrusion color is independent of the shape's fill. Read/write.

Syntax

expression .ExtrusionColorType

expression A variable that represents an ThreeDFormat object.

Return Value

MsoExtrusionColorType

Remarks

The value of the ExtrusionColorType property can be one of these MsoExtrusionColorType constants.

Constant | Description
msoExtrusionColorAutomatic | Extrusion color is based on shape fill.
msoExtrusionColorCustom | Extrusion color is independent of shape fill.
msoExtrusionColorTypeMixed | Extrusion color is partially independent of shape fill.

Example

If shape one on myDocument has an automatic extrusion color, this example gives the extrusion a custom yellow color.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(1).ThreeD

    If .ExtrusionColorType = msoExtrusionColorAutomatic Then

        .ExtrusionColor.RGB = RGB(240, 235, 16)

    End If

End With

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


DataLabel.Orientation Property (PowerPoint)

 Copy code hover
[image]

DataLabel.Orientation Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the text orientation. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Orientation

expression A variable that represents a DataLabel object.

Remarks

The value of this property can be an integer from -90 through 90 degrees or one of the XlOrientation constants.

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


Legend.IncludeInLayout Property (PowerPoint)

 Copy code hover
[image]

Legend.IncludeInLayout Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if a legend will occupy the chart layout space when a chart layout is being determined. The default is True. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .IncludeInLayout

expression A variable that represents a Legend object.

Remarks

This property does not affect whether a chart is in autolayout mode or not. If the user adds a title by using the Above Chart command, the chart will resize smaller, as in previous versions of Microsoft Office. If the user then removes the title or selects one of the overlay title options, the chart will resize larger, as if the title were not on the chart.

See also

Concepts

Legend Object

Other resources

Legend Object Members


Designs.Application Property (PowerPoint)

 Copy code hover
[image]

Designs.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a Designs object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

Designs Object

Other resources

Designs Object Members


Application.FileConverters Property (PowerPoint)

 Copy code hover
[image]

Application.FileConverters Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns information about installed file converters. Returns null if there are no converters installed. Read-only Variant.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .FileConverters(Index1, Index2)

expression A variable that represents an Application object.

Parameters

Name | Required/Optional | Data Type | Description
Index1 | Optional | Variant | The long name of the converter, including the file-type search string in Windows (for example, "Lotus 1-2-3 Files (*.wk*)").
Index2 | Optional | Variant | The path of the converter DLL or code resource.

Remarks

If you do not specify the index arguments, this property returns an array that contains information about all the installed file converters. Each row in the array contains information about a single file converter, as shown in the following table.

Column | Contents
1 | The long name of the converter
2 | The path of the converter DLL or code resource
3 | The file-extension search string

Example

The following example displays a message if the Multiplan file converter is installed.

VBA Copy code Copy code
installedCvts = Application.FileConverters

foundMultiplan = False

If Not IsNull(installedCvts) Then

    For arrayRow = 1 To UBound(installedCvts, 1)

        If installedCvts(arrayRow, 1) Like "*Multiplan*" Then

            foundMultiplan = True

            Exit For

        End If

    Next arrayRow

End If

If foundMultiplan = True Then

    MsgBox "Multiplan converter is installed"

Else

    MsgBox "Multiplan converter is not installed"

End If

See also

Concepts

Application Object

Other resources

Application Object Members


XlSizeRepresents Enumeration (PowerPoint)

 Copy code hover
[image]

XlSizeRepresents Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies what the bubble size represents on a bubble chart.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlSizeIsArea | 1 | The area of the bubble.
xlSizeIsWidth | 2 | The width of the bubble.


OLEFormat.Parent Property (PowerPoint)

 Copy code hover
[image]

OLEFormat.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents an OLEFormat object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

OLEFormat Object

Other resources

OLEFormat Object Members


SlideShowWindow Methods (PowerPoint)

 Copy code hover
[image]

SlideShowWindow Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Activate | Activates the specified object.


Series.ChartType Property (PowerPoint)

 Copy code hover
[image]

Series.ChartType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the chart type. Read/write XlChartType.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ChartType

expression A variable that represents a Series object.

Remarks

Some chart types are not available for PivotChart reports.

See also

Concepts

Series Object

Other resources

Series Object Members


TextRange Methods (PowerPoint)

 Copy code hover
[image]

TextRange Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
AddPeriods | Adds a period at the end of each paragraph in the specified text.
ChangeCase | Changes the case of the specified text.
Characters | Returns a TextRange object that represents the specified subset of text characters. For information about counting or looping through the characters in a text range, see the TextRange object.
Copy | Copies the specified object to the Clipboard.
Cut | Deletes the specified object and places it on the Clipboard.
Delete | Deletes the specified TextRange object.
Find | Finds the specified text in a text range, and returns a TextRange object that represents the first text range where the text is found. Returns Nothing if no match is found.
InsertAfter | Appends a string to the end of the specified text range. Returns a TextRange object that represents the appended text. When used without an argument, this method returns a zero-length string at the end of the specified range.
InsertBefore | Appends a string to the beginning of the specified text range. Returns a TextRange object that represents the appended text. When used without an argument, this method returns a zero-length string at the end of the specified range.
InsertDateTime | Inserts the date and time in the specified text range. Returns a TextRange object that represents the inserted text.
InsertSlideNumber | Inserts the slide number of the current slide into the specified text range. Returns a TextRange object that represents the slide number.
InsertSymbol | Returns a TextRange object that represents a symbol inserted into the specified text range.
Lines | Returns a TextRange object that represents the specified subset of text lines. For information about counting or looping through the lines in a text range, see the TextRange object.
LtrRun | Sets the direction of text in a text range to read from left to right.
Paragraphs | Returns a TextRange object that represents the specified subset of text paragraphs.
Paste | Pastes the text on the Clipboard into the specified text range, and returns a TextRange object that represents the pasted text.
PasteSpecial | Replaces the text range with the contents of the Clipboard in the format specified.
RemovePeriods | Removes the period at the end of each paragraph in the specified text.
Replace | Finds specific text in a text range, replaces the found text with a specified string, and returns a TextRange object that represents the first occurrence of the found text. Returns Nothing if no match is found.
RotatedBounds | Returns the coordinates of the vertices of the text bounding box for the specified text range.
RtlRun | Sets the direction of text in a text range to read from right to left.
Runs | Returns a TextRange object that represents the specified subset of text runs. A text run consists of a range of characters that share the same font attributes.
Select | Selects the specified object.
Sentences | Returns a TextRange object that represents the specified subset of text sentences.
TrimText | Returns a TextRange object that represents the specified text minus any trailing spaces.
Words | Returns a TextRange object that represents the specified subset of text words.


PrintRange Methods (PowerPoint)

 Copy code hover
[image]

PrintRange Methods (PowerPoint)
Send feedback

Published: July 12, 2012

This object has the following methods:

Methods

Name | Description
Delete | Deletes the specified PrintRange object.


SlideNavigation Members (PowerPoint)

 Copy code hover
[image]

SlideNavigation Members (PowerPoint)
Send feedback

Represents the slide navigation screen in slide show view.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Parent | Returns the parent for the specified object. Read-only Object.
Visible | Specifies whether the slide navigation screen is displayed during a slide show. Read/write.


Presentation.PublishSlides Method (PowerPoint)

 Copy code hover
[image]

Presentation.PublishSlides Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Creates a Web presentation (in HTML format) containing slides from any loaded presentation. You can view the published presentation in a Web browser.

Syntax

expression .PublishSlides(SlideLibraryUrl, Overwrite)

expression An expression that returns a Presentation object.

Parameters

Name | Required/Optional | Data Type | Description
SlideLibraryUrl | Required | String | URL to the slide library.
Overwrite | Optional | Boolean | True if the original presentation should be overwritten.

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


NamedSlideShow Object (PowerPoint)

 Copy code hover
[image]

NamedSlideShow Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a custom slide show, which is a named subset of slides in a presentation.

Remarks

The NamedSlideShow object is a member of the NamedSlideShows collection. The NamedSlideShows collection contains all the named slide shows in the presentation.

Example

Use NamedSlideShows(index), where index is the custom slide show name or index number, to return a single NamedSlideShow object. The following example deletes the custom slide show named "Quick Show."

VBA Copy code Copy code
ActivePresentation.SlideShowSettings _

    .NamedSlideShows("Quick Show").Delete

Use the SlideIDs property to return an array that contains the unique slide IDs for all the slides in the specified custom show. The following example displays the slide IDs for the slides in the custom slide show named "Quick Show."

VBA Copy code Copy code
idArray = ActivePresentation.SlideShowSettings _

    .NamedSlideShows("Quick Show").SlideIDs

For i = 1 To UBound(idArray)

    MsgBox idArray(i)

Next

See also

Concepts

PowerPoint Object Model Reference

Other resources

NamedSlideShow Object Members


SectionProperties.Count Property (PowerPoint)

 Copy code hover
[image]

SectionProperties.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a SectionProperties object.

See also

Concepts

SectionProperties Object

Other resources

SectionProperties Object Members


MediaBookmark.Index Property (PowerPoint)

 Copy code hover
[image]

MediaBookmark.Index Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the index position of the bookmark. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Index

expression A variable that represents a MediaBookmark object.

See also

Concepts

MediaBookmark Object

Other resources

MediaBookmark Object Members


Interior.ColorIndex Property (PowerPoint)

 Copy code hover
[image]

Interior.ColorIndex Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets the color of the interior. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ColorIndex

expression A variable that represents an Interior object.

Remarks

The color is specified as an index value into the current color palette, or as one of the following XlColorIndex constants:

  • xlColorIndexAutomatic

  • xlColorIndexNone

See also

Concepts

Interior Object

Other resources

Interior Object Members


SeriesLines.Parent Property (PowerPoint)

 Copy code hover
[image]

SeriesLines.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents a SeriesLines object.

See also

Concepts

SeriesLines Object

Other resources

SeriesLines Object Members


Designs.Count Property (PowerPoint)

 Copy code hover
[image]

Designs.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a Designs object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

Designs Object

Other resources

Designs Object Members


ChartCharacters Object (PowerPoint)

 Copy code hover
[image]

ChartCharacters Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents characters in an object that contains text.

Version Information

Version Added: PowerPoint 2007

Remarks

The ChartCharacters object lets you modify any sequence of characters contained in the full text string.

Use Characters(Start, Length), where Start is the start character number and Length is the number of characters, to return a ChartCharacters object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The Characters property is necessary only when you need to change some of an object's text without affecting the rest (you cannot use the Characters property to format a portion of the text if the object does not support rich text). To change all the text at the same time, you can usually apply the appropriate method or property directly to the object. The following example formats the contents of the chart title for the first chart in the active document as italic.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1).Chart

    .ChartTitle.Characters.Font.Italic = True

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

ChartCharacters Object Members


ChartFont.ColorIndex Property (PowerPoint)

 Copy code hover
[image]

ChartFont.ColorIndex Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the color of the font. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ColorIndex

expression A variable that represents a ChartFont object.

Remarks

The color is specified as an index value into the current color palette, or as one of the following XlColorIndex constants:

  • xlColorIndexAutomatic

  • xlColorIndexNone

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example changes the font color in the title of the first chart in the active document to red.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.Title

                ' Set the color to red.

                .Font.ColorIndex = 3

            End If

        End With

    End If

End With

See also

Concepts

ChartFont Object

Other resources

ChartFont Object Members


Gridlines.Delete Method (PowerPoint)

 Copy code hover
[image]

Gridlines.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Delete

expression A variable that represents a GridLines object.

See also

Concepts

GridLines Object

Other resources

Gridlines Object Members


Slides Members (PowerPoint)

 Copy code hover
[image]

Slides Members (PowerPoint)
Send feedback

Published: July 16, 2012

A collection of all the Slide objects in the specified presentation.

Methods

Name | Description
AddSlide | Creates a new slide, adds it to the Slides collection, and returns the slide.
FindBySlideID | Returns a Slide object that represents the slide with the specified slide ID number. Each slide is automatically assigned a unique slide ID number when it is created. Use the SlideID property to return a slide's ID number.
InsertFromFile | Inserts slides from a file into a presentation, at the specified location. Returns an Integer that represents the number of slides inserted.
Item | Returns a single Slide object from the specified Slides collection.
Paste | Pastes the slides on the Clipboard into the Slides collection for the presentation. Specify where you want to insert the slides with the Index argument. Returns a SlideRange object that represents the pasted objects. Each pasted slide becomes a member of the specified Slides collection.
Range | Returns a SlideRange object that represents a subset of the slides in a Slides collection.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


Chart.SideWall Property (PowerPoint)

 Copy code hover
[image]

Chart.SideWall Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a Walls object that allows the user to individually format the side wall of a 3-D chart. Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .SideWall

expression A variable that represents a Chart object.

See also

Concepts

Chart Object

Other resources

Chart Object Members


Shape.ScaleWidth Method (PowerPoint)

 Copy code hover
[image]

Shape.ScaleWidth Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Scales the width of the shape by a specified factor. For pictures and OLE objects, you can indicate whether you want to scale the shape relative to the original size or relative to the current size. Shapes other than pictures and OLE objects are always scaled relative to their current width.

Syntax

expression .ScaleWidth(Factor, RelativeToOriginalSize, fScale)

expression A variable that represents a Shape object.

Parameters

Name | Required/Optional | Data Type | Description
Factor | Required | Single | Specifies the ratio between the width of the shape after you resize it and the current or original width. For example, to make a rectangle 50 percent larger, specify 1.5 for this argument.
RelativeToOriginalSize | Required | MsoTriState | Specifies whether a shape is scaled relative to its current or original size.
fScale | Optional | MsoScaleFrom | The part of the shape that retains its position when the shape is scaled.

Remarks

For pictures and OLE objects, you can indicate whether you want to scale the shape relative to the original size or relative to the current size. Shapes other than pictures and OLE objects are always scaled relative to their current width.

The RelativeToOriginalSize parameter value can be one of the following MsoTriState constants. You can specify msoTrue for this parameter only if the specified shape is a picture or an OLE object.

Constant | Description
msoFalse | Scales the shape relative to its current size.
msoTrue | Scales the shape relative to its original size.

The fScale parameter value can be one of the following MsoScaleFrom constants. The default is msoScaleFromTopLeft.

msoScaleFromBottomRight

msoScaleFromMiddle

msoScaleFromTopLeft

Example

This example scales all pictures and OLE objects on myDocument to 175 percent of their original height and width, and it scales all other shapes to 175 percent of their current height and width.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

For Each s In myDocument.Shapes

    Select Case s.Type

    Case msoEmbeddedOLEObject, msoLinkedOLEObject, _

            msoOLEControlObject, msoLinkedPicture, msoPicture

        s.ScaleHeight 1.75, msoTrue

        s.ScaleWidth 1.75, msoTrue

    Case Else

        s.ScaleHeight 1.75, msoFalse

        s.ScaleWidth 1.75, msoFalse

    End Select

See also

Concepts

Shape Object

Other resources

Shape Object Members


TextFrame2.Ruler Property (PowerPoint)

 Copy code hover
[image]

TextFrame2.Ruler Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Ruler2 object that represents the ruler for the specified text. Read-only.

Syntax

expression .Ruler

expression An expression that returns a TextFrame2 object.

Return Value

Ruler2

Example

This example shows how to set a left-aligned tab stop at 2 inches (144 points) for the text in shape one on slide one in the active presentation.

VBA Copy code Copy code
Public Sub Ruler_Example()

    Dim pptSlide As Slide
    Set pptSlide = ActivePresentation.Slides(1)
    pptSlide.Shapes(1).TextFrame2.Ruler.TabStops.Add ppTabStopLeft, 144

End Sub

See also

Concepts

TextFrame2 Object

Other resources

TextFrame2 Object Members


SlideRange.SlideNumber Property (PowerPoint)

 Copy code hover
[image]

SlideRange.SlideNumber Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the slide number. Read-only.

Syntax

expression .SlideNumber

expression A variable that represents a SlideRange object.

Return Value

Integer

Remarks

The SlideNumber property of a Slide object is the actual number that appears in the lower-right corner of the slide when you display slide numbers. This number is determined by the number of the slide within the presentation (the SlideIndex property value) and the starting slide number for the presentation (the FirstSlideNumber property value). The slide number is always equal to the starting slide number + the slide index number - 1.

Example

This example shows how changing the first slide number affects the slide number of a specific slide.

VBA Copy code Copy code
With Application.ActivePresentation

    .PageSetup.FirstSlideNumber = 1   'starts slide numbering at 1

    MsgBox .Slides(2).SlideNumber     'returns 2

    .PageSetup.FirstSlideNumber = 10 'starts slide numbering at 10

    MsgBox .Slides(2).SlideNumber     'returns 11

End With

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


Axes.Parent Property (PowerPoint)

 Copy code hover
[image]

Axes.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents an Axes object.

See also

Concepts

Axes Object

Other resources

Axes Object Members


Shape.Type Property (PowerPoint)

 Copy code hover
[image]

Shape.Type Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the type of shape or shapes in a range of shapes. Read-only.

Syntax

expression .Type

expression A variable that represents a Shape object.

Return Value

MsoShapeType

Remarks

The value of the Type property can be one of these MsoShapeType constants.

msoAutoShape

msoCallout

msoCanvas

msoChart

msoComment

msoDiagram

msoEmbeddedOLEObject

msoFormControl

msoFreeform

msoGroup

msoLine

msoLinkedOLEObject

msoLinkedPicture

msoMedia

msoOLEControlObject

msoPicture

msoPlaceholder

msoScriptAnchor

msoShapeTypeMixed

msoTable

msoTextBox

msoTextEffect

Example

This example loops through all the shapes on all the slides in the active presentation and sets all linked Microsoft Office Excel worksheets to be updated manually.

VBA Copy code Copy code
For Each sld In ActivePresentation.Slides

    For Each sh In sld.Shapes

        If sh.Type = msoLinkedOLEObject Then

            If sh.OLEFormat.ProgID = "Excel.Sheet" Then

                sh.LinkFormat.AutoUpdate = ppUpdateOptionManual

            End If

        End If

    Next

Next

See also

Concepts

Shape Object

Other resources

Shape Object Members


Application.ProtectedViewWindowActivate Event (PowerPoint)

 Copy code hover
[image]

Application.ProtectedViewWindowActivate Event (PowerPoint)
See also Send feedback

Published: July 16, 2012

Occurs when any protected view window is activated.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .ProtectedViewWindowActivate(ProtViewWindow, )

expression A variable that represents an Application object.

Parameters

Name | Required/Optional | Data Type | Description
ProtViewWindow | Required | ProtectedViewWindow | The protected view window that is activated.

Return Value

Nothing

See also

Concepts

Application Object

Other resources

Application Object Members


SlideShowSettings Members (PowerPoint)

 Copy code hover
[image]

SlideShowSettings Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents the slide show setup for a presentation.

Methods

Name | Description
Run | Runs a slide show of the specified presentation. Returns a SlideShowWindow object.

Properties

Name | Description
AdvanceMode | Returns or sets a value that indicates how the slide show advances. Read/write.
Application | Returns an Application object that represents the creator of the specified object.
EndingSlide | Returns or sets the last slide to be displayed in the specified slide show. Read/write.
LoopUntilStopped | Determines whether specified slide show loops continuously until the user presses ESC. Read/write.
NamedSlideShows | Returns a NamedSlideShows collection that represents all the named slide shows (custom slide shows) in the specified presentation. Read-only.
Parent | Returns the parent object for the specified object.
PointerColor | Returns the pointer color for the specified presentation as a ColorFormat object. Read-only.
RangeType | Returns or sets the type of slide show to run. Read/write.
ShowMediaControls | Allows access to the media controls in the SlideShowSettings object. Read/write.
ShowPresenterView | Returns the presenter view of the SlideShowSettings object. Read/write.
ShowScrollbar | Determines whether to display the scroll bar during a slide show in browse mode. Read/write.
ShowType | Returns or sets the show type for the specified slide show. Read/write.
ShowWithAnimation | Determines whether the specified slide show displays shapes with assigned animation settings. Read/write.
ShowWithNarration | Determines whether the specified slide show is shown with narration. Read/write.
SlideShowName | Returns or sets the name of the custom slide show to run in response to a mouse action on the shape during a slide show. Read/write.
StartingSlide | Returns or sets the first slide to be displayed in the specified slide show. Read/write.


PrintRange.Application Property (PowerPoint)

 Copy code hover
[image]

PrintRange.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a PrintRange object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

PrintRange Object

Other resources

PrintRange Object Members


DisplayUnitLabel.Format Property (PowerPoint)

 Copy code hover
[image]

DisplayUnitLabel.Format Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Format

expression A variable that represents a DisplayUnitLabel object.

See also

Concepts

DisplayUnitLabel Object

Other resources

DisplayUnitLabel Object Members


CustomLayout.Name Property (PowerPoint)

 Copy code hover
[image]

CustomLayout.Name Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the display name of the specified custom layout. Read/write.

Syntax

expression .Name

expression A variable that represents a CustomLayout object.

Return Value

String

See also

Concepts

CustomLayout Object

Other resources

CustomLayout Object Members


Trendlines.Application Property (PowerPoint)

 Copy code hover
[image]

Trendlines.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents a Trendlines object.

See also

Concepts

Trendlines Object

Other resources

Trendlines Object Members


Comment.Replies Property (PowerPoint)

 Copy code hover
[image]

Comment.Replies Property (PowerPoint)
Send feedback

Returns a Comments collection of Comment objects that are children of the specified comment. Read-only.

Version information

Version Added: PowerPoint 2013

Syntax

expression .Replies

expression A variable that represents a Comment object.

Remarks

Calling the Add method on the returned collection of replies adds a new reply, unless the collection was accessed from a reply to a reply.

Property value

COMMENTS


Design Object (PowerPoint)

 Copy code hover
[image]

Design Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents an individual slide design template. The Design object is a member of the Designs and SlideRange collections and the Master and Slide objects.

Remarks

Use the Design property of the Master, Slide, or SlideRange objects to access a Design object, for example:

  • ActivePresentation.SlideMaster.Design

  • ActivePresentation.Slides(1).Design

  • ActivePresentation.Slides.Range.Design

Use the Add , Item , Clone , or Load methods of the Designs collection to add, refer to, clone, or load a Design object, respectively. For example, to add a design template, use ActivePresentation.Designs.Add designName:="MyDesign"

Example

The Design object's AddTitleMaster method and HasTitleMaster property can be used to add and / or query the status of a title slide master. For example:

VBA Copy code Copy code
Sub AddQueryTitleMaster(dsn As Design)

    dsn.AddTitleMaster

    MsgBox dsn.HasTitleMaster

End Sub

See also

Concepts

PowerPoint Object Model Reference

Other resources

Design Object Members


XlDataLabelsType Enumeration (PowerPoint)

 Copy code hover
[image]

XlDataLabelsType Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the type of data label to apply.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlDataLabelsShowBubbleSizes | 6 | Show the size of the bubble in reference to the absolute value.
xlDataLabelsShowLabel | 4 | The category for the point.
xlDataLabelsShowLabelAndPercent | 5 | The percentage of the total, and the category for the point. Available only for pie charts and doughnut charts.
xlDataLabelsShowNone | -4142 | No data labels.
xlDataLabelsShowPercent | 3 | The percentage of the total. Available only for pie charts and doughnut charts.
xlDataLabelsShowValue | 2 | The default value for the point (assumed if this argument is not specified).


Presentation.Tags Property (PowerPoint)

 Copy code hover
[image]

Presentation.Tags Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Tags object that represents the tags for the specified object. Read-only.

Syntax

expression .Tags

expression A variable that represents a Presentation object.

Return Value

Tags

Example

Note Note

Tag values are added and stored in uppercase text. You should perform tests on tag values using uppercase text, as shown in the second example.

This example adds a tag named "REGION" and a tag named "PRIORITY" to slide one in the active presentation.

VBA Copy code Copy code
With Application.ActivePresentation.Slides(1).Tags

    .Add "Region", "East"     'Adds "Region" tag with value "East"

    .Add "Priority", "Low"    'Adds "Priority" tag with value "Low"

End With

This example searches through the tags for each slide in the active presentation. If there's a tag named "PRIORITY," a message box displays the tag value. If the object doesn't have a tag named "PRIORITY," the example adds this tag with the value "Unknown."

VBA Copy code Copy code
For Each s In Application.ActivePresentation.Slides

    With s.Tags

        found = False

        For i = 1 To .Count

          If .Name(i) = "PRIORITY" Then

              found = True

              slNum = .Parent.SlideIndex

              MsgBox "Slide " & slNum & " Priority: " & .Value(i)

          End If

        Next

        If Not found Then

          slNum = .Parent.SlideIndex

          .Add "Priority", "Unknown"

          MsgBox "Slide " & slNum & " Priority tag added: Unknown"

        End If

    End With

Next

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


ChartGroup.HiLoLines Property (PowerPoint)

 Copy code hover
[image]

ChartGroup.HiLoLines Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the high-low lines for a series on a line chart. Read-only HiLoLines.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .HiLoLines

expression A variable that represents a ChartGroup object.

Remarks

This property applies only to line charts.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example enables high-low lines for chart group one of the first chart in the active document and then sets their line style, weight, and color. You should run the example on a 2-D line chart that has three series of stock-quote-like data (high-low-close).

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.ChartGroups(1)

            .HasHiLoLines = True

            With .HiLoLines.Border

                .LineStyle = xlThin

                .Weight = xlMedium

                .ColorIndex = 3

            End With

        End With

    End If

End With

See also

Concepts

ChartGroup Object

Other resources

ChartGroup Object Members


Chart.FullSeriesCollection Method (PowerPoint)

 Copy code hover
[image]

Chart.FullSeriesCollection Method (PowerPoint)
Send feedback

Returns the collection of all the series in the specified chart, or the specified series.

Version information

Version Added: PowerPoint 2013

Syntax

expression .FullSeriesCollection(Index)

expression A variable that represents a Chart object.

Parameters

Name | Required/Optional | Data type | Description
Index | Optional | Variant | The index number in the series collection of the series to return.
Index | Optional | VARIANT |

Return value

Object


Presentation.Final Property (PowerPoint)

 Copy code hover
[image]

Presentation.Final Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the presentation is marked as final (read-only). Read/write.

Syntax

expression .Final

expression An expression that returns a Presentation object.

Return Value

Boolean

Remarks

The setting of the Final property corresponds to the status of the Mark As Final command in the Microsoft PowerPoint user interface (click the Office button, and then point to Prepare).

Marking a presentation as final makes the presentation read-only and prevents changes to the presentation. When a presentation is marked as final, typing, editing commands, and proofing marks are disabled or turned off and the presentation becomes read-only.

Setting the Final property to True helps you communicate that you are sharing a completed version of a presentation. It also helps prevent reviewers or readers from making inadvertent changes to the presentation.

  • The Final property is not a security feature. Anyone who receives an electronic copy of a presentation that has been marked as final can edit that presentation by removing Mark as Final status from the presentation.

  • Presentations that have been marked as final in a Microsoft Office 2013 program will not be read-only if they are opened in earlier versions of Microsoft Office programs.

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


Application.CommandBars Property (PowerPoint)

 Copy code hover
[image]

Application.CommandBars Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a CommandBars collection that represents all the command bars in Microsoft PowerPoint. Read-only.

Syntax

expression .CommandBars

expression A variable that represents an Application object.

See also

Concepts

Application Object

Other resources

Application Object Members


TextRange.IndentLevel Property (PowerPoint)

 Copy code hover
[image]

TextRange.IndentLevel Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the the indent level for the specified text as an integer from 1 to 5, where 1 indicates a first-level paragraph with no indentation. Read/write.

Syntax

expression .IndentLevel

expression A variable that represents an TextRange object.

Return Value

Long

Example

This example indents the second paragraph in shape two on slide two in the active presentation.

VBA Copy code Copy code
Application.ActivePresentation.Slides(2).Shapes(2).TextFrame _

    .TextRange.Paragraphs(2).IndentLevel = 2

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


Designs.Parent Property (PowerPoint)

 Copy code hover
[image]

Designs.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a Designs object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

Designs Object

Other resources

Designs Object Members


SlideNavigation Object (PowerPoint)

 Copy code hover
[image]

SlideNavigation Object (PowerPoint)
Send feedback

Represents the slide navigation screen in slide show view.

Version information

Version Added: PowerPoint 2013

Example

The following code sample starts a slide show from the active presentation and then makes the navigation screen visible.

Copy code Copy code
Sub ShowSlideNavigation()

    ' Start the slide show.
    ActivePresentation.SlideShowSettings.Run

    ' Show the slide navigation screen.
    ActivePresentation.SlideShowWindow.SlideNavigation.Visible = True

End Sub


Interior.InvertIfNegative Property (PowerPoint)

 Copy code hover
[image]

Interior.InvertIfNegative Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if Microsoft Word inverts the pattern in the object when it corresponds to a negative number. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .InvertIfNegative

expression A variable that represents an Interior object.

See also

Concepts

Interior Object

Other resources

Interior Object Members


ObjectVerbs Methods (PowerPoint)

 Copy code hover
[image]

ObjectVerbs Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Item | Returns a single object from the specified ObjectVerbs collection.


ChartGroup.VaryByCategories Property (PowerPoint)

 Copy code hover
[image]

ChartGroup.VaryByCategories Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if Microsoft Word assigns a different color or pattern to each data marker. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .VaryByCategories

expression A variable that represents a ChartGroup object.

Remarks

The chart must contain only one series.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example assigns a different color or pattern to each data marker in chart group one. You should run the example on a 2-D line chart that has data markers on a series.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.ChartGroups(1).VaryByCategories = True

    End If

End With

See also

Concepts

ChartGroup Object

Other resources

ChartGroup Object Members


Walls Properties (PowerPoint)

 Copy code hover
[image]

Walls Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Name | Returns the name of the object. Read-only String.
Parent | Returns the parent for the specified object. Read-only Object.
PictureType | Returns or sets a value that specifies how pictures are displayed on the walls and faces of a 3-D chart. Read/write Variant.
PictureUnit | Returns or sets the unit for each picture on the chart if the PictureType property is set to xlStackScale; otherwise, this property is ignored. Read/write Long.
Thickness | Returns or sets the thickness of the wall. Read/write Long.


SlideRange.ApplyTemplate Method (PowerPoint)

 Copy code hover
[image]

SlideRange.ApplyTemplate Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Applies a design template to the specified slide range.

Syntax

expression .ApplyTemplate(FileName)

expression A variable that represents a SlideRange object.

Parameters

Name | Required/Optional | Data Type | Description
FileName | Required | String | Specifies the name of the design template.
Note Note

If you refer to an uninstalled presentation design template in a string, a run-time error is generated. The template is not installed automatically regardless of your FeatureInstall property setting. To use the ApplyTemplate method for a template that is not currently installed, you first must install the additional design templates. To do so, install the Additional Design Templates for PowerPoint by running the Microsoft Office installation program (click Add/Remove Programs or Programs and Features in Windows Control Panel).

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


Timing.Decelerate Property (PowerPoint)

 Copy code hover
[image]

Timing.Decelerate Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns the percentageof the duration over which a timing deceleration should take place. Read/write.

Syntax

expression .Decelerate

expression A variable that represents a Timing object.

Return Value

Single

Remarks

For example, a value of 0.9 means that an deceleration should start at the default speed, and then start to slow down after the first ten percent of the animation.

Example

This example adds a shape and adds an animation that starts at the default speed and slows down after 70% of the animation has finished.

VBA Copy code Copy code
Sub AddShapeSetTiming()

    Dim effDiamond As Effect

    Dim shpRectangle As Shape

    'Adds rectangle and sets animation effect

    Set shpRectangle = ActivePresentation.Slides(1).Shapes _

        .AddShape(Type:=msoShapeRectangle, Left:=100, _

        Top:=100, Width:=50, Height:=50)

    Set effDiamond = ActivePresentation.Slides(1).TimeLine _

        .MainSequence.AddEffect(Shape:=shpRectangle, _

        effectId:=msoAnimEffectPathDiamond)

    'Slows the effect after seventy percent of the animation has finished

    With effDiamond.Timing

        .Decelerate = 0.3

    End With

End Sub

See also

Concepts

Timing Object

Other resources

Timing Object Members


Trendline.Border Property (PowerPoint)

 Copy code hover
[image]

Trendline.Border Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the border of the object. Read-only ChartBorder.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Border

expression A variable that represents a Trendline object.

See also

Concepts

Trendline Object

Other resources

Trendline Object Members


ColorFormat Object (PowerPoint)

 Copy code hover
[image]

ColorFormat Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the color of a one-color object, the foreground or background color of an object with a gradient or patterned fill, or the pointer color. You can set colors to an explicit red-green-blue value (by using the RGB property) or to a color in the color scheme (by using the SchemeColor property).

Remarks

Use one of the properties listed in the following table to return a ColorFormat object.

Use this property | With this object | To return a ColorFormat object that represents this
DimColor | AnimationSettings | Color used for dimmed objects
BackColor | FillFormat | Background fill color (used in a shaded or patterned fill)
ForeColor | FillFormat | Foreground fill color (the fill color for a solid fill)
Color | Font | Bullet or character color
BackColor | LineFormat | Background line color (used in a patterned line)
ForeColor | LineFormat | Foreground line color (or just the line color for a solid line)
ForeColor | ShadowFormat | Shadow color
PointerColor | SlideShowSettings | Default pointer color for a presentation
PointerColor | SlideShowView | Temporary pointer color for a view of a slide show
ExtrusionColor | ThreeDFormat | Color of the sides of an extruded object

Example

Use the SchemeColor property to set the color of a slide element to one of the colors in the standard color scheme. The following example sets the text color for shape one on slide two in the active presentation to the standard color-scheme title color.

VBA Copy code Copy code
ActivePresentation.Slides(2).Shapes(1).TextFrame.TextRange.Font.Color.SchemeColor = ppTitle

Use the RGB property to set a color to an explicit red-green-blue value. The following example adds a rectangle to myDocument and then sets the foreground color, background color, and gradient for the rectangle's fill.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)
With myDocument.Shapes.AddShape(msoShapeRectangle, 90, 90, 90, 50).Fill
    .ForeColor.RGB = RGB(128, 0, 0)
    .BackColor.RGB = RGB(170, 170, 170)
    .TwoColorGradient msoGradientHorizontal, 1
End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

ColorFormat Object Members


RulerLevels Members (PowerPoint)

 Copy code hover
[image]

RulerLevels Members (PowerPoint)
Send feedback

Published: July 16, 2012

A collection of all the RulerLevel objects on the specified ruler.

Methods

Name | Description
Item | Returns a single RulerLevel object from the specified RulerLevels collection.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


Placeholders Members (PowerPoint)

 Copy code hover
[image]

Placeholders Members (PowerPoint)
Send feedback

Published: July 16, 2012

A collection of all the Shape objects that represent placeholders on the specified slide.

Methods

Name | Description
FindByName | Finds the placeholder in the Placeholders collection at the specified index location or with the specified name.
Item | Returns a single Shape object from the specified Placeholders collection.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


ShapeRange.PlaceholderFormat Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.PlaceholderFormat Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a PlaceholderFormat object that contains the properties that are unique to placeholders. Read-only.

Syntax

expression .PlaceholderFormat

expression A variable that represents a ShapeRange object.

Return Value

PlaceholderFormat

Example

This example adds text to placeholder one on slide one in the active presentation if that placeholder is a horizontal title placeholder.

VBA Copy code Copy code
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

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


Selection.TextRange2 Property (PowerPoint)

 Copy code hover
[image]

Selection.TextRange2 Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the TextRange2 object of the current Selection object. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .TextRange2

expression A variable that represents a Selection object.

Return Value

TextRange2

See also

Concepts

Selection Object

Other resources

Selection Object Members


TextStyleLevels.Item Method (PowerPoint)

 Copy code hover
[image]

TextStyleLevels.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single text style level from the specified TextStyleLevels collection.

Syntax

expression .Item(Index)

expression A variable that represents a TextStyleLevels object.

Parameters

Name | Required/Optional | Data Type | Description
Level | Required | Long | The index number of the text style level in the collection to be returned.

Return Value

TextStyleLevel

See also

Concepts

TextStyleLevels Object

Other resources

TextStyleLevels Object Members


ProtectedViewWindow.Activate Method (PowerPoint)

 Copy code hover
[image]

ProtectedViewWindow.Activate Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Activates the specified window.

Syntax

expression .Activate

expression A variable that represents a ProtectedViewWindow object.

See also

Concepts

ProtectedViewWindow Object

Other resources

ProtectedViewWindow Object Members


PrintOptions.PrintComments Property (PowerPoint)

 Copy code hover
[image]

PrintOptions.PrintComments Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Sets or returns whether comments will be printed. Read/write.

Syntax

expression .PrintComments

expression A variable that represents a PrintOptions object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The default. Comments will not be printed.
msoTrue | Comments will be printed.

Example

This example instructs Microsoft PowerPoint to print comments.

VBA Copy code Copy code
Sub PrintPresentationComments

    ActivePresentation.PrintOptions.PrintComments = msoTrue

End Sub

See also

Concepts

PrintOptions Object

Other resources

PrintOptions Object Members


TextFrame.Parent Property (PowerPoint)

 Copy code hover
[image]

TextFrame.Parent Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a TextFrame object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

TextFrame Object

Other resources

TextFrame Object Members


Presentation.SetPasswordEncryptionOptions Method (PowerPoint)

 Copy code hover
[image]

Presentation.SetPasswordEncryptionOptions Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets the options Microsoft PowerPoint uses for encrypting presentations with passwords.

Syntax

expression .SetPasswordEncryptionOptions(PasswordEncryptionProvider, PasswordEncryptionAlgorithm,PasswordEncryptionKeyLength,PasswordEncryptionFileProperties)

expression A variable that represents a Presentation object.

Parameters

Name | Required/Optional | Data Type | Description
PasswordEncryptionProvider | Required | String | The name of the encryption provider.
PasswordEncryptionAlgorithm | Required | String | The name of the encryption algorithm. PowerPoint supports stream-encrypted algorithms.
PasswordEncryptionKeyLength | Required | Long | The encryption key length. Must be a multiple of 8, starting at 40.
PasswordEncryptionFileProperties | Required | MsoTriState | msoTrue for PowerPoint to encrypt file properties.

Remarks

The PasswordEncryptionFileProperties parameter value can be one of these MsoTriState constants.

msoFalse

msoTrue

Example

This example sets the password encryption options if the file properties are not encrypted for password-protected documents.

VBA Copy code Copy code
Sub PasswordSettings()

    With ActivePresentation

        If .PasswordEncryptionFileProperties = msoFalse Then

            .SetPasswordEncryptionOptions _

                PasswordEncryptionProvider:="Microsoft RSA SChannel Cryptographic Provider", _

                PasswordEncryptionAlgorithm:="RC4", _

                PasswordEncryptionKeyLength:=56, _

                PasswordEncryptionFileProperties:=True

        End If

    End With

End Sub

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


Application.Creator Property (PowerPoint)

 Copy code hover
[image]

Application.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.

Syntax

expression .Creator

expression A variable that represents an Application object.

Return Value

Long

Remarks

The Creator property is designed to be used in Microsoft Office applications for the Macintosh.

Example

This example displays a message about the creator of myObject.

VBA Copy code Copy code
Set myObject = Application.ActivePresentation.Slides(1).Shapes(1)

If myObject.Creator = &h50575054 Then

    MsgBox "This is a PowerPoint object"

Else

    MsgBox "This is not a PowerPoint object"

End If

See also

Concepts

Application Object

Other resources

Application Object Members


Presentation.Fonts Property (PowerPoint)

 Copy code hover
[image]

Presentation.Fonts Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

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

Syntax

expression .Fonts

expression A variable that represents a Presentation object.

Example

This example replaces the Times New Roman font with the Courier font in the active presentation.

VBA Copy code Copy code
Application.ActivePresentation.Fonts _

    .Replace "Times New Roman", "Courier"

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


ShadowFormat Members (PowerPoint)

 Copy code hover
[image]

ShadowFormat Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents shadow formatting for a shape.

Methods

Name | Description
IncrementOffsetX | Changes the horizontal offset of the shadow by the specified number of points.
IncrementOffsetY | Changes the vertical offset of the shadow by the specified number of points.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Blur | Returns or sets the blur radius of the specified shadow, in points. Read/write.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
ForeColor | Returns or sets a ColorFormat object that represents the foreground color for the fill, line, or shadow. Read/write.
Obscured | Determines whether the shadow of the specified shape appears filled in and is obscured by the shape. Read/write.
OffsetX | Returns or sets the horizontal offset of the shadow from the specified shape, in points. Read/write.
OffsetY | Returns or sets the vertical offset of the shadow from the specified shape, in points. Read/write.
Parent | Returns the parent object for the specified object.
RotateWithShape | Returns or sets whether the specified shadow rotates when the shape it is associated with rotates. Read/write.
Size | Returns or sets the size of the specified shadow as a percentage of the shape size, from 0 to 200. Read/write.
Style | Returns or sets the shadow style. Read/write.
Transparency | Returns or sets the degree of transparency of the specified fill, shadow, or line as a value between 0.0 (opaque) and 1.0 (clear). Read/write.
Type | Represents the type of shadow. Read/write.
Visible | Returns or sets the visibility of the specified object or the formatting applied to the specified object. Read/write.


ThreeDFormat.BevelBottomType Property (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.BevelBottomType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or set the bottom bevel type. Read/write.

Syntax

expression .BevelBottomType

expression A variable that represents a ThreeDFormat object.

Return Value

MsoBevelType

Remarks

The BevelBottomType property value can be one of the MsoBevelType constants.

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


Axis.BaseUnitIsAuto Property (PowerPoint)

 Copy code hover
[image]

Axis.BaseUnitIsAuto Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if Microsoft Word chooses appropriate base units for the specified category axis. The default is True. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .BaseUnitIsAuto

expression A variable that represents an Axis object.

Remarks

You cannot set this property for a value axis.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the category axis for the first chart in the active document to use a time scale, with the base unit automatically chosen by Word.

VBA Copy code Copy code

With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart

            .Axes(xlCategory).CategoryType = xlTimeScale

            .Axes(xlCategory).BaseUnitIsAuto = True

        End With

    End If

End With

See also

Concepts

Axis Object

Other resources

Axis Object Members


ThreeDFormat.SetExtrusionDirection Method (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.SetExtrusionDirection Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Sets the direction that the extrusion's sweep path takes away from the extruded shape.

Syntax

expression .SetExtrusionDirection(PresetExtrusionDirection)

expression A variable that represents a ThreeDFormat object.

Parameters

Name | Required/Optional | Data Type | Description
PresetExtrusionDirection | Required | MsoPresetExtrusionDirection | Specifies the extrusion direction.

Remarks

This method sets the PresetExtrusionDirection property to the direction specified by the PresetExtrusionDirection argument.

The PresetExtrusionDirection parameter value can be one of these MsoPresetExtrusionDirection constants.

msoExtrusionBottom

msoExtrusionBottomLeft

msoExtrusionBottomRight

msoExtrusionLeft

msoExtrusionNone

msoExtrusionRight

msoExtrusionTop

msoExtrusionTopLeft

msoExtrusionTopRight

msoPresetExtrusionDirectionMixed

Example

This example specifies that the extrusion for shape one on myDocument extend toward the top of the shape and that the lighting for the extrusion come from the left.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(1).ThreeD

    .Visible = True

    .SetExtrusionDirection msoExtrusionTop

    .PresetLightingDirection = msoLightingLeft

End With

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


ChartFormat.Creator Property (PowerPoint)

 Copy code hover
[image]

ChartFormat.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents a ChartFormat object.

See also

Concepts

ChartFormat Object

Other resources

ChartFormat Object Members


SlideRange.TimeLine Property (PowerPoint)

 Copy code hover
[image]

SlideRange.TimeLine Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a TimeLine object that represents the animation timeline for the slide. Read-only.

Syntax

expression .TimeLine

expression A variable that represents a SlideRange object.

Return Value

TimeLine

Example

The following example adds a bouncing animation to the first shape on the first slide.

VBA Copy code Copy code
Sub NewTimeLineEffect()

    Dim sldFirst As Slide

    Dim shpFirst As Shape

    Set sldFirst = ActivePresentation.Slides(1)

    Set shpFirst = sldFirst.Shapes(1)

    sldFirst.TimeLine.MainSequence.AddEffect _

        Shape:=shpFirst, EffectId:=msoAnimEffectBounce

End Sub

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


Slide.ColorScheme Property (PowerPoint)

 Copy code hover
[image]

Slide.ColorScheme Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the ColorScheme object that represents the scheme colors for the specified slide, slide range, or slide master. Read/write.

Syntax

expression .ColorScheme

expression A variable that represents a Slide object.

Return Value

ColorScheme

Example

This example sets the title color to green for slides one and three in the active presentation.

VBA Copy code Copy code
Set mySlides = ActivePresentation.Slides.Range(Array(1, 3))

mySlides.ColorScheme.Colors(ppTitle).RGB = RGB(0, 255, 0)

See also

Concepts

Slide Object

Other resources

Slide Object Members


Series.MarkerForegroundColor Property (PowerPoint)

 Copy code hover
[image]

Series.MarkerForegroundColor Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets the marker foreground color as an RGB value or returns the corresponding color index value. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .MarkerForegroundColor

expression A variable that represents a Series object.

Remarks

This property applies only to line, scatter, and radar charts.

See also

Concepts

Series Object

Other resources

Series Object Members


ShapeRange.Regroup Method (PowerPoint)

 Copy code hover
[image]

ShapeRange.Regroup Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Regroups the group that the specified shape range belonged to previously. Returns the regrouped shapes as a single Shape object.

Syntax

expression .Regroup

expression A variable that represents a ShapeRange object.

Return Value

Shape

Remarks

The Regroup method only restores the group for the first previously grouped shape it finds in the specified ShapeRange collection. Therefore, if the specified shape range contains shapes that previously belonged to different groups, only one of the groups will be restored.

Note that because a group of shapes is treated as a single shape, grouping and ungrouping shapes changes the number of items in the Shapes collection and changes the index numbers of items that come after the affected items in the collection.

Example

This example regroups the shapes in the selection in the active window. If the shapes haven't been previously grouped and ungrouped, this example will fail.

VBA Copy code Copy code
ActiveWindow.Selection.ShapeRange.Regroup

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


DataTable.Select Method (PowerPoint)

 Copy code hover
[image]

DataTable.Select Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Selects the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Select

expression A variable that represents a DataTable object.

See also

Concepts

DataTable Object

Other resources

DataTable Object Members


FillFormat.ForeColor Property (PowerPoint)

 Copy code hover
[image]

FillFormat.ForeColor Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a ColorFormat object that represents the foreground color for the fill, line, or shadow. Read/write.

Syntax

expression .ForeColor

expression A variable that represents a FillFormat object.

Return Value

ColorFormat

Example

This example adds a rectangle to myDocument and then sets the foreground color, background color, and gradient for the rectangle's fill.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes _

        .AddShape(msoShapeRectangle, 90, 90, 90, 50).Fill

    .ForeColor.RGB = RGB(128, 0, 0)

    .BackColor.RGB = RGB(170, 170, 170)

    .TwoColorGradient msoGradientHorizontal, 1

End With

This example adds a patterned line to myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddLine(10, 100, 250, 0).Line

    .Weight = 6

    .ForeColor.RGB = RGB(0, 0, 255)

    .BackColor.RGB = RGB(128, 0, 0)

    .Pattern = msoPatternDarkDownwardDiagonal

End With

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


AxisTitle.VerticalAlignment Property (PowerPoint)

 Copy code hover
[image]

AxisTitle.VerticalAlignment Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the vertical alignment of the specified object. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .VerticalAlignment

expression A variable that represents an AxisTitle object.

Remarks

The value of this property can be set to one of the following XlConstants constants:

  • xlBottom

  • xlCenter

  • xlDistributed

  • xlJustify

  • xlTop

See also

Concepts

AxisTitle Object

Other resources

AxisTitle Object Members


ShapeRange.Vertices Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.Vertices Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the coordinates of the specified freeform drawing's vertices (and control points for Bézier curves) as a series of coordinate pairs. Read-only.

Syntax

expression .Vertices

expression A variable that represents a ShapeRange object.

Return Value

Variant

Remarks

You can use the array returned by this property as an argument to the AddCurve method or AddPolyline method.

The following table shows how the Vertices property associates the values in the array vertArray() with the coordinates of a triangle's vertices.

VertArray element | Contains
VertArray(1, 1) | The horizontal distance from the first vertex to the left side of the slide
VertArray(1, 2) | The vertical distance from the first vertex to the top of the slide
VertArray(2, 1) | The horizontal distance from the second vertex to the left side of the slide
VertArray(2, 2) | The vertical distance from the second vertex to the top of the slide
VertArray(3, 1) | The horizontal distance from the third vertex to the left side of the slide
VertArray(3, 2) | The vertical distance from the third vertex to the top of the slide

Example

This example assigns the vertex coordinates for shape one on myDocument to the array variable vertArray() and displays the coordinates for the first vertex.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(1)

    vertArray = .Vertices

    x1 = vertArray(1, 1)

    y1 = vertArray(1, 2)

    MsgBox "First vertex coordinates: " & x1 & ", " & y1

End With

This example creates a curve that has the same geometric description as shape one on myDocument. Shape one must contain 3n+1 vertices for this example to succeed.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    .AddCurve .Item(1).Vertices

End With

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


SlideShowWindow.Application Property (PowerPoint)

 Copy code hover
[image]

SlideShowWindow.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a SlideShowWindow object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

SlideShowWindow Object

Other resources

SlideShowWindow Object Members


SlideShowView.GetClickCount Method (PowerPoint)

 Copy code hover
[image]

SlideShowView.GetClickCount Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of mouse clicks that are defined for a slide.

Syntax

expression .GetClickCount

expression A variable that represents a SlideShowView object.

Return Value

Long

Remarks

When a slide contains animations, the GetClickCount method returns the number of mouse clicks required before a user advances to the next slide.

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


Timing.Accelerate Property (PowerPoint)

 Copy code hover
[image]

Timing.Accelerate Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the percentage of the duration over which a timing acceleration should take place. Read/write.

Syntax

expression .Accelerate

expression A variable that represents an Timing object.

Return Value

Single

Remarks

For example, a value of 0.9 means that an acceleration should start slower than the default speed for 90% of the total animation time, with the last 10% of the animation at the default speed.

To slow down an animation at the end, use the Decelerate property.

Example

This example adds a shape and adds an animation, starting out slow and matching the default speed after 30% of the animation sequence.

VBA Copy code Copy code
Sub AddShapeSetTiming()

    Dim effDiamond As Effect

    Dim shpRectangle As Shape

    'Adds rectangle and specifies effect to use for rectangle

    Set shpRectangle = ActivePresentation.Slides(1) _

        .Shapes.AddShape(Type:=msoShapeRectangle, _

        Left:=100, Top:=100, Width:=50, Height:=50)

    Set effDiamond = ActivePresentation.Slides(1) _

        .TimeLine.MainSequence.AddEffect(Shape:=shpRectangle, _

        effectId:=msoAnimEffectPathDiamond)

    'Specifies the acceleration for the effect

    With effDiamond.Timing

        .Accelerate = 0.3

    End With

End Sub

See also

Concepts

Timing Object

Other resources

Timing Object Members


LeaderLines.Format Property (PowerPoint)

 Copy code hover
[image]

LeaderLines.Format Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Format

expression A variable that represents a LeaderLines object.

See also

Concepts

LeaderLines Object

Other resources

LeaderLines Object Members


Shape.Height Property (PowerPoint)

 Copy code hover
[image]

Shape.Height Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the height of the specified object, in points. Read/write.

Syntax

expression .Height

expression A variable that represents a Shape object.

Return Value

Single

Remarks

The Height property of a Shape object returns or sets the height of the forward-facing surface of the specified shape. This measurement doesn't include shadows or 3-D effects.

Example

This example sets the height of document window two to half the height of the application window.

VBA Copy code Copy code
Windows(2).Height = Application.Height / 2

This example sets the height for row two in the specified table to 100 points (72 points per inch).

VBA Copy code Copy code
ActivePresentation.Slides(2).Shapes(5).Table.Rows(2).Height = 100

See also

Concepts

Shape Object

Other resources

Shape Object Members


Table.ApplyStyle Method (PowerPoint)

 Copy code hover
[image]

Table.ApplyStyle Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Applies a table style to the specified table.

Syntax

expression .ApplyStyle(StyleID, SaveFormatting)

expression A variable that represents a Table object.

Parameters

Name | Required/Optional | Data Type | Description
StyleID | Optional | String | The identifier of the table style to apply.
SaveFormatting | Optional | Boolean | True preserves table formatting.

See also

Concepts

Table Object

Other resources

Table Object Members


XlBarShape Enumeration (PowerPoint)

 Copy code hover
[image]

XlBarShape Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the shape used with the 3-D bar or column chart.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlBox | 0 | A box.
xlConeToMax | 5 | A cone, truncated at the specified value.
xlConeToPoint | 4 | A cone, coming to a point at the specified value.
xlCylinder | 3 | A cylinder.
xlPyramidToMax | 2 | A pyramid, truncated at the specified value.
xlPyramidToPoint | 1 | A pyramid, coming to a point at the specified value.


Shape.Connector Property (PowerPoint)

 Copy code hover
[image]

Shape.Connector Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the specified shape is a connector. Read-only.

Syntax

expression .Connector

expression A variable that represents a Shape object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified shape is not a connector.
msoTrue | The specified shape is a connector.

Example

This example deletes all connectors on myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    For i = .Count To 1 Step -1

        With .Item(i)

            If .Connector Then .Delete

        End With

    Next

End With

See also

Concepts

Shape Object

Other resources

Shape Object Members


ShapeRange.ScaleHeight Method (PowerPoint)

 Copy code hover
[image]

ShapeRange.ScaleHeight Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Scales the height of the shapes in the range by a specified factor.

Syntax

expression .ScaleHeight(Factor, RelativeToOriginalSize, fScale)

expression A variable that represents a ShapeRange object.

Parameters

Name | Required/Optional | Data Type | Description
Factor | Required | Single | Specifies the ratio between the height of the shapes after you resize them and their current or original height. For example, to make shapes 50 percent larger, specify 1.5 for this parameter.
RelativeToOriginalSize | Required | MsoTriState | Specifies whether shapes are scaled relative to their current or original sizes.
fScale | Optional | MsoScaleFrom | The parts of the shapes that retain their position when the shapes are scaled.

Return Value

Nothing

Remarks

For pictures and OLE objects, you can indicate whether you want to scale the shapes relative to their original sizes or relative to their current sizes. Shapes other than pictures and OLE objects are always scaled relative to their current height.

The RelativeToOriginalSize parameter value can be one of the following MsoTriState constants. You can specify msoTrue for this argument only if the specified shapes are pictures or OLE objects.

Constant | Description
msoFalse | Scales the shapes relative to their current sizes.
msoTrue | Scales the shapes relative to their original sizes.

The fScale parameter value can be one of the following MsoTriState constants. The default is msoScaleFromTopLeft.

msoScaleFromBottomRight

msoScaleFromMiddle

msoScaleFromTopLeft

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


PrintRanges.ClearAll Method (PowerPoint)

 Copy code hover
[image]

PrintRanges.ClearAll Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Clears all the print ranges from the PrintRanges collection. Use the Add method of the PrintRanges collection to add print ranges to the collection.

Syntax

expression .ClearAll

expression A variable that represents a PrintRanges object.

Return Value

Nothing

Example

This example clears any previously defined print ranges in the active presentation; creates new print ranges that contain slide 1, slides 3 through 5, and slides 8 and 9; prints the newly defined slide ranges; and then clears the new print ranges.

VBA Copy code Copy code
With ActivePresentation.PrintOptions

    .RangeType = ppPrintSlideRange

    With .Ranges

        .ClearAll

        .Add 1, 1

        .Add 3, 5

        .Add 8, 9

        .Parent.Parent.PrintOut

        .ClearAll

    End With

End With

See also

Concepts

PrintRanges Object

Other resources

PrintRanges Object Members


Slide Members (PowerPoint)

 Copy code hover
[image]

Slide Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a slide. The Slides collection contains all the Slide objects in a presentation.

Methods

Name | Description
ApplyTemplate | Applies a design template to the specified slide.
ApplyTemplate2 | Applies a design template and theme variant to the slide.
ApplyTheme | Applies a theme or design template to the specified slide.
ApplyThemeColorScheme | Applies a color scheme to the specified slide.
Copy | Copies the specified object to the Clipboard.
Cut | Deletes the specified object and places it on the Clipboard.
Delete | Deletes the specified Slide object.
Duplicate | Creates a duplicate of the specified Slide object, adds the new slide to the Slides collection immediately after the slide specified originally, and then returns a Slide object that represents the duplicate slide.
Export | Exports a slide, using the specified graphics filter, and saves the exported file under the specified file name.
MoveTo | Moves the specified object to a specific location within the same collection, renumbering all other items in the collection appropriately.
MoveToSectionStart | Moves the current slide to the start of the specified section.
PublishSlides | Publishes the specified slide to the specified location.
Select | Selects the specified object.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Background | Returns a ShapeRange object that represents the slide background.
BackgroundStyle | Sets or returns the background style of the specified object. Read/write.
ColorScheme | Returns or sets the ColorScheme object that represents the scheme colors for the specified slide, slide range, or slide master. Read/write.
Comments | Returns a Comments object that represents a collection of comments. Read-only.
CustomerData | Returns a CustomerData object. Read-only.
CustomLayout | Returns a CustomLayout object that represents the custom layout associated with the specified slide. Read-only.
Design | Returns a Design object representing a design.
DisplayMasterShapes | Determines whether the specified slide displays the background objects on the slide master. Read/write.
FollowMasterBackground | Determines whether the slide follows the slide master background. Read/write.
HasNotesPage | Indicates whether the selected Slide has media that resides on a notes page. Read-only.
HeadersFooters | Returns a HeadersFooters collection that represents the header, footer, date and time, and slide number associated with the slide, slide master, or range of slides. Read-only.
Hyperlinks | Returns a Hyperlinks collection that represents all the hyperlinks on the specified slide. Read-only.
Layout | Returns or sets a PpSlideLayout constant that represents the slide layout. Read/write.
Master | Returns a Master object that represents the slide master. Read-only.
Name | When a slide is inserted into a presentation, Microsoft PowerPoint automatically assigns it a name in the form Sliden, where n is an integer that represents the order in which the slide was created in the presentation. For example, the first slide inserted into a presentation is automatically named Slide1. If you copy a slide from one presentation to another, the slide loses the name it had in the first presentation and is automatically assigned a new name in the second presentation. A slide range must contain exactly one slide. Read/write String.
NotesPage | Returns a SlideRange object that represents the notes pages for the specified slide or range of slides. Read-only.
Parent | Returns the parent object for the specified object.
PrintSteps | Returns the number of slides you'd need to print to simulate the builds on the specified slide, slide master, or range of slides. Read-only.
sectionIndex | Returns the index of the selected section in the Slide range. Read-only.
Shapes | Returns a Shapes collection that represents all the elements that have been placed or inserted on the specified slide, slide master, or range of slides. Read-only.
SlideID | Returns a unique ID number for the specified slide. Read-only.
SlideIndex | Returns the index number of the specified slide within the Slides collection. Read-only.
SlideNumber | Returns the slide number. Read-only.
SlideShowTransition | Returns a SlideShowTransition object that represents the special effects for the specified slide transition. Read-only.
Tags | Returns a Tags object that represents the tags for the specified object. Read-only.
ThemeColorScheme | Returns a ThemeColorScheme object that represents the color scheme associated with the specified slide. Read-only.
TimeLine | Returns a TimeLine object that represents the animation timeline for the slide. Read-only.


Point.PictureUnit2 Property (PowerPoint)

 Copy code hover
[image]

Point.PictureUnit2 Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the unit for each picture on the chart if the PictureType property is set to xlStackScale (if not, this property is ignored). Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .PictureUnit2

expression A variable that represents a Point object.

See also

Concepts

Point Object

Other resources

Point Object Members


ProtectedViewWindow.Width Property (PowerPoint)

 Copy code hover
[image]

ProtectedViewWindow.Width Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the width of the specified object, in points. Read/write.

Syntax

expression .Width

expression A variable that represents a ProtectedViewWindow object.

See also

Concepts

ProtectedViewWindow Object

Other resources

ProtectedViewWindow Object Members


Player Object (PowerPoint)

 Copy code hover
[image]

Player Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Allows access to playback controls for the associated shape in the current window.

See also

Concepts

PowerPoint Object Model Reference

Other resources

Player Object Members


Shape.Rotation Property (PowerPoint)

 Copy code hover
[image]

Shape.Rotation Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets the number of degrees the specified shape is rotated around the z-axis. Read/write.

Syntax

expression .Rotation

expression A variable that represents a Shape object.

Return Value

Single

Remarks

A positive value indicates clockwise rotation; a negative value indicates counterclockwise rotation.

To set the rotation of a three-dimensional shape around the x-axis or the y-axis, use the RotationX property or the RotationY property of the ThreeDFormat object.

Example

This example matches the rotation of all shapes on myDocument to the rotation of shape one.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    sh1Rotation = .Item(1).Rotation

    For o = 1 To .Count

        .Item(o).Rotation = sh1Rotation

    Next

End With

See also

Concepts

Shape Object

Other resources

Shape Object Members


PublishObject.RangeEnd Property (PowerPoint)

 Copy code hover
[image]

PublishObject.RangeEnd Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the number of the last slide in a range of slides you are publishing as a Web presentation. Read/write.

Syntax

expression .RangeEnd

expression A variable that represents a PublishObject object.

Return Value

Integer

Example

This example publishes slides three through five of the active presentation to HTML. It names the published presentation Mallard.htm.

VBA Copy code Copy code
With ActivePresentation.PublishObjects(1)

    .FileName = "C:\Test\Mallard.htm"

    .SourceType = ppPublishSlideRange

    .RangeStart = 3

    .RangeEnd = 5

    .Publish

End With

See also

Concepts

PublishObject Object

Other resources

PublishObject Object Members


TabStop.Parent Property (PowerPoint)

 Copy code hover
[image]

TabStop.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a TabStop object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

TabStop Object

Other resources

TabStop Object Members


DataLabels.Position Property (PowerPoint)

 Copy code hover
[image]

DataLabels.Position Property (PowerPoint)
Send feedback

Returns a value from the XlDataLabelPosition enumeration indicating the position of the data labels in a chart. Read/write.

Version Information

Version Added: PowerPoint 2013

Syntax

expression .Position

expression A variable that represents a DataLabels object.


PlotArea.Top Property (PowerPoint)

 Copy code hover
[image]

PlotArea.Top Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the distance, in points, from the top edge of the object to the top of the first row (on a worksheet) or the top of the chart area (on a chart). Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Top

expression A variable that represents a PlotArea object.

See also

Concepts

PlotArea Object

Other resources

PlotArea Object Members


Presentation.DocumentInspectors Property (PowerPoint)

 Copy code hover
[image]

Presentation.DocumentInspectors Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the Microsoft Office DocumentInspectors collection. Read-only.

Syntax

expression .DocumentInspectors

expression An expression that returns a Presentation object.

Return Value

DocumentInspectors

Remarks

The Document Inspector is a feature that helps you to examine and remove sensitive information in a document. The DocumentInspector object makes it possible to create custom modules. For more information about working with the Document Inspector, see Using the Document Inspector.

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


ActionSettings.Application Property (PowerPoint)

 Copy code hover
[image]

ActionSettings.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents an ActionSettings object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

ActionSettings Object

Other resources

ActionSettings Object Members


DataLabels.Delete Method (PowerPoint)

 Copy code hover
[image]

DataLabels.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Delete

expression A variable that represents a DataLabels object.

See also

Concepts

DataLabels Object

Other resources

DataLabels Object Members


PlotArea.InsideTop Property (PowerPoint)

 Copy code hover
[image]

PlotArea.InsideTop Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the distance, in points, from the chart edge to the inside top edge of the plot area. Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .InsideTop

expression A variable that represents a PlotArea object.

Remarks

The plot area used for this measurement does not include the axis labels. The Top property for the plot area uses the bounding rectangle that includes the axis labels.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example draws a dotted rectangle around the inside of the plot area for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart

            Set pa = .PlotArea

                With .Shapes.AddShape(msoShapeRectangle, _

                    pa.InsideLeft, pa.InsideTop, _

                    pa.InsideWidth, pa.InsideHeight)

                .Fill.Transparency = 1

                .Line.DashStyle = msoLineDashDot

            End With

        End With

    End If

End With

See also

Concepts

PlotArea Object

Other resources

PlotArea Object Members


Series.Paste Method (PowerPoint)

 Copy code hover
[image]

Series.Paste Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Pastes a picture from the Clipboard as the marker on the selected series.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Paste

expression A variable that represents a Series object.

Remarks

You can use this method on column, bar, line, or radar charts, and it sets the MarkerStyle property to xlMarkerStylePicture.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example pastes a picture from the Clipboard into series one for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).Paste

    End If

End With

See also

Concepts

Series Object

Other resources

Series Object Members


TextEffectFormat.KernedPairs Property (PowerPoint)

 Copy code hover
[image]

TextEffectFormat.KernedPairs Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the character pairs in the specified WordArt are kerned. Read/write.

Syntax

expression .KernedPairs

expression A variable that represents a TextEffectFormat object.

Return Value

MsoTriState

Remarks

The value returned by the KernedPairs property can be one of these MsoTriState constants.

Constant | Description
msoFalse | Character pairs in the specified WordArt are not kerned.
msoTrue | Character pairs in the specified WordArt are kerned.

Example

This example turns on character pair kerning for shape three on myDocument if the shape is WordArt.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(3)

    If .Type = msoTextEffect Then

        .TextEffect.KernedPairs = msoTrue

    End If

End With

See also

Concepts

TextEffectFormat Object

Other resources

TextEffectFormat Object Members


DataLabel.Name Property (PowerPoint)

 Copy code hover
[image]

DataLabel.Name Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the name of the object. Read-only String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Name

expression A variable that represents a DataLabel object.

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


Presentation.CustomDocumentProperties Property (PowerPoint)

 Copy code hover
[image]

Presentation.CustomDocumentProperties Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a DocumentProperties collection that represents all the custom document properties for the specified presentation. Read-only.

Syntax

expression .CustomDocumentProperties

expression A variable that represents a Presentation object.

Return Value

DocumentProperties

Remarks

Use the BuiltInDocumentProperties property to return the collection of built-in document properties.

For information about returning a single member of a collection, see Returning an Object from a Collection.

Example

This example adds a static custom property named "Complete" for the active presentation.

VBA Copy code Copy code
Application.ActivePresentation.CustomDocumentProperties _

    .Add Name:="Complete", LinkToContent:=False, _

    Type:=msoPropertyTypeBoolean, Value:=False

This example displays the active presentation if the value of the "Complete" custom property is True.

VBA Copy code Copy code
With Application.ActivePresentation

    If .CustomDocumentProperties("complete") Then .PrintOut

End With

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


Presentation.Permission Property (PowerPoint)

 Copy code hover
[image]

Presentation.Permission Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Syntax

expression .Permission

expression A variable that represents a Presentation object.

Return Value

Permission

Remarks

Use the Permission object to restrict permissions to the active document and to return or set specific permissions settings.

Use the Enabled property to determine whether permissions are restricted on the active document. Use the Count property to return the number of users with permissions, and the RemoveAll method to reset all existing permissions.

The DocumentAuthor, EnableTrustedBrowser, RequestPermissionURL, and StoreLicenses properties provide additional information about permission settings.

The Permission object gives access to a collection of UserPermission objects. Use the UserPermission object to associate specific sets of rights with individual users. While some permissions granted in the user interface (such as msoPermissionPrint) apply to all users, you can use the UserPermission object to assign them on a per-user basis with per-user expiration dates.

Information Rights Management supports the use of administrative permission policies, which list users and groups and their document permissions. Use the ApplyPolicy method to apply a permission policy, and the PermissionFromPolicy, PolicyName, and PolicyDescription properties to return policy information.

The Permission object model is available whether permissions are restricted on the active document or not. The Permission property of the Presentation object does not return Nothing when the active document does not have restricted permissions. Use the Enabled property to determine whether a document has restricted permissions.

Example

The following example creates a new presentation and assigns the user with e-mail address "someone@example.com" read permission on the new presentation. The example will display the permissions of the owner and the new user.

VBA Copy code Copy code
Sub AddUserPermissions()

 Dim myPres As PowerPoint.Presentation

 Dim myPer As Office.Permission

 Dim NewOwnerPer As Office.UserPermission

 Set myPres = Application.Presentations.Add(msoTrue)

 Set myPer = myPres.Permission

 myPer.Enabled = True

 Set NewOwnerPer = myPer.Add("someone@example.com", msoPermissionRead )

 MsgBox myPer(1).UserId + " " + Str(myPer(1).Permission)

 MsgBox myPer(2).UserId + " " + Str(myPer(2).Permission)

End Sub

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


ChartArea.Shadow Property (PowerPoint)

 Copy code hover
[image]

ChartArea.Shadow Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a value that determines whether the object has a shadow. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Shadow

expression A variable that represents a ChartArea object.

See also

Concepts

ChartArea Object

Other resources

ChartArea Object Members


Sequence Methods (PowerPoint)

 Copy code hover
[image]

Sequence Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
AddEffect | Returns an Effect object that represents a new animation effect added to a sequence of animation effects.
AddTriggerEffect | Adds a trigger effect to the animation in a Sequence object.
Clone | Creates a copy of an Effect object, and adds it to the Sequences collection at the specified index position.
ConvertToAfterEffect | Specifies what an effect should do after it is finished. Returns an Effect object that represents an after effect.
ConvertToAnimateBackground | Determines whether the background will be animated separately from, or in addition to, its accompanying text. Returns an Effect object representing the newly-modified animation effect.
ConvertToAnimateInReverse | Determines whether text will be animated in reverse order. Returns an Effect object representing the text animation.
ConvertToBuildLevel | Changes the build level information for a specified animation effect. Returns an Effect object that represents the build level information.
ConvertToTextUnitEffect | Returns an Effect object that represents how text should be animated.
FindFirstAnimationFor | Returns an Effect object that represents the first animation for a given shape.
FindFirstAnimationForClick | Returns an Effect object that represents the first animation started by the specified click number.
Item | Returns a single Effect object from the specified Sequence collection.


Adjustments.Parent Property (PowerPoint)

 Copy code hover
[image]

Adjustments.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents an Adjustments object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

Adjustments Object

Other resources

Adjustments Object Members


Application.AfterPresentationOpen Event (PowerPoint)

 Copy code hover
[image]

Application.AfterPresentationOpen Event (PowerPoint)
See also Send feedback

Published: July 12, 2012

Occurs after an existing presentation is opened.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .AfterPresentationOpen(Pres)

expression An expression that returns a Application object.

Parameters

Name | Required/Optional | Data Type | Description
Pres | Required | Presentation | The presentation that is opened.

Example

This example modifies the background color for color scheme three, applies the modified color scheme to the presentation that was opened, and displays the presentation in Slide view.

VBA Copy code Copy code
Private Sub App_AfterPresentationOpen(ByVal Pres As Presentation)

    With Pres

        Set CS3 = .ColorSchemes(3)

        CS3.Colors(ppBackground).RGB = RGB(240, 115, 100)

        With Windows(1)

            .Selection.SlideRange.ColorScheme = CS3

            .ViewType = ppViewSlide

        End With

    End With

End Sub

See also

Concepts

Application Object

Other resources

Application Object Members


Table.TableDirection Property (PowerPoint)

 Copy code hover
[image]

Table.TableDirection Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the direction in which the table cells are ordered. Read/write.

Syntax

expression .TableDirection

expression A variable that represents a Table object.

Return Value

PpDirection

Remarks

The default value of the TableDirection property is ppDirectionLefttToRight, unless the LanguageSettings property or the DefaultLanguageID property is set to a right-to-left language, in which case the default value is ppDirectionRightToLeft.

The value of the TableDirection property can be one of these PpDirection constants.

ppDirectionLeftToRight

ppDirectionMixed

ppDirectionRightToLeft

When you are using the TextDirection property, The ppDirectionMixed constant may be returned.

Example

This example sets the direction in which cells in the selected table are ordered to left to right (first column is the leftmost column).

VBA Copy code Copy code
ActiveWindow.Selection.ShapeRange.Table.TableDirection = _

    ppDirectionLeftToRight

See also

Concepts

Table Object

Other resources

Table Object Members


Chart Object (PowerPoint)

 Copy code hover
[image]

Chart Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a chart in a presentation.

Version Information

Version Added: PowerPoint 2007

See also

Concepts

PowerPoint Object Model Reference

Other resources

Chart Object Members


Selection.ShapeRange Property (PowerPoint)

 Copy code hover
[image]

Selection.ShapeRange Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a ShapeRange object that represents all the slide objects that have been selected on the specified slide. Read-only.

Syntax

expression .ShapeRange

expression A variable that represents a Selection object.

Return Value

ShapeRange

Remarks

The range returned can contain the drawings, shapes, OLE objects, pictures, text objects, titles, headers, footers, slide number placeholder, and date and time objects on a slide.

You can return a shape range from a selection when the presentation is in normal, slide, or any master view.

Example

This example sets the fill foreground color for all the selected shapes in window one.

VBA Copy code Copy code
Windows(1).Selection.ShapeRange.Fill _

    .ForeColor.RGB = RGB(255, 0, 255)

See also

Concepts

Selection Object

Other resources

Selection Object Members


Font.Embedded Property (PowerPoint)

 Copy code hover
[image]

Font.Embedded Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Determines whether the specified font is embedded in the presentation. Read-only.

Syntax

expression .Embedded

expression A variable that represents an Font object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified font is not embedded in the presentation.
msoTrue | The specified font is embedded in the presentation.

Example

This example checks each font used in the active presentation to determine whether it is embedded in the presentation.

VBA Copy code Copy code
For Each usedFont In Presentations(1).Fonts

    If usedFont.Embedded Then

        MsgBox usedFont.Name & ": Embedded"

    Else

        MsgBox usedFont.Name & ": Not embedded"

    End If

Next usedFont

See also

Concepts

Font Object

Other resources

Font Object Members


Hyperlink Members (PowerPoint)

 Copy code hover
[image]

Hyperlink Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a hyperlink associated with a non-placeholder shape or text.

Methods

Name | Description
AddToFavorites | Adds a shortcut that represents the specified hyperlink's target document to the Favorites folder in the Windows folder.
CreateNewDocument | Creates a new Web presentation associated with the specified hyperlink.
Delete | Deletes the specified Hyperlink object.
Follow | Displays the HTML document associated with the specified hyperlink in a new Web browser window.

Properties

Name | Description
Address | Returns or sets the Internet address (URL) to the target document. Read/write.
Application | Returns an Application object that represents the creator of the specified object.
EmailSubject | Returns or sets the text string of the hyperlink subject line. The subject line is appended to the Internet address (URL) of the hyperlink. Read/write.
Parent | Returns the parent object for the specified object.
ScreenTip | Returns or sets the ScreenTip text of a hyperlink. Read/write.
ShowAndReturn | Determines if and under what circumstances Microsoft PowerPoint returns to the initiating slide show. Read/write.
SubAddress | Returns or sets the location within a document — such as a bookmark in a word document, a range in a Microsoft Office Excel worksheet, or a slide in a Microsoft PowerPoint presentation — associated with the specified hyperlink. Read/write.
TextToDisplay | Returns or sets the display text for a hyperlink not associated with a graphic. Read/write.
Type | Represents the type of hyperlink. Read-only.


FillFormat Methods (PowerPoint)

 Copy code hover
[image]

FillFormat Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Background | Specifies that the shape's fill should match the slide background. If you change the slide background after applying this method to a fill, the fill will also change.
OneColorGradient | Sets the specified fill to a one-color gradient.
Patterned | Sets the specified fill to a pattern.
PresetGradient | Sets the specified fill to a preset gradient.
PresetTextured | Sets the specified fill to a preset texture.
Solid | Sets the specified fill to a uniform color. Use this method to convert a gradient, textured, patterned, or background fill back to a solid fill.
TwoColorGradient | Sets the specified fill to a two-color gradient.
UserPicture | Fills the specified shape with one large image.
UserTextured | Fills the specified shape with small tiles of an image.


SoundEffect Properties (PowerPoint)

 Copy code hover
[image]

SoundEffect Properties (PowerPoint)
Send feedback

Published: July 12, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Name | Returns or sets the name of the specified object. Read/write.
Parent | Returns the parent object for the specified object.
Type | Represents the type of sound effect. Read/write.


How to: Work with Shapes (Drawing Objects)

 Copy code hover
[image]

How to: Work with Shapes (Drawing Objects)
Send feedback

Shapes, or drawing objects, are represented by three different objects: the Shapes collection, the ShapeRange collection, and the Shape object. In general, you use the Shapes collection to create shapes and when you want to iterate through all the shapes on a slide; you use the Shape object when you want to modify a single shape; and you use the ShapeRange collection when you want to modify multiple shapes the same way you can work with multiple selected shapes in the user interface.

Setting properties for a shape

Many formatting properties of shapes are not set by properties that apply directly to the Shape or ShapeRange object. Instead, related shape attributes are grouped under secondary objects, such as the FillFormat object, which contains all the properties that relate to the shape's fill, or the LinkFormat object, which contains all the properties that are unique to linked OLE objects. To set properties for a shape, you must first return the object that represents the set of related shape attributes and then set properties of that returned object. For example, you use the Fill property to return the FillFormat object, and then you set the ForeColor property of the FillFormat object to set the fill foreground color for the specified shape, as shown in the following example.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)
myDocument.Shapes(1).Fill.ForeColor.RGB = RGB(255, 0, 0)

Applying a property or method to several shapes at the same time

In the user interface, there are some operations you can perform with several shapes selected; for example, you can select several shapes and set all their individual fills at once. There are other operations you can only perform with a single shape selected; for example, you can only edit the text in a shape if a single shape is selected.

In Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any operation that you can perform on a single shape on a range of shapes, whether or not you can perform the same operation in the user interface.

  • If the operation works on multiple selected shapes in the user interface, you can perform the same operation in Visual Basic by constructing a ShapeRange collection that contains the shapes you want to work with, and applying the appropriate properties and methods directly to the ShapeRange collection.

  • If the operation does not work on multiple selected shapes in the user interface, you can still perform the operation in Visual Basic by looping through the Shapes collection or through a ShapeRange collection that contains the shapes you want to work with, and applying the appropriate properties and methods to the individual Shape objects in the collection.

Many properties and methods that apply to the Shape object and ShapeRange collection fail if applied to certain kinds of shapes. For example, the TextFrame property fails if applied to a shape that cannot contain text. If you are not positive that each shape in a ShapeRange collection can have a certain property or method applied to it, do not apply the property or method to the ShapeRange collection. If you want to apply one of these properties or methods to a collection of shapes, you must loop through the collection and test each individual shape to make sure it is an appropriate type of shape before applying the property or method to it.

Applying a property or method to a ShapeRange collection

If you can perform an operation on multiple selected shapes in the user interface at the same time, you can do the programmatic equivalent by constructing a ShapeRange collection and then applying the appropriate properties or methods to it. The following example constructs a shape range that contains the AutoShapes named "Big Star" and "Little Star" on myDocument and applies a gradient fill to them and applies a gradient fill to them.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)
Set myRange = myDocument.Shapes _
    .Range(Array("Big Star", "Little Star"))
myRange.Fill.PresetGradient msoGradientHorizontal, _
    1, msoGradientBrass

The following are general guidelines for how properties and methods behave when they are applied to a ShapeRange collection.

  • Applying a method to the collection is equivalent to applying the method to each individual Shape object in that collection.

  • Setting the value of a property of the collection is equivalent to setting the value of the property of each individual shape in that range.

  • A property of the collection that returns a constant returns the value of the property for an individual shape in the collection if all shapes in the collection have the same value for that property. If not all shapes in the collection have the same value for the property, it returns the "mixed" constant.

  • A property of the collection that returns a simple data type (such as Long, Single, or String) returns the value of the property for an individual shape if all shapes in the collection have the same value for that property.

  • The value of some properties can be returned or set only if there is exactly one shape in the collection. If there is more than one shape in the collection, a run-time error occurs. This is generally the case for returning or setting properties when the equivalent action in the user interface is possible only with a single shape (actions such as editing text in a shape or editing the points of a freeform).

The preceding guidelines also apply when you are setting properties of shapes that are grouped under secondary objects of the ShapeRange collection, such as the FillFormat object. If the secondary object represents operations that can be performed on multiple selected objects in the user interface, you will be able to return the object from a ShapeRange collection and set its properties. For example, you can use the Fill property to return the FillFormat object that represents the fills of all the shapes in the ShapeRange collection. Setting the properties of this FillFormat object will set the same properties for all the individual shapes in the ShapeRange collection.

Looping through a Shapes or ShapeRange collection

Even if you cannot perform an operation on several shapes in the user interface at the same time by selecting them and then using a command, you can perform the equivalent action programmatically by looping through the Shapes collection or through a ShapeRange collection that contains the shapes you want to work with, and applying the appropriate properties and methods to the individual Shape objects in the collection. The following example loops through all the shapes on myDocument and adds text to each shape that is an AutoShape. and adds text to each shape that is an AutoShape. Set myDocument = ActivePresentation.Slides(1) For Each sh In myDocument.Shapes If sh.Type = msoAutoShape Then sh.TextFrame.TextRange.InsertAfter " (version 1)" End If Next

The following example constructs ShapeRange collection that contains all the currently selected shapes in the active window and sets the text in each shape in the collection that can contain text.

VBA Copy code Copy code
For Each sh in ActiveWindow.Selection.ShapeRange
    If sh.HasTextFrame Then
        sh.TextFrame.TextRange = "Initially selected"
    End If
Next

Aligning, distributing, and grouping shapes in a shape range

Use the Align and Distribute methods to position a set of shapes relative to one another or relative to the document that contains them. Use the Group method or the Regroup method to form a single grouped shape from a set of shapes.


FillFormat.TextureHorizontalScale Property (PowerPoint)

 Copy code hover
[image]

FillFormat.TextureHorizontalScale Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the horizontal scaling factor for the texture fill. Read/write.

Syntax

expression .TextureHorizontalScale

expression An expression that returns a FillFormat object.

Return Value

Single

Remarks

The setting of the TextureHorizontalScale property corresponds to the setting of the Scale X box under Tiling Options on the Fill pane of the Format Picture dialog box in the Microsoft PowerPoint user interface (under Drawing Tools, on the Format Tab, in the Shape Styles group, click Format Shape.)

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


Table.Style Property (PowerPoint)

 Copy code hover
[image]

Table.Style Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a TableStyle object that contains information about the specified table's current table style. Read-only.

Syntax

expression .Style

expression A variable that represents a Table object.

Return Value

TableStyle

See also

Concepts

Table Object

Other resources

Table Object Members


Presentation.PasswordEncryptionKeyLength Property (PowerPoint)

 Copy code hover
[image]

Presentation.PasswordEncryptionKeyLength Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the key length of the algorithm Microsoft PowerPoint uses when it encrypts documents with passwords. Read-only.

Syntax

expression .PasswordEncryptionKeyLength

expression A variable that represents a Presentation object.

Return Value

Long

Remarks

Use the SetPasswordEncryptionOptions method to specify the algorithm PowerPoint uses for encrypting documents with passwords.

Example

This example sets the password encryption options if the password encryption key length is less than 40.

VBA Copy code Copy code
Sub PasswordSettings()
    With ActivePresentation
        If .PasswordEncryptionKeyLength < 40 Then
            .SetPasswordEncryptionOptions

PasswordEncryptionProvider:="Microsoft RSA SChannel Cryptographic Provider", _
                PasswordEncryptionAlgorithm:="RC4", _
                PasswordEncryptionKeyLength:=56, _
                PasswordEncryptionFileProperties:=True
        End If
    End With
End Sub

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


Tags.Count Property (PowerPoint)

 Copy code hover
[image]

Tags.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a Tags object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

Tags Object

Other resources

Tags Object Members


AxisTitle.ReadingOrder Property (PowerPoint)

 Copy code hover
[image]

AxisTitle.ReadingOrder Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets an XlReadingOrder constant that represents the reading order for the specified object. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ReadingOrder

expression A variable that represents an AxisTitle object.

See also

Concepts

AxisTitle Object

Other resources

AxisTitle Object Members


SlideShowTransition.EntryEffect Property (PowerPoint)

 Copy code hover
[image]

SlideShowTransition.EntryEffect Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the special effect applied to the specified slide transition. Read/write.

Syntax

expression .EntryEffect

expression A variable that represents a SlideShowTransition object.

Return Value

PpEntryEffect

Remarks

If the TextLevelEffect property for the specified shape is set to ppAnimateLevelNone (the default value) or the Animate property is set to False, you won't see the special effect you've applied with the EntryEffect property.

Example

This example adds a title slide to the active presentation and sets the title to fly in from the right whenever it is animated during a slide show.

VBA Copy code Copy code
With ActivePresentation.Slides.Add(1, ppLayoutTitleOnly).Shapes(1)

        .TextFrame.TextRange.Text = "Sample title"

    With .AnimationSettings

        .TextLevelEffect = ppAnimateByAllLevels

        .EntryEffect = ppEffectFlyFromRight

        .Animate = True

    End With

End With

See also

Concepts

SlideShowTransition Object

Other resources

SlideShowTransition Object Members


Player.Application Property (PowerPoint)

 Copy code hover
[image]

Player.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a Player object.

See also

Concepts

Player Object

Other resources

Player Object Members


MsoAnimateByLevel Enumeration (PowerPoint)

 Copy code hover
[image]

MsoAnimateByLevel Enumeration (PowerPoint)
Send feedback

Published: July 12, 2012

Specifies for charts, diagrams, or text, the level to which the animation effect will be applied. The default value is msoAnimationLevelNone.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
msoAnimateChartAllAtOnce | 7 | Animate chart all at once
msoAnimateChartByCategory | 8 | Animate chart by category
msoAnimateChartByCategoryElements | 9 | Animate chart by category elements
msoAnimateChartBySeries | 10 | Animate chart by series
msoAnimateChartBySeriesElements | 11 | Animate chart by series elements
msoAnimateDiagramAllAtOnce | 12 | Animate diagram all at once
msoAnimateDiagramBreadthByLevel | 16 | Animate diagram breadth by level
msoAnimateDiagramBreadthByNode | 15 | Animate diagram breadth by node
msoAnimateDiagramClockwise | 17 | Animate diagram clockwise
msoAnimateDiagramClockwiseIn | 18 | Animate diagram clockwise in
msoAnimateDiagramClockwiseOut | 19 | Animate diagram clockwise out
msoAnimateDiagramCounterClockwise | 20 | Animate diagram counter-clockwise
msoAnimateDiagramCounterClockwiseIn | 21 | Animate diagram counter-clockwise in
msoAnimateDiagramCounterClockwiseOut | 22 | Animate diagram counter-clockwise out
msoAnimateDiagramDepthByBranch | 14 | Animate diagram depth by branch
msoAnimateDiagramDepthByNode | 13 | Animate diagram depth by node
msoAnimateDiagramDown | 26 | Animate diagram down
msoAnimateDiagramInByRing | 23 | Animate diagram in by ring
msoAnimateDiagramOutByRing | 24 | Animate diagram out by ring
msoAnimateDiagramUp | 25 | Animate diagram up
msoAnimateLevelMixed | -1 | Animate level mixed
msoAnimateLevelNone | 0 | Animate level none
msoAnimateTextByAllLevels | 1 | Animate text by all levels
msoAnimateTextByFifthLevel | 6 | Animate text by fifth level
msoAnimateTextByFirstLevel | 2 | Animate text by first level
msoAnimateTextByFourthLevel | 5 | Animate text by fourth level
msoAnimateTextBySecondLevel | 3 | Animate text by second level
msoAnimateTextByThirdLevel | 4 | Animate text by third level


Fonts Members (PowerPoint)

 Copy code hover
[image]

Fonts Members (PowerPoint)
Send feedback

Published: July 16, 2012

A collection of all the Font objects in the specified presentation.

Methods

Name | Description
Item | Returns a single Font object from the specified Fonts collection.
Replace | Replaces a font in the Fonts collection.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


TextFrame.TextRange Property (PowerPoint)

 Copy code hover
[image]

TextFrame.TextRange Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a TextRange object that represents the text in the specified text frame. Read-only.

Syntax

expression .TextRange

expression A variable that represents a TextFrame object.

Return Value

TextRange

Remarks

You can construct a text range from a selection when the presentation is in slide view, normal view, outline view, notes page view, or any master view.

Example

This example makes the selected text bold in the first window.

VBA Copy code Copy code
Windows(1).Selection.TextRange.Font.Bold = True

See also

Concepts

TextFrame Object

Other resources

TextFrame Object Members


TickLabels.Name Property (PowerPoint)

 Copy code hover
[image]

TickLabels.Name Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the name of the object. Read-only String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Name

expression A variable that represents a TickLabels object.

See also

Concepts

TickLabels Object

Other resources

TickLabels Object Members


Slide.sectionIndex Property (PowerPoint)

 Copy code hover
[image]

Slide.sectionIndex Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the index of the selected section in the Slide range. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .sectionIndex

expression A variable that represents a Slide object.

Return Value

Single

See also

Concepts

Slide Object

Other resources

Slide Object Members


Slide.CustomerData Property (PowerPoint)

 Copy code hover
[image]

Slide.CustomerData Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a CustomerData object. Read-only.

Syntax

expression .CustomerData

expression An expression that returns a Slide object.

Return Value

CustomerData

See also

Concepts

Slide Object

Other resources

Slide Object Members


Series.HasLeaderLines Property (PowerPoint)

 Copy code hover
[image]

Series.HasLeaderLines Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if the series has leader lines. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .HasLeaderLines

expression A variable that represents a Series object.

Remarks

This property applies only to pie charts.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example adds data labels and blue leader lines to series one on the pie chart. If no leader lines are visible, this example code will fail. In this situation, you can manually drag one of the data labels away from the pie chart to make a leader line show up.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.SeriesCollection(1)

            .HasDataLabels = True

            .DataLabels.Position = xlLabelPositionBestFit

            .HasLeaderLines = True

            .LeaderLines.Border.ColorIndex = 5

        End With

    End If

End With

See also

Concepts

Series Object

Other resources

Series Object Members


ShapeRange.Apply Method (PowerPoint)

 Copy code hover
[image]

ShapeRange.Apply Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Applies to the specified shape range formatting that's been copied by using the PickUp method.

Syntax

expression .Apply

expression A variable that represents a ShapeRange object.

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


Comments.Add2 Method (PowerPoint)

 Copy code hover
[image]

Comments.Add2 Method (PowerPoint)
Send feedback

Returns a Comment object that represents a new comment added to a slide.

Version information

Version Added: PowerPoint 2013

Syntax

expression .Add2(Left,Top,Author,AuthorInitials,Text,ProviderID,UserID)

expression A variable that represents a Comments object.

Parameters

Name | Required/Optional | Data type | Description
Left | Required | Float | The position, measured in points, of the left edge of the comment, relative to the left edge of the presentation.
Top | Required | Float | The position, measured in points, of the top edge of the comment, relative to the top edge of the presentation.
Author | Required | String | The author of the comment.
AuthorInitials | Required | String | The author's initials.
Text | Required | String | The comment's text.
ProviderID | Required | String | The service that provides contact information. Example: 'AD' (Active Directory)
UserID | Required | String | The ID of the user providing the comment.
Left | Required | FLOAT |
Top | Required | FLOAT |
Author | Required | STRING |
AuthorInitials | Required | STRING |
Text | Required | STRING |
ProviderID | Required | STRING |
UserID | Required | STRING |

Return value

COMMENT


View.MediaControlsHeight Property (PowerPoint)

 Copy code hover
[image]

View.MediaControlsHeight Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the height, in points, of the media controls. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .MediaControlsHeight

expression A variable that represents a View object.

Return Value

Single

See also

Concepts

View Object

Other resources

View Object Members


BulletFormat.Font Property (PowerPoint)

 Copy code hover
[image]

BulletFormat.Font Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a Font object that represents character formatting. Read-only.

Syntax

expression .Font

expression A variable that represents a BulletFormat object.

Return Value

Font

Example

This example sets the formatting for the text in shape one on slide one in the active presentation.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(1)

    With .TextFrame.TextRange.Font

        .Size = 48

        .Name = "Palatino"

        .Bold = True

        .Color.RGB = RGB(255, 127, 255)

    End With

End With

This example sets the color and font name for bullets in shape two on slide one.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(2)

    With .TextFrame.TextRange.ParagraphFormat.Bullet

        .Visible = True

        With .Font

            .Name = "Palatino"

            .Color.RGB = RGB(0, 0, 255)

        End With

    End With

End With

See also

Concepts

BulletFormat Object

Other resources

BulletFormat Object Members


TextStyle.Parent Property (PowerPoint)

 Copy code hover
[image]

TextStyle.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a TextStyle object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

TextStyle Object

Other resources

TextStyle Object Members


LineFormat.Visible Property (PowerPoint)

 Copy code hover
[image]

LineFormat.Visible Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the visibility of the specified object or the formatting applied to the specified object. Read/write.

Syntax

expression .Visible

expression A variable that represents a LineFormat object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified object or object formatting is not visible.
msoTrue | The specified object or object formatting is visible.

See also

Concepts

LineFormat Object

Other resources

LineFormat Object Members


Presentation.SectionProperties Property (PowerPoint)

 Copy code hover
[image]

Presentation.SectionProperties Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a SectionProperties object. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .SectionProperties

expression An expression that returns a Presentation object.

Return Value

SectionProperties

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


Series.Shadow Property (PowerPoint)

 Copy code hover
[image]

Series.Shadow Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a value that indicates whether the object has a shadow. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Shadow

expression A variable that represents a Series object.

See also

Concepts

Series Object

Other resources

Series Object Members


View.Parent Property (PowerPoint)

 Copy code hover
[image]

View.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a View object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

View Object

Other resources

View Object Members


Tags.Add Method (PowerPoint)

 Copy code hover
[image]

Tags.Add Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Adds a tag to the Tags collection of an object.

Syntax

expression .Add(Name, Value)

expression A variable that represents a Tags object.

Parameters

Name | Required/Optional | Data Type | Description
Name | Required | String | The name of the tag.
Value | Required | String | The value of the tag.

See also

Concepts

Tags Object

Other resources

Tags Object Members


Rows.Parent Property (PowerPoint)

 Copy code hover
[image]

Rows.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a Rows object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

Rows Object

Other resources

Rows Object Members


TextRange.Paste Method (PowerPoint)

 Copy code hover
[image]

TextRange.Paste Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Pastes the text on the Clipboard into the specified text range, and returns a TextRange object that represents the pasted text.

Syntax

expression .Paste

expression A variable that represents a TextRange object.

Return Value

TextRange

Remarks

Use the ViewType property to set the view for a window before pasting the Clipboard contents into it. The following table shows what you can paste into each view.

Into this view | You can paste the following from the Clipboard
Slide view or notes page view | Shapes, text, or entire slides. If you paste a slide from the Clipboard, an image of the slide will be inserted onto the slide, master, or notes page as an embedded object. If one shape is selected, the pasted text will be appended to the shape's text; if text is selected, the pasted text will replace the selection; if anything else is selected, the pasted text will be placed in it is own text frame. Pasted shapes will be added to the top of the z-order and won't replace selected shapes.
Outline view | Text or entire slides. You cannot paste shapes into outline view. A pasted slide will be inserted before the slide that contains the cursor.
Slide sorter view | Entire slides. You cannot paste shapes or text into slide sorter view. A pasted slide will be inserted at the cursor or after the last slide selected in the presentation.

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


Chart.RightAngleAxes Property (PowerPoint)

 Copy code hover
[image]

Chart.RightAngleAxes Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if the chart axes are at right angles, independent of chart rotation or elevation. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .RightAngleAxes

expression A variable that represents a Chart object.

Remarks

This property applies only to 3-D line, column, and bar charts.

If this property is set to True, the Perspective property is ignored.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the axes for the first chart in the active document to intersect at right angles. You should run the example on a 3-D chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.RightAngleAxes = True

    End If

End With

See also

Concepts

Chart Object

Other resources

Chart Object Members


FileConverters.Item Method (PowerPoint)

 Copy code hover
[image]

FileConverters.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an individual FileConverter object in a collection.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Item(Index)

expression Required. A variable that represents a FileConverters collection.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Variant | The individual object to be returned. Can be a Long indicating the ordinal position or a String representing the name of the individual object.

Return Value

FileConverter

See also

Concepts

FileConverters Object

Other resources

FileConverters Object Members


Application.SlideShowWindows Property (PowerPoint)

 Copy code hover
[image]

Application.SlideShowWindows Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a SlideShowWindows collection that represents all open slide show windows. Read-only.

Syntax

expression .SlideShowWindows

expression A variable that represents a Application object.

Return Value

SlideShowWindows

Remarks

For information about returning a single member of a collection, see Returning an Object from a Collection.

Example

This example runs a slide show in a window and sets the height and width of the slide show window.

VBA Copy code Copy code
With Application

    .Presentations(1).SlideShowSettings.Run

    With .SlideShowWindows(1)

        .Height = 250

        .Width = 250

    End With

End With

See also

Concepts

Application Object

Other resources

Application Object Members


ChartCharacters.Caption Property (PowerPoint)

 Copy code hover
[image]

ChartCharacters.Caption Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the text of this range of characters. Read-only String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Caption

expression A variable that represents a ChartCharacters object.

See also

Concepts

ChartCharacters Object

Other resources

ChartCharacters Object Members


Presentation.DocumentLibraryVersions Property (PowerPoint)

 Copy code hover
[image]

Presentation.DocumentLibraryVersions Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a DocumentLibraryVersions collection that represents the collection of versions of a shared presentation that has versioning enabled and that is stored in a document library on a server.

Syntax

expression .DocumentLibraryVersions

expression A variable that represents a Presentation object.

Return Value

DocumentLibraryVersions

Example

The following example returns the collection of versions for the active presentation. This example assumes that the active presentation has versioning enabled and is stored in a shared document library on a server.

VBA Copy code Copy code
Dim objVersions As DocumentLibraryVersions

Set objVersions = ActivePresentation.DocumentLibraryVersions

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


Options.DisplayPasteOptions Property (PowerPoint)

 Copy code hover
[image]

Options.DisplayPasteOptions Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether Microsoft PowerPoint displays the Paste Options button, which appears directly under newly pasted text. Read/write.

Syntax

expression .DisplayPasteOptions

expression A variable that represents a Options object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The PasteOptions button is not displayed.
msoTrue | The PasteOptions button is displayed.

Example

This example enables the Paste Options button if the option has been disabled.

VBA Copy code Copy code
Sub ShowPasteOptionsButton()

    With Application.Options

        If  .DisplayPasteOptions = False Then

            .DisplayPasteOptions = True

        End If

    End With

End Sub

See also

Concepts

Options Object

Other resources

Options Object Members


Sequences.Application Property (PowerPoint)

 Copy code hover
[image]

Sequences.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a Sequences object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

Sequences Object

Other resources

Sequences Object Members


ShapeRange.HorizontalFlip Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.HorizontalFlip Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns whether the specified shape is flipped around the horizontal axis. Read-only.

Syntax

expression .HorizontalFlip

expression A variable that represents a ShapeRange object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified shape is not flipped around the horizontal axis.
msoTrue | The specified shape is flipped around the horizontal axis.

Example

This example restores each shape on myDocument to its original state, if it is been flipped horizontally or vertically.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

For Each s In myDocument.Shapes

    If s.HorizontalFlip Then s.Flip msoFlipHorizontal

    If s.VerticalFlip Then s.Flip msoFlipVertical

Next

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


Comment.TimeZoneBias Property (PowerPoint)

 Copy code hover
[image]

Comment.TimeZoneBias Property (PowerPoint)
Send feedback

Returns a String that specifies the local time zone adjustment for the contact. Read-only.

Version information

Version Added: PowerPoint 2013

Syntax

expression .TimeZoneBias

expression A variable that represents a Comment object.

Property value

INT


ColorFormat.SchemeColor Property (PowerPoint)

 Copy code hover
[image]

ColorFormat.SchemeColor Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the color in the applied color scheme that's associated with the specified object. Read/write.

Syntax

expression .SchemeColor

expression A variable that represents a ColorFormat object.

Return Value

PpColorSchemeIndex

Remarks

The value of the SchemeColor property can be one of these PpColorSchemeIndex constants.

ppAccent1

ppAccent2

ppAccent3

ppBackground

ppFill

ppForeground

ppNotSchemeColor

ppSchemeColorMixed

ppShadow

ppTitle

Example

This example switches the background color on slide one in the active presentation between an explicit red-green-blue value and the color-scheme background color.

VBA Copy code Copy code
With ActivePresentation.Slides(1)

    .FollowMasterBackground = False

    With .Background.Fill.ForeColor

        If .Type = msoColorTypeScheme Then

            .RGB = RGB(0, 128, 128)

        Else

            .SchemeColor = ppBackground

        End If

    End With

End With

See also

Concepts

ColorFormat Object

Other resources

ColorFormat Object Members


FillFormat.Background Method (PowerPoint)

 Copy code hover
[image]

FillFormat.Background Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Specifies that the shape's fill should match the slide background. If you change the slide background after applying this method to a fill, the fill will also change.

Syntax

expression .Background

expression A variable that represents a FillFormat object.

Remarks

Note that applying the Background method to a shape's fill isn't the same as setting a transparent fill for the shape, nor is it always the same as applying the same fill to the shape as you apply to the background. The second example demonstrates this.

Example

This example sets the fill of shape one on slide one in the active presentation to match the slide background.

VBA Copy code Copy code
ActivePresentation.Slides(1).Shapes(1).Fill.Background

This example sets the background for slide one in the active presentation to a preset gradient, adds a rectangle to the slide, and then places three ovals in front of the rectangle. The first oval has a fill that matches the slide background, the second has a transparent fill, and the third has the same fill applied to it as was applied to the background. Notice the difference in the appearances of these three ovals.

VBA Copy code Copy code
With ActivePresentation.Slides(1)

    .FollowMasterBackground = False

    .Background.Fill.PresetGradient _

        msoGradientHorizontal, 1, msoGradientDaybreak

    With .Shapes

        .AddShape msoShapeRectangle, 50, 200, 600, 100

        .AddShape(msoShapeOval, 75, 150, 150, 100) _

            .Fill.Background

        .AddShape(msoShapeOval, 275, 150, 150, 100).Fill _

            .Transparency = 1

        .AddShape(msoShapeOval, 475, 150, 150, 100) _

            .Fill.PresetGradient _

            msoGradientHorizontal, 1, msoGradientDaybreak

    End With

End With

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


RGBColor Properties (PowerPoint)

 Copy code hover
[image]

RGBColor Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Parent | Returns the parent object for the specified object.
RGB | Returns or sets the red-green-blue (RGB) value of a specified color-scheme color or extra color when used with a PpColorSchemeIndex constant. Read/write.


PlaySettings.StopAfterSlides Property (PowerPoint)

 Copy code hover
[image]

PlaySettings.StopAfterSlides Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the number of slides to be displayed before the media clip stops playing. Read/write.

Syntax

expression .StopAfterSlides

expression A variable that represents a PlaySettings object.

Return Value

Long

Remarks

For the StopAfterSlides property setting to take effect, the PauseAnimation property of the specified slide must be set to False, and the PlayOnEntry property must be set to True.

The media clip will stop playing when the specified number of slides have been displayed or when the clip comes to an end — whichever comes first. A value of 0 (zero) specifies that the clip will stop playing after the current slide.

Example

This example specifies that the media clip represented by shape three on slide one in the active presentation will be played automatically when it is animated, that the slide show will continue while the media clip is playing in the background, and that the clip will stop playing after three slides are displayed or when the end of the clip is reached — whichever comes first. Shape three must be a sound or movie object.

VBA Copy code Copy code
Set OLEobj = ActivePresentation.Slides(1).Shapes(3)

With OLEobj.AnimationSettings.PlaySettings

    .PlayOnEntry = True

    .PauseAnimation = False

    .StopAfterSlides = 3

End With

See also

Concepts

PlaySettings Object

Other resources

PlaySettings Object Members


CustomerData.Item Method (PowerPoint)

 Copy code hover
[image]

CustomerData.Item Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the specified CustomXMLPart object from the CustomerData collection. Read-only.

Syntax

expression .Item(Id)

expression An expression that returns a CustomerData object.

Parameters

Name | Required/Optional | Data Type | Description
Id | Required | String | The ID of the CustomXMLPart object.

Return Value

CustomXMLPart

Remarks

Individual CustomXMLPart objects in the CustomerData collection are represented by GUIDs (globally unique identifiers). Pass the GUID that represents the custom XML part that you want to get to the Id parameter of the Item method as a String. You can get the ID of a particular custom XML part by getting the value of the Id property of the CustomXMLPart object.

Example

The following example shows how to use the Item method to get a custom XML part by its ID string.

VBA Copy code Copy code
Public Sub Item_Example()

    Dim pptSlide As Slide
    Set pptSlide = ActivePresentation.Slides(1)

    Dim pptShape As Shape
    Set pptShape = pptSlide.Shapes(1)

    ' Get the CustomerData collection of the shape
    Dim pptCustomerData As customerData
    Set pptCustomerData = pptShape.customerData

    ' Add a new CustomXMLPart object to the
    ' CustomerData collection for this shape
    Dim pptCustomXMLPart As CustomXMLPart
    Set pptCustomXMLPart = pptCustomerData.Add

    ' Get the ID of the new part
    Dim myString As String
    myString = pptCustomXMLPart.Id
    Debug.Print myString

    ' Get the new part from the collection by its Id
    ' and load XML into the part
    pptCustomerData.Item(myString).LoadXML ("<text>This is XML data.</text>")
    Debug.Print pptCustomXMLPart.xml

End Sub

See also

Concepts

CustomerData Collection

Other resources

CustomerData Object Members


Shape.PlaceholderFormat Property (PowerPoint)

 Copy code hover
[image]

Shape.PlaceholderFormat Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a PlaceholderFormat object that contains the properties that are unique to placeholders. Read-only.

Syntax

expression .PlaceholderFormat

expression A variable that represents a Shape object.

Return Value

PlaceholderFormat

Example

This example adds text to placeholder one on slide one in the active presentation if that placeholder is a horizontal title placeholder.

VBA Copy code Copy code
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

Concepts

Shape Object

Other resources

Shape Object Members


Tags Methods (PowerPoint)

 Copy code hover
[image]

Tags Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Add | Adds a tag to the Tags collection of an object.
Delete | Deletes a tag.
Item | Returns a single tag from the specified Tags collection.
Name | Returns the name of the specified tag as a String.
Value | Returns the value of the specified tag as a String.


PrintOptions.Collate Property (PowerPoint)

 Copy code hover
[image]

PrintOptions.Collate Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether a complete copy of the specified presentation is printed before the first page of the next copy is printed. Read/write.

Syntax

expression .Collate

expression A variable that represents a PrintOptions object.

Return Value

MsoTriState

Remarks

Specifying a value for the Collate argument of the PrintOut method sets the value of this property.

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

Constant | Description
msoFalse | A copy of the specified presentation is not printed before the first page of the next copy is printed.
msoTrue | The default. A complete copy of the specified presentation is printed before the first page of the next copy is printed.

Example

This example prints three collated copies of the active presentation.

VBA Copy code Copy code
With ActivePresentation.PrintOptions

    .NumberOfCopies = 3

    .Collate = msoTrue

    .Parent.PrintOut

End With

See also

Concepts

PrintOptions Object

Other resources

PrintOptions Object Members


ProtectedViewWindow.Caption Property (PowerPoint)

 Copy code hover
[image]

ProtectedViewWindow.Caption Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the text that appears in the title bar of the specified window. Read-only.

Syntax

expression .Caption

expression A variable that represents a ProtectedViewWindow object.

See also

Concepts

ProtectedViewWindow Object

Other resources

ProtectedViewWindow Object Members


ShapeRange.MediaType Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.MediaType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the OLE media type. Read-only.

Syntax

expression .MediaType

expression A variable that represents a ShapeRange object.

Return Value

PpMediaType

Remarks

The value of the MediaType property can be one of these PpMediaType constants.

ppMediaTypeMixed

ppMediaTypeMovie

ppMediaTypeOther

ppMediaTypeSound

Example

This example sets all native sound objects on slide one in the active presentation to loop until manually stopped during a slide show.

VBA Copy code Copy code
For Each so In ActivePresentation.Slides(1).Shapes

    If so.Type = msoMedia Then

        If so.MediaType = ppMediaTypeSound Then

            so.AnimationSettings.PlaySettings.LoopUntilStopped = True

        End If

    End If

Next

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


PpAlertLevel Enumeration (PowerPoint)

 Copy code hover
[image]

PpAlertLevel Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies whether Microsoft PowerPoint displays alerts while running a macro.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppAlertsAll | 2 | All alerts displayed.
ppAlertsNone | 1 | No alerts displayed.


Timing.SmoothEnd Property (PowerPoint)

 Copy code hover
[image]

Timing.SmoothEnd Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether an animation should decelerate as it ends. Read/write.

Syntax

expression .SmoothEnd

expression A variable that represents a Timing object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The default. An animation does not decelerate when it ends.
msoTrue | An animation decelerates when it ends.

Example

The following example adds a shape to a slide, animates the shape, and instructs the shape to decelerate when it ends.

VBA Copy code Copy code
Sub AddShapeSetTiming()

    Dim effDiamond As Effect

    Dim shpRectangle As Shape

    'Adds shape and sets animation effect

    Set shpRectangle = ActivePresentation.Slides(1).Shapes _

        .AddShape(Type:=msoShapeRectangle, Left:=100, _

        Top:=100, Width:=50, Height:=50)

    Set effDiamond = ActivePresentation.Slides(1).TimeLine.MainSequence _

        .AddEffect(Shape:=shpRectangle, effectId:=msoAnimEffectPathDiamond)

    'Sets duration of effect and slows animation at end

    With effDiamond.Timing

        .Duration = 5

        .SmoothEnd = msoTrue

    End With

End Sub

See also

Concepts

Timing Object

Other resources

Timing Object Members


Timing.TriggerDelayTime Property (PowerPoint)

 Copy code hover
[image]

Timing.TriggerDelayTime Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns the delay, in seconds, from when an animation trigger is enabled. Read/write.

Syntax

expression .TriggerDelayTime

expression A variable that represents a Timing object.

Return Value

Single

Example

The following example adds a shape to a slide, adds an animation to the shape, and instructs the shape to begin the animation three seconds after it is clicked.

VBA Copy code Copy code
Sub AddShapeSetTiming()

    Dim effDiamond As Effect

    Dim shpRectangle As Shape

    Set shpRectangle = ActivePresentation.Slides(1).Shapes _

        .AddShape(Type:=msoShapeRectangle, Left:=100, _

        Top:=100, Width:=50, Height:=50)

    Set effDiamond = ActivePresentation.Slides(1).TimeLine.MainSequence _

        .AddEffect(Shape:=shpRectangle, effectId:=msoAnimEffectPathDiamond)

    With effDiamond.Timing

        .Duration = 5

        .TriggerShape = shpRectangle

        .TriggerType = msoAnimTriggerOnShapeClick

        .TriggerDelayTime = 3

    End With

End Sub

See also

Concepts

Timing Object

Other resources

Timing Object Members


Presentation.LockServerFile Method (PowerPoint)

 Copy code hover
[image]

Presentation.LockServerFile Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Locks the presentation on the Microsoft Office SharePoint server to prevent its modification.

Syntax

expression .LockServerFile

expression An expression that returns a Presentation object.

Remarks

This method applies only to presentations stored on a server running Microsoft Office SharePoint Server 2007.

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


CategoryCollection Members (PowerPoint)

 Copy code hover
[image]

CategoryCollection Members (PowerPoint)
Send feedback

Represents the collection of visible chart categories in the presentation.

Methods

Name | Description
Item | Returns an individual chart category.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Count | Returns a Long that represents the number of categories in the collection. Read-only.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
Parent | Returns the parent for the specified object. Read-only Object.


Series.Formula Property (PowerPoint)

 Copy code hover
[image]

Series.Formula Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the object's formula in A1-style notation and in the language of the macro. Read/write String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Formula

expression A variable that represents a Series object.

Remarks

This property is not available for OLAP data sources.

If the object contains a constant, this property returns the constant. If the object is empty, this property returns an empty string. If the object contains a formula, this property returns the formula as a string in the same format that would be displayed in the formula bar (including the equal sign).

If the range is a one- or two-dimensional range, you can set the formula to a Visual Basic array of the same dimensions. Similarly, you can put the formula into a Visual Basic array.

See also

Concepts

Series Object

Other resources

Series Object Members


TextEffectFormat.Application Property (PowerPoint)

 Copy code hover
[image]

TextEffectFormat.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a TextEffectFormat object.

Return Value

Object

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

TextEffectFormat Object

Other resources

TextEffectFormat Object Members


PlotArea.Left Property (PowerPoint)

 Copy code hover
[image]

PlotArea.Left Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the distance, in points, from the left edge of the object to the left edge of the chart area. Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Left

expression A variable that represents a PlotArea object.

See also

Concepts

PlotArea Object

Other resources

PlotArea Object Members


SlideShowView.AcceleratorsEnabled Property (PowerPoint)

 Copy code hover
[image]

SlideShowView.AcceleratorsEnabled Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether shortcut keys are enabled during a slide show. Read/write.

Syntax

expression .AcceleratorsEnabled

expression A variable that represents an SlideShowView object.

Return Value

MsoTriState

Remarks

If shortcut keys are disabled during a slide show, you can neither use the keyboard to navigate in the slide show nor press F1 to get a list of shortcut keys. You can still use the ESC key to exit the slide show.

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

Constant | Description
msoFalse | Shortcut keys are disabled during a slide show.
msoTrue | The default. Shortcut keys are enabled during a slide show.

Example

This example runs a slide show of the active presentation with shortcut keys disabled.

VBA Copy code Copy code
ActivePresentation.SlideShowSettings.Run _

    .View.AcceleratorsEnabled = False

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


Timing.Speed Property (PowerPoint)

 Copy code hover
[image]

Timing.Speed Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the speed, in seconds, of the specified animation. Read/write.

Syntax

expression .Speed

expression A variable that represents a Timing object.

Return Value

Single

Example

This example sets the animation for the main sequence to reverse and sets the speed to one second.

VBA Copy code Copy code
Sub AnimPoints()

    Dim tmlAnim As TimeLine

    Dim spdAnim As Timing

    Set tmlAnim = ActivePresentation.Slides(1).TimeLine

    Set spdAnim = tlnAnim.MainSequence(1).Timing

    With spdAnim

        .AutoReverse = msoTrue

        .Speed = 1

    End With

End Sub

See also

Concepts

Timing Object

Other resources

Timing Object Members


ChartGroups.Parent Property (PowerPoint)

 Copy code hover
[image]

ChartGroups.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents a ChartGroups object.

See also

Concepts

ChartGroups Object

Other resources

ChartGroups Object Members


DisplayUnitLabel Object (PowerPoint)

 Copy code hover
[image]

DisplayUnitLabel Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a unit label on an axis in the specified chart.

Version Information

Version Added: PowerPoint 2007

Remarks

Unit labels are useful for charting large values (for example, in the millions or billions). You can make the chart more readable by using a single unit label instead of large numbers at each tick mark.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

Use the DisplayUnitLabel property to return the DisplayUnitLabel object. The following example sets the display label caption to "Millions" on the value axis of the first chart in the active document, and then the example turns off automatic font scaling.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.Axes(xlValue)

            .DisplayUnit = xlMillions

            .HasDisplayUnitLabel = True

            With .DisplayUnitLabel

                .Caption = "Millions"

                .AutoScaleFont = False

            End With

        End With

    End If

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

DisplayUnitLabel Object Members


DataLabels.Select Method (PowerPoint)

 Copy code hover
[image]

DataLabels.Select Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Selects the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Select

expression A variable that represents a DataLabels object.

See also

Concepts

DataLabels Object

Other resources

DataLabels Object Members


ChartTitle.Orientation Property (PowerPoint)

 Copy code hover
[image]

ChartTitle.Orientation Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the text orientation. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Orientation

expression A variable that represents a ChartTitle object.

Remarks

The value of this property can be an integer from -90 through 90 degrees or one of the XlOrientation constants.

See also

Concepts

ChartTitle Object

Other resources

ChartTitle Object Members


ShapeRange Methods (PowerPoint)

 Copy code hover
[image]

ShapeRange Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Align | Aligns the shapes in the specified range of shapes.
Apply | Applies to the specified shape range formatting that's been copied by using the PickUp method.
ApplyAnimation | Applies animation to a ShapeRange object.
ConvertTextToSmartArt | Returns the number of objects in the specified collection. Read-only.
Copy | Copies the specified object to the Clipboard.
Cut | Deletes the specified object and places it on the Clipboard.
Delete | Deletes the specified ShapeRange object.
Distribute | Evenly distributes the shapes in the specified range of shapes. You can specify whether you want to distribute the shapes horizontally or vertically and whether you want to distribute them over the entire slide or just over the space they originally occupy.
Duplicate | Creates a duplicate of the specified ShapeRange object, adds the range of shapes to the Shapes collection, and then returns the new ShapeRange object. The duplicated objects are placed at the end of the Shapes collection.
Flip | Flips the specified shape range around its horizontal or vertical axis.
Group | Groups the shapes in the specified range. Returns the grouped shapes as a single Shape object.
IncrementLeft | Moves the specified shape range horizontally by the specified number of points.
IncrementRotation | Changes the rotation of the specified shape range around the z-axis by the specified number of degrees. Use the Rotation property to set the absolute rotation of the shape range.
IncrementTop | Moves the specified shape range vertically by the specified number of points.
Item | Returns a single Shape object from the specified ShapeRange collection.
MergeShapes | Combines all of the shapes in the range to create a single new shape.
PickUp | Copies the formatting of the specified shape. Use the Apply method to apply the copied formatting to another shape.
PickupAnimation | Picks up all animation from the ShapeRange object.
Regroup | Regroups the group that the specified shape range belonged to previously. Returns the regrouped shapes as a single Shape object.
RerouteConnections | Reroutes connectors so that they take the shortest possible path between the shapes they connect. To do this, the RerouteConnections method may detach the ends of a connector and reattach them to different connecting sites on the connected shapes.
ScaleHeight | Scales the height of the shapes in the range by a specified factor.
ScaleWidth | Scales the width of the shapes in the range by a specified factor.
Select | Selects the specified object.
SetShapesDefaultProperties | Applies the formatting for the specified shape to the default shape. Shapes created after this method has been used will have this formatting applied to them by default.
Ungroup | Ungroups any grouped shapes in the specified shape or range of shapes. Disassembles pictures and OLE objects within the specified shape or range of shapes. Returns the ungrouped shapes as a single ShapeRange object.
UpgradeMedia | Upgrades media within the specified ShapeRange object.
ZOrder | Moves the specified shape range in front of or behind other shapes in the collection (that is, changes the shape range's position in the z-order).


SlideRange.sectionIndex Property (PowerPoint)

 Copy code hover
[image]

SlideRange.sectionIndex Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the index of the selected section in the SlideRange. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .sectionIndex

expression A variable that represents a SlideRange object.

Return Value

Single

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


MediaFormat.AudioSamplingRate Property (PowerPoint)

 Copy code hover
[image]

MediaFormat.AudioSamplingRate Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the audio sampling rate per second for the media. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .AudioSamplingRate

expression An expression that returns a MediaFormat object.

Return Value

Long

See also

Concepts

MediaFormat Object

Other resources

MediaFormat Object Members


CustomerData.Parent Property (PowerPoint)

 Copy code hover
[image]

CustomerData.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object of the specified CustomerData object. Read-only.

Syntax

expression .Parent

expression An expression that returns a CustomerData object.

Return Value

Object

See also

Concepts

CustomerData Collection

Other resources

CustomerData Object Members


PrintOptions.FrameSlides Property (PowerPoint)

 Copy code hover
[image]

PrintOptions.FrameSlides Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether a thin frame is placed around the border of the printed slides. Read/write.

Syntax

expression .FrameSlides

expression A variable that represents a PrintOptions object.

Return Value

MsoTriState

Remarks

The FrameSlides property applies to printed slides, handouts, and notes pages.

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

Constant | Description
msoFalse | A thin frame is not placed around the border of the printed slides.
msoTrue | A thin frame is placed around the border of the printed slides.

Example

This example prints the active presentation with a frame around each slide.

VBA Copy code Copy code
With ActivePresentation

    .PrintOptions.FrameSlides = msoTrue

    .PrintOut

End With

See also

Concepts

PrintOptions Object

Other resources

PrintOptions Object Members


TextRange.Length Property (PowerPoint)

 Copy code hover
[image]

TextRange.Length Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the length of the specified text range, in characters. Read-only.

Syntax

expression .Length

expression A variable that represents a TextRange object.

Return Value

Long

Example

This example sets the title font size to 48 points if the title of slide two contains more than five characters, or it sets the font size to 72 points if the title has five or fewer characters.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(2)

With myDocument.Shapes(1).TextFrame.TextRange

    If .Length > 5 Then

        .Font.Size = 48

    Else

        .Font.Size = 72

    End If

End With

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


Legend.Format Property (PowerPoint)

 Copy code hover
[image]

Legend.Format Property (PowerPoint)
Send feedback

Published: July 16, 2012

Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Format

expression A variable that represents a Legend object.


ThemeVariants Properties (PowerPoint)

 Copy code hover
[image]

ThemeVariants Properties (PowerPoint)
Send feedback

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent for the specified object. Read-only Object.


Axis.HasMinorGridlines Property (PowerPoint)

 Copy code hover
[image]

Axis.HasMinorGridlines Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if the axis has minor gridlines. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .HasMinorGridlines

expression A variable that represents an Axis object.

Remarks

Only axes in the primary axis group can have gridlines.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the color of the minor gridlines for the value axis of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.Axes(xlValue)

            If .HasMinorGridlines Then

                ' Set the color to green.

                .MinorGridlines.Border.ColorIndex = 4

            End If

        End With

    End If

End With

See also

Concepts

Axis Object

Other resources

Axis Object Members


ChartFormat.Shadow Property (PowerPoint)

 Copy code hover
[image]

ChartFormat.Shadow Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns shadow formatting properties for the chart element. Read-only ShadowFormat.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Shadow

expression A variable that represents a ChartFormat object.

See also

Concepts

ChartFormat Object

Other resources

ChartFormat Object Members


TextEffectFormat.Text Property (PowerPoint)

 Copy code hover
[image]

TextEffectFormat.Text Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a String that represents the text contained in the specified object. Read/write.

Syntax

expression .Text

expression A variable that represents a TextEffectFormat object.

Return Value

String

See also

Concepts

TextEffectFormat Object

Other resources

TextEffectFormat Object Members


LineFormat.BeginArrowheadStyle Property (PowerPoint)

 Copy code hover
[image]

LineFormat.BeginArrowheadStyle Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the style of the arrowhead at the beginning of the specified line. Read/write.

Syntax

expression .BeginArrowheadStyle

expression A variable that represents a LineFormat object.

Return Value

MsoArrowheadStyle

Remarks

The value of the BeginArrowheadStyle property can be one of these MsoArrowheadStyle constants

msoArrowheadDiamond

msoArrowheadNone

msoArrowheadOpen

msoArrowheadOval

msoArrowheadStealth

msoArrowheadStyleMixed

msoArrowheadTriangle

Example

This example adds a line to myDocument. There's a short, narrow oval on the line's starting point and a long, wide triangle on its endpoint.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddLine(100, 100, 200, 300).Line

    .BeginArrowheadLength = msoArrowheadShort

    .BeginArrowheadStyle = msoArrowheadOval

    .BeginArrowheadWidth = msoArrowheadNarrow

    .EndArrowheadLength = msoArrowheadLong

    .EndArrowheadStyle = msoArrowheadTriangle

    .EndArrowheadWidth = msoArrowheadWide

End With

See also

Concepts

LineFormat Object

Other resources

LineFormat Object Members


Axis.HasTitle Property (PowerPoint)

 Copy code hover
[image]

Axis.HasTitle Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if the axis or chart has a visible title. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .HasTitle

expression A variable that represents an Axis object.

Remarks

An axis title is represented by an AxisTitle object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example adds an axis label to the category axis for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.Axis(xlCategory)

            .HasTitle = True

            .AxisTitle.Text = "July Sales"

        End With

    End If

End With

See also

Concepts

Axis Object

Other resources

Axis Object Members


PrintRanges.Item Method (PowerPoint)

 Copy code hover
[image]

PrintRanges.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single PrintRange object from the specified PrintRanges collection.

Syntax

expression .Item(Index)

expression A variable that represents a PrintRanges object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Long | The index number of the single PrintRange object in the collection to be returned.

Return Value

PrintRange

See also

Concepts

PrintRanges Object

Other resources

PrintRanges Object Members


NamedSlideShows.Application Property (PowerPoint)

 Copy code hover
[image]

NamedSlideShows.Application Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a NamedSlideShows object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

NamedSlideShows Object

Other resources

NamedSlideShows Object Members


Point.Paste Method (PowerPoint)

 Copy code hover
[image]

Point.Paste Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Pastes a picture from the Clipboard as the marker on the selected point.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Paste

expression A variable that represents a Point object.

Remarks

You can use this method on column, bar, line, or radar charts, and it sets the MarkerStyle property to xlMarkerStylePicture.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example pastes a picture from the Clipboard into point one in series one for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).Points(1).Paste

    End If

End With

See also

Concepts

Point Object

Other resources

Point Object Members


Guide.Color Property (PowerPoint)

 Copy code hover
[image]

Guide.Color Property (PowerPoint)
Send feedback

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

Version information

Version Added: PowerPoint 2013

Syntax

expression .Color

expression A variable that represents a Guide object.

Property value

COLORFORMAT


Column Object (PowerPoint)

 Copy code hover
[image]

Column Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a table column. The Column object is a member of the Columns collection. The Columns collection includes all the columns in a table.

Example

Use Columns(index) to return a single Column object. Index represents the position of the column in the Columns collection (usually counting from left to right; although the TableDirection property can reverse this). This example selects the first column of the table in shape five on the second slide.

Copy code Copy code
ActivePresentation.Slides(2).Shapes(5).Table.Columns(1).Select

Use the Cell object to indirectly reference the Column object. This example deletes the text in the first cell (row 1, column 1), inserts new text, and then sets the width of the entire column to 110 points.

Copy code Copy code
With ActivePresentation.Slides(2).Shapes(5).Table.Cell(1, 1)

    .Shape.TextFrame.TextRange.Delete

    .Shape.TextFrame.TextRange.Text = "Rooster"

    .Parent.Columns(1).Width = 110

End With

Use the Add method to add a column to a table. This example creates a column in an existing table and sets the column width to 72 points (one inch).

Copy code Copy code
With ActivePresentation.Slides(2).Shapes(5).Table

    .Columns.Add.Width = 72

End With

Use the Cells property to modify the individual cells in a Column object. This example selects the first column in the table and applies a dashed line style to the bottom border.

Copy code Copy code
ActiveWindow.Selection.ShapeRange.Table.Columns(1) _

    .Cells.Borders(ppBorderBottom).DashStyle = msoLineDash

See also

Concepts

PowerPoint Object Model Reference

Other resources

Column Object Members


Application.Options Property (PowerPoint)

 Copy code hover
[image]

Application.Options Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Options object that represents application options in Microsoft PowerPoint.

Syntax

expression .Options

expression A variable that represents an Application object.

Return Value

Options

Example

Use the Options property to return the Options object. The following example sets three application options for PowerPoint.

VBA Copy code Copy code
Sub TogglePasteOptionsButton()

    With Application.Options

        If .DisplayPasteOptions = False Then

            .DisplayPasteOptions = True

        End If

    End With

End Sub

See also

Concepts

Application Object

Other resources

Application Object Members


Rows Properties (PowerPoint)

 Copy code hover
[image]

Rows Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


PlaySettings.HideWhileNotPlaying Property (PowerPoint)

 Copy code hover
[image]

PlaySettings.HideWhileNotPlaying Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the specified media clip is hidden during a slide show except when it is playing. Read/write.

Syntax

expression .HideWhileNotPlaying

expression A variable that represents a PlaySettings object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified media clip is not hidden during a slide show except when it is playing.
msoTrue | The specified media clip is hidden during a slide show except when it is playing.

Example

This example inserts a movie named "Clock.avi" onto slide one in the active presentation, sets it to play automatically after the slide transition, and specifies that the movie object be hidden during a slide show except when it is playing.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes _

        .AddOLEObject(Left:=10, Top:=10, _

        Width:=250, Height:=250, _

        FileName:="c:\winnt\clock.avi")

    With .AnimationSettings.PlaySettings

        .PlayOnEntry = True

        .HideWhileNotPlaying = msoTrue

    End With

End With

See also

Concepts

PlaySettings Object

Other resources

PlaySettings Object Members


SlideShowView.Slide Property (PowerPoint)

 Copy code hover
[image]

SlideShowView.Slide Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Slide object that represents the slide that's currently displayed in the specified slide show window view. Read-only.

Syntax

expression .Slide

expression A variable that represents a SlideShowView object.

Return Value

Slide

Remarks

If the currently displayed slide is from an embedded presentation, you can use the Parent property of the Slide object returned by the Slide property to return the embedded presentation that contains the slide. (The Presentation property of the SlideShowWindow object or DocumentWindow object returns the presentation from which the window was created, not the embedded presentation.)

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


TextEffectFormat.FontName Property (PowerPoint)

 Copy code hover
[image]

TextEffectFormat.FontName Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the name of the font in the specified WordArt. Read/write.

Syntax

expression .FontName

expression A variable that represents a TextEffectFormat object.

Return Value

String

Example

This example sets the font name to "Courier New" for shape three on myDocument if the shape is WordArt.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(3)

    If .Type = msoTextEffect Then

        .TextEffect.FontName = "Courier New"

    End If

End With

See also

Concepts

TextEffectFormat Object

Other resources

TextEffectFormat Object Members


Player.GoToNextBookmark Method (PowerPoint)

 Copy code hover
[image]

Player.GoToNextBookmark Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Goes to the next bookmark.

Syntax

expression .GoToNextBookmark

expression A variable that represents a Player object.

See also

Concepts

Player Object

Other resources

Player Object Members


Trendline.Intercept Property (PowerPoint)

 Copy code hover
[image]

Trendline.Intercept Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the point where the trendline crosses the value axis. Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Intercept

expression A variable that represents a Trendline object.

Remarks

Setting this property sets the InterceptIsAuto property to False.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets trendline one for the first chart in the active document to cross the value axis at 5. You should run the example on a 2-D column chart that contains a single series that has a trendline.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).Trendlines(1).Intercept = 5

    End If

End With

See also

Concepts

Trendline Object

Other resources

Trendline Object Members


Application.AddIns Property (PowerPoint)

 Copy code hover
[image]

Application.AddIns Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the program-specific AddIns collection that represents all the add-ins listed in the Add-Ins dialog box (click the Office button, click PowerPoint Options, click Add-Ins, click PowerPoint Add-Ins on the Manage list). Read-only.

Syntax

expression .AddIns

expression A variable that represents an Application object.

Remarks

Microsoft Office PowerPoint-specific add-ins are identified by a .ppa or .ppam file name extension. Component Object Model (COM) add-ins can be used universally across Microsoft programming products and have a .dll or .exe file name extension.

For information about returning a single member of a collection, see Returning an Object from a Collection.

Example

This example adds the add-in named "Myaddin.ppa" to the list in the Add-Ins dialog box and loads the add-in automatically.

VBA Copy code Copy code
Set myAddIn = Application.AddIns.Add(FileName:="c:\myaddin.ppa")

myAddIn.Loaded = True

MsgBox myAddIn.Name & " has been added to the list"

See also

Concepts

Application Object

Other resources

Application Object Members


ProtectedViewWindows.Count Property (PowerPoint)

 Copy code hover
[image]

ProtectedViewWindows.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a ProtectedViewWindows object.

See also

Concepts

ProtectedViewWindows Object

Other resources

ProtectedViewWindows Object Members


SectionProperties.Delete Method (PowerPoint)

 Copy code hover
[image]

SectionProperties.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the section break that sets off the specified section, and optionally deletes all the slides in the section.

Syntax

expression .Delete(sectionIndex, deleteSlides)

expression A variable that represents a SectionProperties object.

Parameters

Name | Required/Optional | Data Type | Description
sectionIndex | Required | Integer | The index of the section to delete.
deleteSlides | Required | Boolean | Whether to delete all the slides in the section. True, to delete all the slides within the section; False not to delete them.

Remarks

If the presentation contains more than one section, you cannot delete the first section without deleting all of the slides in that section.

See also

Concepts

SectionProperties Object

Other resources

SectionProperties Object Members


PlaySettings Object (PowerPoint)

 Copy code hover
[image]

PlaySettings Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Contains information about how the specified media clip will be played during a slide show.

Example

Use the PlaySettings property to return the PlaySettings object. The following example inserts a movie named "Clock.avi" into slide one in the active presentation. It then sets it to be played automatically after the previous animation or slide transition, specifies that the slide show continue while the movie plays, and specifies that the movie object be hidden during a slide show except when it is playing.

VBA Copy code Copy code
Set clockMovie = ActivePresentation.Slides(1).Shapes _

    .AddMediaObject(FileName:="C:\WINNT\clock.avi", _

    Left:=20, Top:=20)

With clockMovie.AnimationSettings.PlaySettings

    .PlayOnEntry = True

    .PauseAnimation = False

    .HideWhileNotPlaying = True

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

PlaySettings Object Members


Chart.ChartType Property (PowerPoint)

 Copy code hover
[image]

Chart.ChartType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the chart type. Read/write XlChartType.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ChartType

expression A variable that represents a Chart object.

Remarks

Some chart types are not available for PivotChart reports.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the bubble size in chart group one to 200% of the default size if the chart is a 2-D bubble chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1).Chart
    If .ChartType = xlBubble Then
        .ChartGroups(1).BubbleScale = 200
    End If
End With

See also

Concepts

Chart Object

Other resources

Chart Object Members


ShapeRange.SoftEdge Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.SoftEdge Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the soft edge format for the specified range of shapes. Read-only.

Syntax

expression .SoftEdge

expression A variable that represents a ShapeRange object.

Return Value

MsoSoftEdgeType

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


RGBColor Members (PowerPoint)

 Copy code hover
[image]

RGBColor Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a single color in a color scheme.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Parent | Returns the parent object for the specified object.
RGB | Returns or sets the red-green-blue (RGB) value of a specified color-scheme color or extra color when used with a PpColorSchemeIndex constant. Read/write.


ShapeNode Properties (PowerPoint)

 Copy code hover
[image]

ShapeNode Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
EditingType | If the specified node is a vertex, this property returns a value that indicates how changes made to the node affect the two segments connected to the node. If the node is a control point for a curved segment, this property returns the editing type of the adjacent vertex. Read-only.
Parent | Returns the parent object for the specified object.
Points | Returns a Variant that represents the position of the specified node as a coordinate pair. Read-only.
SegmentType | Returns a value that indicates whether the segment associated with the specified node is straight or curved. Read-only.


ShadowFormat.Transparency Property (PowerPoint)

 Copy code hover
[image]

ShadowFormat.Transparency Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the degree of transparency of the specified fill, shadow, or line as a value between 0.0 (opaque) and 1.0 (clear). Read/write.

Syntax

expression .Transparency

expression A variable that represents a ShadowFormat object.

Return Value

Single

Remarks

The value of this property affects the appearance of solid-colored fills and lines only; it has no effect on the appearance of patterned lines or patterned, gradient, picture, or textured fills.

Example

This example sets the shadow for shape three on myDocument to semitransparent red. If the shape doesn't already have a shadow, this example adds one to it.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(3).Shadow

    .Visible = True

    .ForeColor.RGB = RGB(255, 0, 0)

    .Transparency = 0.5

End With

See also

Concepts

ShadowFormat Object

Other resources

ShadowFormat Object Members


ShapeRange.BackgroundStyle Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.BackgroundStyle Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns the background style of the specified object. Read/write.

Syntax

expression .BackgroundStyle

expression An expression that returns a ShapeRange object.

Remarks

The value of the BackgroundStyle property can be one of the MsoBackgroundStyleIndex constants.

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


Presentation.Designs Property (PowerPoint)

 Copy code hover
[image]

Presentation.Designs Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Designs object that represents a collection of designs.

Syntax

expression .Designs

expression A variable that represents a Presentation object.

Return Value

Designs

Example

The following example displays a message for each design in the active presentation.

VBA Copy code Copy code
Sub AddDesignMaster()

    Dim desName As Design

    With ActivePresentation

        For Each desName In .Designs

            MsgBox "The design name is " & .Designs.Item(desName.Index).Name

        Next

    End With

End Sub

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


UpBars.Delete Method (PowerPoint)

 Copy code hover
[image]

UpBars.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Delete

expression A variable that represents an UpBars object.

See also

Concepts

UpBars Object

Other resources

UpBars Object Members


Point.ApplyPictToEnd Property (PowerPoint)

 Copy code hover
[image]

Point.ApplyPictToEnd Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if a picture is applied to the end of the point or all points in the series. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ApplyPictToEnd

expression A variable that represents a Point object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example applies pictures to the end of all points in the first series of the first chart in the active document. The series must already have pictures applied to it (setting this property changes the picture orientation).

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).ApplyPictToEnd = True

    End If

End With

See also

Concepts

Point Object

Other resources

Point Object Members


ParagraphFormat.Parent Property (PowerPoint)

 Copy code hover
[image]

ParagraphFormat.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a ParagraphFormat object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

ParagraphFormat Object

Other resources

ParagraphFormat Object Members


SeriesLines.Application Property (PowerPoint)

 Copy code hover
[image]

SeriesLines.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents a SeriesLines object.

See also

Concepts

SeriesLines Object

Other resources

SeriesLines Object Members


ColorFormat.RGB Property (PowerPoint)

 Copy code hover
[image]

ColorFormat.RGB Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the red-green-blue (RGB) value of the specified color. Read/write.

Syntax

expression .RGB

expression A variable that represents a ColorFormat object.

Return Value

MsoRGBType

Example

This example sets the background color for color scheme three in the active presentation and then applies the color scheme to all slides in the presentation that are based on the slide master.

VBA Copy code Copy code
With ActivePresentation

    Set cs1 = .ColorSchemes(3)

    cs1.Colors(ppBackground).RGB = RGB(128, 128, 0)

    .SlideMaster.ColorScheme = cs1

End With

See also

Concepts

ColorFormat Object

Other resources

ColorFormat Object Members


FillFormat Object (PowerPoint)

 Copy code hover
[image]

FillFormat Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents fill formatting for a shape. A shape can have a solid, gradient, texture, pattern, picture, or semi-transparent fill.

Remarks

Many of the properties of the FillFormat object are read-only. To set one of these properties, you have to apply the corresponding method.

Example

Use the Fill property to return a FillFormat object. The following example adds a rectangle to myDocument and then sets the gradient and color for the rectangle's fill.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes _

        .AddShape(msoShapeRectangle, 90, 90, 90, 80).Fill

    .ForeColor.RGB = RGB(0, 128, 128)

    .OneColorGradient msoGradientHorizontal, 1, 1

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

FillFormat Object Members


Shapes.AddSmartArt Method (PowerPoint)

 Copy code hover
[image]

Shapes.AddSmartArt Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Adds a SmartArt diagram to the Shapes object.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .AddSmartArt(Layout, Left, Top, Width, Height)

expression A variable that represents a Shapes object.

Parameters

Name | Required/Optional | Data Type | Description
Layout | Required | [SMARTARTLAYOUT] | The SmartArt diagram to add.
Left | Optional | Single | The distance, in points, from the left edge of the slide to the left edge of the SmartArt diagram.
Top | Optional | Single | The distance, in points, from the top edge of the slide to the top edge of the SmartArt diagram.
Width | Optional | Single | The width of the SmartArt diagram.
Height | Optional | Single | The height of the SmartArt diagram.

Return Value

Shape

See also

Concepts

Shapes Object

Other resources

Shapes Object Members


SlideRange.Parent Property (PowerPoint)

 Copy code hover
[image]

SlideRange.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a SlideRange object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


Presentation.AddToFavorites Method (PowerPoint)

 Copy code hover
[image]

Presentation.AddToFavorites Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Adds a shortcut that represents the current selection in the specified presentation to the Windows Favorites folder.

Syntax

expression .AddToFavorites

expression A variable that represents a Presentation object.

Remarks

The shortcut name is the display name of the document, if that's available; otherwise, the shortcut name is as calculated in HLINK.DLL.

Example

This example adds a hyperlink to the active presentation to the Favorites folder in the Windows program folder.

VBA Copy code Copy code
Application.ActivePresentation.AddToFavorites

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


BulletFormat Methods (PowerPoint)

 Copy code hover
[image]

BulletFormat Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Picture | Sets the graphics file to be used for bullets in a bulleted list when the Type property of the BulletFormat object is set to ppBulletPicture.


ColorSchemes.Item Method (PowerPoint)

 Copy code hover
[image]

ColorSchemes.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single ColorScheme object from the specified ColorSchemes collection.

Syntax

expression .Item(Index)

expression A variable that represents a ColorSchemes object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Long | The index number of the single ColorScheme object in the collection to be returned.

Return Value

ColorScheme

See also

Concepts

ColorSchemes Object

Other resources

ColorSchemes Object Members


FillFormat.TextureOffsetX Property (PowerPoint)

 Copy code hover
[image]

FillFormat.TextureOffsetX Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets the horizontal offset of the texture from the origin in points. Read/write.

Syntax

expression .TextureOffsetX

expression An expression that returns a FillFormat object.

Return Value

Long

Remarks

The position of the origin is determined by the setting of the TextureAlignment property.

The setting of the TextureOffsetX property corresponds to the setting of the Offset X box under Tiling Options on the Fill pane of the Format Picture dialog box in the Microsoft PowerPoint user interface (under Drawing Tools, on the Format Tab, in the Shape Styles group, click Format Shape.)

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


PrintRanges Object (PowerPoint)

 Copy code hover
[image]

PrintRanges Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

A collection of all the PrintRange objects in the specified presentation. Each PrintRange object represents a range of consecutive slides or pages to be printed.

Example

Use the Ranges property to return the PrintRanges collection. The following example clears all previously defined print ranges from the collection for the active presentation.

VBA Copy code Copy code
ActivePresentation.PrintOptions.Ranges.ClearAll

Use the Add method to create a PrintRange object and add it to the PrintRanges collection. The following example defines three print ranges that represent slide 1, slides 3 through 5, and slides 8 and 9 in the active presentation and then prints the slides in these ranges.

VBA Copy code Copy code
With ActivePresentation.PrintOptions

    .RangeType = ppPrintSlideRange

    With .Ranges

        .ClearAll

        .Add 1, 1

        .Add 3, 5

        .Add 8, 9

    End With

End With

ActivePresentation.PrintOut

Use Ranges(index), where index is the print range index number, to return a single PrintRange object. The following example displays a message that indicates the starting and ending slide numbers for print range one in the active presentation.

VBA Copy code Copy code
With ActivePresentation.PrintOptions.Ranges

    If .Count > 0 Then

        With .Item(1)

            MsgBox "Print range 1 starts on slide " & .Start & _

                " and ends on slide " & .End

        End With

    End If

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

PrintRanges Object Members


Presentations.Parent Property (PowerPoint)

 Copy code hover
[image]

Presentations.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a Presentations object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

Presentations Object

Other resources

Presentations Object Members


Presentation.GridDistance Property (PowerPoint)

 Copy code hover
[image]

Presentation.GridDistance Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns a Single that represents the distance between gridlines. Read/write.

Syntax

expression .GridDistance

expression A variable that represents a Presentation object.

Return Value

Single

Example

This example displays the gridlines, and then specifies the distance between gridlines and enables the snap to grid setting.

VBA Copy code Copy code
Sub SetGridLines()

    Application.DisplayGridLines = msoTrue

    With ActivePresentation

        .GridDistance = 18

        .SnapToGrid = msoTrue

    End With

End Sub

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


LineFormat.Pattern Property (PowerPoint)

 Copy code hover
[image]

LineFormat.Pattern Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Sets or returns a value that represents the pattern applied to the specified line. Read/write.

Syntax

expression .Pattern

expression A variable that represents a LineFormat object.

Return Value

MsoPatternType

Example

This example adds a patterned line to myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)
With myDocument.Shapes.AddLine(10, 100, 250, 0).Line
    .Weight = 6
    .ForeColor.RGB = RGB(0, 0, 255)
    .BackColor.RGB = RGB(128, 0, 0)
    .Pattern = msoPatternDarkDownwardDiagonal
End With

See also

Concepts

LineFormat Object

Other resources

LineFormat Object Members


ActionSetting.Run Property (PowerPoint)

 Copy code hover
[image]

ActionSetting.Run Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the name of the presentation or macro to be run when the specified shape is clicked or the mouse pointer passes over the shape during a slide show. Read/write.

Syntax

expression .Run

expression A variable that represents an ActionSetting object.

Return Value

String

Remarks

For this property to affect the slide show action, you must set the Action property value to ppActionRunMacro or ppActionRunProgram .

If the value of the Action property is ppActionRunMacro, the specified string value should be the name of a global macro that's currently loaded. If the value of the Action property is ppActionRunProgram, the specified string value should be the full path and file name of a program.

You can set the Run property to a macro that takes no arguments or a macro that takes a single Shape or Object argument. The shape that was clicked during the slide show will be passed as this argument.

Example

This example specifies that the CalculateTotal macro be run whenever the mouse pointer passes over the shape during a slide show.

VBA Copy code Copy code
With ActivePresentation.Slides(1) _

    .Shapes(3).ActionSettings(ppMouseOver)

        .Action = ppActionRunMacro

        .Run = "CalculateTotal"

        .AnimateAction = True

End With

See also

Concepts

ActionSetting Object

Other resources

ActionSetting Object Members


ParagraphFormat Properties (PowerPoint)

 Copy code hover
[image]

ParagraphFormat Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Alignment | Returns or sets the alignment for each paragraph in the specified paragraph format. Read/write.
Application | Returns an Application object that represents the creator of the specified object.
BaseLineAlignment | Returns or sets the base line alignment for the specified paragraph. Read/write.
Bullet | Returns a BulletFormat object that represents bullet formatting for the specified paragraph format. Read-only.
FarEastLineBreakControl | Returns or sets the line break control option if you have an Asian language setting specified. Read/write.
HangingPunctuation | Returns or sets the hanging punctuation option if you have an Asian language setting specified. Read/write.
LineRuleAfter | Determines whether line spacing after the last line in each paragraph is set to a specific number of points or lines. Read/write.
LineRuleBefore | Determines whether line spacing before the first line in each paragraph is set to a specific number of points or lines. Read/write.
LineRuleWithin | Determines whether line spacing between base lines is set to a specific number of points or lines. Read/write.
Parent | Returns the parent object for the specified object.
SpaceAfter | Returns or sets the amount of space after the last line in each paragraph of the specified text, in points or lines. Read/write.
SpaceBefore | Returns or sets the amount of space before the first line in each paragraph of the specified text, in points or lines. Read/write.
SpaceWithin | Returns or sets the amount of space between base lines in the specified text, in points or lines. Read/write.
TextDirection | Returns or sets the text direction for the specified paragraph. Read/write.
WordWrap | Used only with Kanji characters. Read/write.


Series Object (PowerPoint)

 Copy code hover
[image]

Series Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a series in a chart.

Version Information

Version Added: PowerPoint 2007

Remarks

The Series object is a member of the SeriesCollection collection.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

Use SeriesCollection(Index), where Index is the series index number or name, to return a single Series object. The following example sets the color of the interior for the first series of the first chart in the active document.

The series index number indicates the order in which the series were added to the chart. SeriesCollection(1) is the first series added to the chart, and SeriesCollection(SeriesCollection.Count) is the last one added.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).Interior.Color = RGB(255, 0, 0)

    End If

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

Series Object Members


LineFormat.BackColor Property (PowerPoint)

 Copy code hover
[image]

LineFormat.BackColor Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a ColorFormat object that represents the background color for the specified fill or patterned line. Read/write.

Syntax

expression .BackColor

expression A variable that represents a LineFormat object.

Return Value

ColorFormat

Example

This example adds a rectangle to myDocument and then sets the foreground color, background color, and gradient for the rectangle's fill.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddShape(msoShapeRectangle, _

        90, 90, 90, 50).Fill

    .ForeColor.RGB = RGB(128, 0, 0)

    .BackColor.RGB = RGB(170, 170, 170)

    .TwoColorGradient msoGradientHorizontal, 1

End With

This example adds a patterned line to myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddLine(10, 100, 250, 0).Line

    .Weight = 6

    .ForeColor.RGB = RGB(0, 0, 255)

    .BackColor.RGB = RGB(128, 0, 0)

    .Pattern = msoPatternDarkDownwardDiagonal

End With

See also

Concepts

LineFormat Object

Other resources

LineFormat Object Members


Guides.Application Property (PowerPoint)

 Copy code hover
[image]

Guides.Application Property (PowerPoint)
Send feedback

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2013

Syntax

expression .Application

expression A variable that represents a Guides object.


Presentations.Application Property (PowerPoint)

 Copy code hover
[image]

Presentations.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a Presentations object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

Presentations Object

Other resources

Presentations Object Members


TextStyles Object (PowerPoint)

 Copy code hover
[image]

TextStyles Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

A collection of three text styles - title text, body text, and default text - each of which is represented by a TextStyle object.

Remarks

Each text style contains a TextFrame object that describes how text is placed within the text bounding box, a Ruler object that contains tab stops and outline indent formatting information, and a TextStyleLevels collection that contains outline text formatting information.

Example

Use TextStyles(index), where index is either ppBodyStyle, ppDefaultStyle, or ppTitleStyle, to return a single TextStyle object. This example sets the margins for the notes body area on all the notes pages in the active presentation.

VBA Copy code Copy code
With ActivePresentation.NotesMaster _

        .TextStyles(ppBodyStyle).TextFrame

    .MarginBottom = 50

    .MarginLeft = 50

    .MarginRight = 50

    .MarginTop = 50

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

TextStyles Object Members


Slide.HasNotesPage Property (PowerPoint)

 Copy code hover
[image]

Slide.HasNotesPage Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Indicates whether the selected Slide has media that resides on a notes page. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .HasNotesPage

expression A variable that represents a Slide object.

Return Value

Boolean

See also

Concepts

Slide Object

Other resources

Slide Object Members


ChartTitle.VerticalAlignment Property (PowerPoint)

 Copy code hover
[image]

ChartTitle.VerticalAlignment Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the vertical alignment of the specified object. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .VerticalAlignment

expression A variable that represents a ChartTitle object.

Remarks

You can set the value of this property to one of the following XlConstants constants:

  • xlBottom

  • xlCenter

  • xlDistributed

  • xlJustify

  • xlTop

See also

Concepts

ChartTitle Object

Other resources

ChartTitle Object Members


TextRange.LtrRun Method (PowerPoint)

 Copy code hover
[image]

TextRange.LtrRun Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Sets the direction of text in a text range to read from left to right.

Syntax

expression .LtrRun

expression A variable that represents a TextRange object.

Remarks

This method makes it possible to use text from both left-to-right and right-to-left languages in the same presentation.

Example

The following example finds all of the shapes on slide one that contain text and changes the text to read from left to right.

VBA Copy code Copy code
ActiveWindow.ViewType = ppViewSlide

For Each sh In ActivePresentation.Slides(1).Shapes

    If sh.HasTextFrame Then

         sh.TextFrame.TextRange.LtrRun

    End If

Next

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


ColorSchemes.Parent Property (PowerPoint)

 Copy code hover
[image]

ColorSchemes.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a ColorSchemes object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

ColorSchemes Object

Other resources

ColorSchemes Object Members


UpBars Properties (PowerPoint)

 Copy code hover
[image]

UpBars Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Fill | Returns a FillFormatobject for the parent chart element that contains fill formatting properties for the chart element. Read-only.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Name | Returns the name of the object. Read-only String.
Parent | Returns the parent for the specified object. Read-only Object.


ChartGroup Object (PowerPoint)

 Copy code hover
[image]

ChartGroup Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents one or more series plotted in a chart with the same format.

Version Information

Version Added: PowerPoint 2007

Remarks

A chart contains one or more chart groups, each chart group contains one or more Series objects, and each series contains one or more Points objects. For example, a single chart might contain both a line chart group, which contains all the series plotted with the line chart format, and a bar chart group, which contains all the series plotted with the bar chart format. The ChartGroup object is a member of the ChartGroups collection.

Use ChartGroups(Index), where index is the chart group index number, to return a single ChartGroup object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example adds drop lines to the first chart group of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1).Chart

    .ChartGroups(1).HasDropLines = True

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

ChartGroup Object Members


Presentation.Merge Method (PowerPoint)

 Copy code hover
[image]

Presentation.Merge Method (PowerPoint)
Send feedback

Merges the changes in one presentation with another.

Version information

Version Added: PowerPoint 2013

Syntax

expression .Merge(Path)

expression A variable that represents a Presentation object.

Parameters

Name | Required/Optional | Data type | Description
Path | Required | String | The path, including filename, of the presentation to merge changes with.
Path | Required | STRING |

Return value

VOID

Example

The following code sample merges the active presentation with a presentation saved to the user's desktop.

VBA Copy code Copy code
Sub MergePresentations()
    Dim userName As String
    Dim otherPres As String

    ActivePresentation.Merge("C:\Users\" & username & "\Desktop\" & otherPres)
End Sub


AddIns.Count Property (PowerPoint)

 Copy code hover
[image]

AddIns.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents an AddIns object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

AddIns Object

Other resources

AddIns Object Members


TableBackground.Reflection Property (PowerPoint)

 Copy code hover
[image]

TableBackground.Reflection Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an ReflectionFormat object that represents the reflection effect associated with the table background. Read-only.

Syntax

expression .Reflection

expression An expression that returns a TableBackground object.

Return Value

ReflectionFormat

See also

Concepts

TableBackground Object

Other resources

TableBackground Object Members


Font.Parent Property (PowerPoint)

 Copy code hover
[image]

Font.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a Font object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

Font Object

Other resources

Font Object Members


ChartFont.Bold Property (PowerPoint)

 Copy code hover
[image]

ChartFont.Bold Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if the font is bold. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Bold

expression A variable that represents a ChartFont object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the font to bold for all characters in the chart title of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.ChartTitle.Characters.Font.Bold = True

    End If

End With

See also

Concepts

ChartFont Object

Other resources

ChartFont Object Members


SlideShowView Properties (PowerPoint)

 Copy code hover
[image]

SlideShowView Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
AcceleratorsEnabled | Determines whether shortcut keys are enabled during a slide show. Read/write.
AdvanceMode | Returns a value that indicates how the slide show in the specified view advances. Read-only.
Application | Returns an Application object that represents the creator of the specified object.
CurrentShowPosition | Returns the position of the current slide within the slide show that is showing in the specified view. Read-only.
IsNamedShow | Determines whether a custom (named) slide show is displayed in the specified slide show view. Read-only.
LastSlideViewed | Returns a Slide object that represents the slide viewed immediately before the current slide in the specified slide show view.
MediaControlsHeight | Returns the height of the media control bounding box. Read-only.
MediaControlsLeft | Returns the distance, in points, from the left edge of the media control bounding box to the left edge of the Slide. Read-only.
MediaControlsTop | Returns the distance, in points, from the top edge of the media control bounding box to the top edge of the Slide object. Read-only.
MediaControlsVisible | Indicates whether the media controls are visible. Read-only.
MediaControlsWidth | Returns the width, in points, of the media control bounding box. Read-only.
Parent | Returns the parent object for the specified object.
PointerColor | Returns a ColorFormat object that represents the pointer color for the specified presentation during one slide show. Read-only.
PointerType | Returns or sets the type of pointer used in the slide show. Read/write.
PresentationElapsedTime | Returns the number of seconds that have elapsed since the beginning of the specified slide show. Read-only.
Slide | Returns a Slide object that represents the slide that's currently displayed in the specified slide show window view. Read-only.
SlideElapsedTime | Returns the number of seconds that the current slide has been displayed. Read/write.
SlideShowName | Returns the name of the custom slide show that's currently running in the specified slide show view. Read-only.
State | Returns or sets the state of the slide show. Read/write.
Zoom | Returns the zoom setting of the specified slide show window view as a percentage of normal size. Read-only.


ResampleMediaTasks.Count Property (PowerPoint)

 Copy code hover
[image]

ResampleMediaTasks.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a ResampleMediaTasks object.

See also

Concepts

ResampleMediaTasks Object

Other resources

ResampleMediaTasks Object Members


DataLabel.ShowSeriesName Property (PowerPoint)

 Copy code hover
[image]

DataLabel.ShowSeriesName Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True to show the series name for the data labels on a chart. False to hide the series name. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ShowSeriesName

expression A variable that represents a DataLabel object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example enables the series name to be shown for the data labels of the first series on the first chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).DataLabels. _

            ShowSeriesName = True

    End If

End With

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


SetEffect.Parent Property (PowerPoint)

 Copy code hover
[image]

SetEffect.Parent Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a SetEffect object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

SetEffect Object

Other resources

SetEffect Object Members


SoundEffect Methods (PowerPoint)

 Copy code hover
[image]

SoundEffect Methods (PowerPoint)
Send feedback

Published: July 12, 2012

This object has the following methods:

Methods

Name | Description
ImportFromFile | Specifies the sound that will be played whenever the specified shape is clicked or animated or whenever the specified slide transition occurs.
Play | Plays the specified sound effect.


Hyperlink.ShowAndReturn Property (PowerPoint)

 Copy code hover
[image]

Hyperlink.ShowAndReturn Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines if and under what circumstances Microsoft PowerPoint returns to the initiating slide show. Read/write.

Syntax

expression .ShowAndReturn

expression A variable that represents a Hyperlink object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | Default. PowerPoint doesn't return to the initiating slide show from the deactivated custom slide show.
msoTrue | PowerPoint returns to the initiating slide show from a deactivated custom slide show that was activated by using the Hyperlink object of the initiating presentation.

See also

Concepts

Hyperlink Object

Other resources

Hyperlink Object Members


Master.Hyperlinks Property (PowerPoint)

 Copy code hover
[image]

Master.Hyperlinks Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Hyperlinks collection that represents all the hyperlinks on the specified slide. Read-only.

Syntax

expression .Hyperlinks

expression A variable that represents a Master object.

Return Value

Hyperlinks

Example

This example allows the user to update an outdated Internet address for all hyperlinks in the active presentation.

VBA Copy code Copy code
oldAddr = InputBox("Old Internet address")

newAddr = InputBox("New Internet address")

For Each s In ActivePresentation.Slides

    For Each h In s.Hyperlinks

        If LCase(h.Address) = oldAddr Then h.Address = newAddr

    Next

Next

See also

Concepts

Master Object

Other resources

Master Object Members


ChartGroup.SeriesCollection Method (PowerPoint)

 Copy code hover
[image]

ChartGroup.SeriesCollection Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns all the series in the chart group.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .SeriesCollection(Index)

expression A variable that represents a ChartGroup object.

Return Value

A SeriesCollection object that represents all the series in the chart group.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example turns on data labels for the first series of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.ChartGroups(1). _

            SeriesCollection(1).HasDataLabels = True

    End If

End With

See also

Concepts

ChartGroup Object

Other resources

ChartGroup Object Members


Guide Methods (PowerPoint)

 Copy code hover
[image]

Guide Methods (PowerPoint)
Send feedback

This object has the following methods:

Methods

Name | Description
Delete | Removes the drawing guide from the presentation or custom layout.


ThemeVariant.Height Property (PowerPoint)

 Copy code hover
[image]

ThemeVariant.Height Property (PowerPoint)
Send feedback

Returns the height of the theme variation. Read-only.

Version information

Version Added: PowerPoint 2013

Syntax

expression .Height

expression A variable that represents a ThemeVariant object.

Property value

INT32


SeriesLines Object (PowerPoint)

 Copy code hover
[image]

SeriesLines Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents series lines in a chart group.

Version Information

Version Added: PowerPoint 2007

Remarks

Series lines connect the data values from each series. Only 2-D stacked bar, 2-D stacked column, pie-of-pie, or bar-of-pie charts can have series lines. This object is not a collection. There is no object that represents a single series line; you either enable series lines for all points in a chart group or you disable them.

If the HasSeriesLines property is False, most properties of the SeriesLines object are disabled.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

Use the SeriesLines property to return a SeriesLines object. The following example adds series lines to chart group one in embedded chart one on worksheet one (the chart must be a 2-D stacked bar or column chart).

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.ChartGroups(1)

            .HasSeriesLines = True

            .SeriesLines.Border.Color = RGB(0, 0, 255)

        End With

    End If

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

SeriesLines Object Members


ShapeRange.Align Method (PowerPoint)

 Copy code hover
[image]

ShapeRange.Align Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Aligns the shapes in the specified range of shapes.

Syntax

expression .Align(AlignCmd, RelativeTo)

expression A variable that represents a ShapeRange object.

Parameters

Name | Required/Optional | Data Type | Description
AlignCmd | Required | MsoAlignCmd | Specifies the way the shapes in the specified shape range are to be aligned.
RelativeTo | Required | MsoTriState | Determines whether shapes are aligned relative to the edge of the slide.

Example

This example aligns the left edges of all the shapes in the specified range in myDocument with the left edge of the leftmost shape in the range.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)
myDocument.Shapes.Range.Align msoAlignLefts, msoFalse

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


ShapeRange.PictureFormat Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.PictureFormat Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a PictureFormat object that contains picture formatting properties for the specified shape. Read-only.

Syntax

expression .PictureFormat

expression A variable that represents a ShapeRange object.

Return Value

PictureFormat

Remarks

This property applies to Shape or ShapeRange objects that represent pictures or OLE objects.

Example

This example sets the brightness and contrast for shape one on myDocument. Shape one must be a picture or an OLE object.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(1).PictureFormat

    .Brightness = 0.3

    .Contrast = .75

End With

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


PrintOptions.HighQuality Property (PowerPoint)

 Copy code hover
[image]

PrintOptions.HighQuality Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Indicates whether to print in high quality. Read/write.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .HighQuality

expression A variable that represents a PrintOptions object.

See also

Concepts

PrintOptions Object

Other resources

PrintOptions Object Members


DataTable.Parent Property (PowerPoint)

 Copy code hover
[image]

DataTable.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents a DataTable object.

See also

Concepts

DataTable Object

Other resources

DataTable Object Members


Shape.HasChart Property (PowerPoint)

 Copy code hover
[image]

Shape.HasChart Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns whether the shape represented by the specified object contains a chart. Read-only.

Syntax

expression .HasChart

expression An expression that returns a Shape object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified shape does not contain a chart.
msoTrue | The specified shape contains a chart.

See also

Concepts

Shape Object

Other resources

Shape Object Members


Point.Delete Method (PowerPoint)

 Copy code hover
[image]

Point.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Delete

expression A variable that represents a Point object.

Remarks

Deleting a Point object deletes the entire series.

See also

Concepts

Point Object

Other resources

Point Object Members


Chart.Refresh Method (PowerPoint)

 Copy code hover
[image]

Chart.Refresh Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Causes the specified chart to be redrawn immediately.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Refresh

expression A variable that represents a Chart object.

See also

Concepts

Chart Object

Other resources

Chart Object Members


Panes.Item Method (PowerPoint)

 Copy code hover
[image]

Panes.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single Pane object from the specified Panes collection.

Syntax

expression .Item(Index)

expression A variable that represents a Panes object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Long | The index number of the single Pane object in the collection to be returned.

Return Value

Pane

See also

Concepts

Panes Object

Other resources

Panes Object Members


ShapeRange.ActionSettings Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.ActionSettings Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an ActionSettings object that contains information about what action occurs when the user clicks or moves the mouse over the specified shape or text range during a slide show. Read-only.

Syntax

expression .ActionSettings

expression A variable that represents a ShapeRange object.

Return Value

ActionSettings

Example

The following example sets the actions for clicking and moving the mouse over shape one on slide two in the active presentation.

VBA Copy code Copy code
Set myShape = ActivePresentation.Slides(2).Shapes(1)

myShape.ActionSettings(ppMouseClick).Action = ppActionLastSlide

myShape.ActionSettings(ppMouseOver).SoundEffect.Name = "applause"

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


SectionProperties Members (PowerPoint)

 Copy code hover
[image]

SectionProperties Members (PowerPoint)
Send feedback

Published: July 16, 2012

Contains properties and methods for manipulating sections in a presentation.

Methods

Name | Description
AddBeforeSlide | Adds a section immediately before the specified slide index, and returns the index of the new section.
AddSection | Adds a new section at the specified index position and returns the index of the newly created section.
Delete | Deletes the section break that sets off the specified section, and optionally deletes all the slides in the section.
FirstSlide | Returns the index of the first slide in the specified section, or returns -1 if the section is empty.
Move | Moves the specified section to the specified index position, moving the slides in the section along with the section break.
Name | Returns the name of the specified section as a String.
Rename | Renames the specified section with the specified name.
SectionID | Returns a string that represents the unique identifier of the specified section.
SlidesCount | Returns the number of slides in the specified section.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object. Read-only.


PlaceholderFormat Object (PowerPoint)

 Copy code hover
[image]

PlaceholderFormat Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

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

Example

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.

VBA Copy code Copy code
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

Concepts

PowerPoint Object Model Reference

Other resources

PlaceholderFormat Object Members


SlideRange.ApplyThemeColorScheme Method (PowerPoint)

 Copy code hover
[image]

SlideRange.ApplyThemeColorScheme Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Applies a color scheme to the specified range of slides.

Syntax

expression .ApplyThemeColorScheme(themeColorSchemeName)

expression A variable that represents a SlideRange object.

Parameters

Name | Required/Optional | Data Type | Description
themeColorSchemeName | Required | String | The path and name of the color scheme file to apply to the range of slides.

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


Chart.Select Method (PowerPoint)

 Copy code hover
[image]

Chart.Select Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Selects the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Select(Replace)

expression A variable that represents a Chart object.

Parameters

Name | Required/Optional | Data Type | Description
Replace | Optional | Variant | True to replace the current selection with the specified object. False to extend the current selection to include any previously selected objects and the specified object. This parameter is used only with sheets.

See also

Concepts

Chart Object

Other resources

Chart Object Members


Coauthoring.EndReview Method (PowerPoint)

 Copy code hover
[image]

Coauthoring.EndReview Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Terminates merge mode and ends the review.

Syntax

expression .EndReview

expression A variable that represents a Coauthoring object.

Remarks

Returns an error if the application is not already in merge mode.

See also

Concepts

Coauthoring Object

Other resources

Coauthoring Object Members


Language-Specific Properties and Methods (PowerPoint)

 Copy code hover
[image]

Language-Specific Properties and Methods (PowerPoint)
Send feedback

The Microsoft Office PowerPoint Visual Basic object model has language-specific keywords for use with Asian and right-to-left languages. The availability of these language-specific keywords depends on the language support you have selected or installed.

Language-Specific Properties and Methods

Properties and methods that are available only in Asian or right-to-left languages are listed in the following table.

Property or Method | Object
AutoRotateNumbers property | Font
FarEastLineBreakLanguage property | Presentation
FarEastLineBreakLevel property | Presentation
FarEastLineBreakControl property | ParagraphFormat
HangingPunctuation property | ParagraphFormat
LayoutDirection property | Presentation
LtrRun method | TextRange
NameAscii property | Font
NameFarEast property | Font
NameOther property | Font
NoLineBreakAfter property | Presentation
NoLineBreakBefore property | Presentation
RtlRun method | TextRange
TableDirection property | Table
TextDirection property | ParagraphFormat

Language-Specific Arguments

Properties and methods that are available in all languages, but that have one or more language-specific arguments, are listed in the following table.

Property or Method | Object
AddLabel method | Shapes
AddTextBox method | Shapes
Orientation property | TextFrame
SaveAs method | Presentation
Note Note

To enable the language-specific features in Microsoft Office PowerPoint, you must be running a 32-bit version of the Microsoft Windows operating system that has support for that particular language—for example, the Arabic version of Microsoft Windows 95 has right-to-left support.


CustomLayouts Methods (PowerPoint)

 Copy code hover
[image]

CustomLayouts Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Add | Returns a CustomLayout object that represents a new custom layout.
Item | Returns a single object from the specified collection.
Paste | Pastes the slides on the Clipboard into a custom layout and adds the custom layout to the CustomLayouts collection.


LegendEntries Members (PowerPoint)

 Copy code hover
[image]

LegendEntries Members (PowerPoint)
Send feedback

Published: July 16, 2012

A collection of all the LegendEntry objects in the specified chart legend.

Methods

Name | Description
Item | Returns a single object from a collection.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Count | Returns the number of objects in the collection. Read-only Long.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Parent | Returns the parent for the specified object. Read-only Object.


Shapes.Range Method (PowerPoint)

 Copy code hover
[image]

Shapes.Range Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a ShapeRange object that represents a subset of the shapes in a Shapes collection.

Syntax

expression .Range(Index)

expression A variable that represents a Shapes object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Optional | Variant | The individual shapes that are to be included in the range. Can be an Integer that specifies the index number of the shape, a String that specifies the name of the shape, or an array that contains either integers or strings. If this argument is omitted, the Range method returns all the objects in the specified collection.

Return Value

ShapeRange

Remarks

Although you can use the Range method to return any number of shapes or slides, it is simpler to use the Item method if you only want to return a single member of the collection. For example, Shapes(1) is simpler than Shapes.Range(1), and Slides(2) is simpler than Slides.Range(2).

To specify an array of integers or strings for Index, you can use the Array function. For example, the following instruction returns two shapes specified by name.

Dim myArray() As Variant, myRange As Object myArray = Array("Oval 4", "Rectangle 5") Set myRange = ActivePresentation.Slides(1).Shapes.Range(myArray)

Example

This example sets the fill pattern for shapes one and three on myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes.Range(Array(1, 3)).Fill _

    .Patterned msoPatternHorizontalBrick

This example sets the fill pattern for the shapes named Oval 4 and Rectangle 5 on the first slide.

VBA Copy code Copy code
Dim myArray() As Variant, myRange As Object

myArray = Array("Oval 4", "Rectangle 5")

Set myRange = ActivePresentation.Slides(1).Shapes.Range(myArray)

myRange.Fill.Patterned msoPatternHorizontalBrick

This example sets the fill pattern for all shapes on the first slide.

VBA Copy code Copy code
ActivePresentation.Slides(1).Shapes.Range.Fill _

    .Patterned Pattern:=msoPatternHorizontalBrick

This example sets the fill pattern for shape one on the first slide.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

Set myRange = myDocument.Shapes.Range(1)

myRange.Fill.Patterned msoPatternHorizontalBrick

This example creates an array that contains all the AutoShapes on the first slide, uses that array to define a shape range, and then distributes all the shapes in that range horizontally.

VBA Copy code Copy code
With myDocument.Shapes

    numShapes = .Count

    'Continues if there are shapes on the slide

    If numShapes > 1 Then

        numAutoShapes = 0

        ReDim autoShpArray(1 To numShapes)

        For i = 1 To numShapes

            'Counts the number of AutoShapes on the Slide

            If .Item(i).Type = msoAutoShape Then

                numAutoShapes = numAutoShapes + 1

                autoShpArray(numAutoShapes) = .Item(i).Name

            End If

        Next

        'Adds AutoShapes to ShapeRange

        If numAutoShapes > 1 Then

            ReDim Preserve autoShpArray(1 To numAutoShapes)

            Set asRange = .Range(autoShpArray)

            asRange.Distribute msoDistributeHorizontally, False

        End If

    End If

End With

See also

Concepts

Shapes Object

Other resources

Shapes Object Members


FillFormat.Application Property (PowerPoint)

 Copy code hover
[image]

FillFormat.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a FillFormat object.

Return Value

Object

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


OLEFormat.FollowColors Property (PowerPoint)

 Copy code hover
[image]

OLEFormat.FollowColors Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the extent to which the colors in the specified object follow the slide's color scheme. Read/write.

Syntax

expression .FollowColors

expression A variable that represents a OLEFormat object.

Return Value

PpFollowColors

Remarks

The specified object must be a chart created in either Microsoft Graph or Microsoft Organization Chart.

The value of the FollowColors property can be one of these PpFollowColors constants.

Constant | Description
ppFollowColorsNone | The chart colors don't follow the slide's color scheme.
ppFollowColorsMixed | Some of the chart colors follow the slide's color scheme.
ppFollowColorsScheme | All the colors in the chart follow the slide's color scheme.
ppFollowColorsTextAndBackground | Only the text and background follow the slide's color scheme.

Example

This example specifies that the text and background of shape two on slide one in the active presentation follow the slide's color scheme. Shape two must be a chart created in either Microsoft Graph or Microsoft Organization Chart.

VBA Copy code Copy code
ActivePresentation.Slides(1).Shapes(2).OLEFormat.FollowColors = ppFollowColorsTextAndBackground

See also

Concepts

OLEFormat Object

Other resources

OLEFormat Object Members


UpBars.Format Property (PowerPoint)

 Copy code hover
[image]

UpBars.Format Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Format

expression A variable that represents an UpBars object.

See also

Concepts

UpBars Object

Other resources

UpBars Object Members


Slide.BackgroundStyle Property (PowerPoint)

 Copy code hover
[image]

Slide.BackgroundStyle Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns the background style of the specified object. Read/write.

Syntax

expression .BackgroundStyle

expression An expression that returns a Slide object.

Remarks

The value of the BackgroundStyle property can be one of the MsoBackgroundStyleIndex constants.

See also

Concepts

Slide Object

Other resources

Slide Object Members


Axis.MajorUnit Property (PowerPoint)

 Copy code hover
[image]

Axis.MajorUnit Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the major units for the value axis. Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .MajorUnit

expression A variable that represents an Axis object.

Remarks

Setting this property sets the MajorUnitIsAuto property to False.

Use the TickMarkSpacing property to set tick mark spacing on the category axis.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the major and minor units for the value axis of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.Axes(xlValue)

            .MajorUnit = 100

            .MinorUnit = 20

        End With

    End If

End With

See also

Concepts

Axis Object

Other resources

Axis Object Members


Design Members (PowerPoint)

 Copy code hover
[image]

Design Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents an individual slide design template. The Design object is a member of the Designs and SlideRange collections and the Master and Slide objects.

Methods

Name | Description
Delete | Deletes the specified Design object.
MoveTo | Moves the specified object to a specific location within the same collection, renumbering all other items in the collection appropriately.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Index | Returns a Long that represents the index number for an animation effect or design. Read-only.
Name | Returns or sets the name of the specified object. Read/write.
Parent | Returns the parent object for the specified object.
Preserved | Represents whether a design master is preserved from changes. Read/write.
SlideMaster | Returns a Master object that represents the slide master. Read-only.


Chart.Rotation Property (PowerPoint)

 Copy code hover
[image]

Chart.Rotation Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the rotation, in degrees, of the 3-D chart view (the rotation of the plot area around the z-axis). Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Rotation

expression A variable that represents a Chart object.

Remarks

The value of this property must be from 0 through 360, except for 3-D bar charts, where the value must be from 0 through 44. The default value is 20. This property applies only to 3-D charts.

Rotations are always rounded to the nearest integer.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the rotation of the first chart in the active document to 30 degrees. You should run the example on a 3-D chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.Rotation = 30

    End If

End With

See also

Concepts

Chart Object

Other resources

Chart Object Members


Sequences.Add Method (PowerPoint)

 Copy code hover
[image]

Sequences.Add Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Sequence object that represents a new sequence.

Syntax

expression .Add(Index)

expression A variable that represents a Sequences object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Optional | Long | The position of the sequence in relation to other sequences. The default value is -1, which means that if you omit the Index parameter, the new sequence is added to the end of the existing sequences.

Return Value

Sequence

See also

Concepts

Sequences Object

Other resources

Sequences Object Members


How to: Use ActiveX Controls on Documents

 Copy code hover
[image]

How to: Use ActiveX Controls on Documents
Send feedback

Just as you can add ActiveX controls to custom dialog boxes, you can add controls directly to a document when you want to provide a sophisticated way for the user to interact directly with your macro without the distraction of dialog boxes. Use the following procedure to add ActiveX controls to your document. For more specific information about using Microsoft ActiveX controls in Microsoft Office PowerPoint, see How to: Use ActiveX Controls on Slides.

  1. Add controls to documents

    Display the Control Toolbox, click the control you want to add, and then click the document.

  2. Set control properties

    Right-click a control in design mode and click Properties to display the Properties window.

  3. Initialize the control

    You can initialize controls in a procedure.

  4. Control and dialog box events

    All controls have a predefined set of events. For example, a command button has a Click event that occurs when the user clicks the command button. You can write event procedures that run when the events occur.

  5. Use control values while code is running

    Some properties can be set at run time.


Hyperlink.TextToDisplay Property (PowerPoint)

 Copy code hover
[image]

Hyperlink.TextToDisplay Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the display text for a hyperlink not associated with a graphic. Read/write.

Syntax

expression .TextToDisplay

expression A variable that represents a Hyperlink object.

Return Value

String

Remarks

This property will cause a run-time error if used with a hyperlink that is not associated with a text range. You can use code similar to the following to test whether or not a given hyperlink, represented here by myHyperlink, is associated with a text range.

If TypeName(myHyperlink.Parent.Parent) = "TextRange" Then

    strTRtest = "True"

End If

Example

This example creates an associated hyperlink with the text in shape two on slide one. It then sets the display text to "Microsoft Home Page" and sets the hyperlink address to the correct URL.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(2) _

        .TextFrame.TextRange

    With .ActionSettings(ppMouseClick)

        .Action = ppActionHyperlink

        .Hyperlink.TextToDisplay = "Microsoft Home Page"

        .Hyperlink.Address = "http://www.microsoft.com/"

    End With

End With

See also

Concepts

Hyperlink Object

Other resources

Hyperlink Object Members


SlideShowView.First Method (PowerPoint)

 Copy code hover
[image]

SlideShowView.First Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets the specified slide show view to display the first slide in the presentation.

Syntax

expression .First

expression A variable that represents a SlideShowView object.

Return Value

Nothing

Remarks

If you use the First method to switch from one slide to another during a slide show, when you return to the original slide, its animation picks up where it left off.

Example

This example sets slide show window one to display the first slide in the presentation.

VBA Copy code Copy code
SlideShowWindows(1).View.First

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


HeadersFooters Object (PowerPoint)

 Copy code hover
[image]

HeadersFooters Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Contains all the HeaderFooter objects on the specified slide, notes page, handout, or master.

Remarks

Each HeaderFooter object represents a header, footer, date and time, or slide number.

Note Note

HeaderFooter objects aren't available for Slide objects that represent notes pages. The HeaderFooter object that represents a header is available only for a notes master or handout master.

Example

Use the HeadersFooters property to return the HeadersFooters object. Use the DateAndTime, Footer, Header, or SlideNumber property to return an individual HeaderFooter object. The following example sets the footer text for slide one in the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(1).HeadersFooters.Footer _

    .Text = "Volcano Coffee"

See also

Concepts

PowerPoint Object Model Reference

Other resources

HeadersFooters Object Members


Font.Italic Property (PowerPoint)

 Copy code hover
[image]

Font.Italic Property (PowerPoint)
Send feedback

True if the font or range is formatted as italic. Read/write Long.

Syntax

expression .Italic

expression A variable that represents a Font object.

Property value

<unknown type>


TableBackground Properties (PowerPoint)

 Copy code hover
[image]

TableBackground Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Fill | Returns a FillFormat object that represents the formatting of the fill associated with the table background. Read-only.
Picture | Returns a PictureFormat object that represents the formatting of the picture associated with the table background. Read-only.
Reflection | Returns an ReflectionFormat object that represents the reflection effect associated with the table background. Read-only.
Shadow | Returns a ShadowFormat object that represents the formatting of the shadow associated with the table background. Read-only.


Legend.Width Property (PowerPoint)

 Copy code hover
[image]

Legend.Width Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the width, in points, of the object. Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Width

expression A variable that represents a Legend object.

See also

Concepts

Legend Object

Other resources

Legend Object Members


PlotArea.Creator Property (PowerPoint)

 Copy code hover
[image]

PlotArea.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents a PlotArea object.

See also

Concepts

PlotArea Object

Other resources

PlotArea Object Members


DisplayUnitLabel.FormulaLocal Property (PowerPoint)

 Copy code hover
[image]

DisplayUnitLabel.FormulaLocal Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the formula for the object, using A1-style references in the language of the user. Read/write String.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .FormulaLocal

expression A variable that represents a DisplayUnitLabel object.

Remarks

If the cell contains a constant, this property returns that constant. If the cell is empty, the property returns an empty string. If the cell contains a formula, the property returns the formula as a string, in the same format in which it would be displayed in the formula bar (including the equal sign).

If you set the value or formula of a cell to a date, Microsoft PowerPoint verifies whether that cell is already formatted with one of the date or time number formats. If not, the number format is changed to the default short date number format.

If the range is a one-dimensional or two-dimensional range, you can set the formula to a Visual Basic array of the same dimensions. Similarly, you can put the formula into a Visual Basic array.

Setting the formula of a multiple-cell range fills all cells in the range with the formula.

See also

Concepts

DisplayUnitLabel Object

Other resources

DisplayUnitLabel Object Members


Shapes.PasteSpecial Method (PowerPoint)

 Copy code hover
[image]

Shapes.PasteSpecial Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Pastes the contents of the Clipboard, using a special format.

Syntax

expression .PasteSpecial(DataType, DisplayAsIcon, IconFileName, IconIndex, IconLabel, Link)

expression A variable that represents a Shapes object.

Parameters

Name | Required/Optional | Data Type | Description
DataType | Optional | PpPasteDataType | A format for the Clipboard contents when they're inserted into the document. The default value varies, depending on the contents in the Clipboard. An error occurs if the specified data type in the DataType argument is not supported by the clipboard contents.
DisplayAsIcon | Optional | MsoTriState | MsoTrue to display the embedded object (or link) as an icon.
IconFileName | Optional | String | If DisplayAsIcon is set to msoTrue, this argument is the path and file name for the file in which the icon to be displayed is stored. If DisplayAsIcon is set to msoFalse, this argument is ignored.
IconIndex | Optional | Long | If DisplayAsIcon is set to msoTrue, this argument is a number that corresponds to the icon you want to use in the program file specified by IconFilename. For example, 0 (zero) corresponds to the first icon, and 1 corresponds to the second icon. If this argument is omitted, the first (default) icon is used. If DisplayAsIcon is set to msoFalse, then this argument is ignored. If IconIndex is outside the valid range, then the default icon (index 0) is used.
IconLabel | Optional | String | If DisplayAsIcon is set to msoTrue, this argument is the text that appears below the icon. If this label is missing, Microsoft PowerPoint generates an icon label based on the Clipboard contents. If DisplayAsIcon is set to msoFalse, then this argument is ignored.
Link | Optional | MsoTriState | Determines whether to create a link to the source file of the Clipboard contents. An error occurs if the Clipboard contents do not support a link.

Return Value

ShapeRange

Remarks

Adds the shape to the collection of shapes in the specified format. If the specified data type is a text data type, a new text box is created with the text. If the paste succeeds, the PasteSpecial method returns a ShapeRange object representing the shape range that was pasted.

The DataType parameter value can be one of these PpPasteDataType constants.

ppPasteBitmap

ppPasteDefault

ppPasteEnhancedMetafile

ppPasteHTML

ppPasteGIF

ppPasteJPG

ppPasteMetafilePicture

ppPastePNG

ppPasteShape

The DisplayAsIcon parameter value can be one of these MsoTriState constants.

Constant | Description
msoFalse | The default. Does not display the embedded object (or link) as an icon.
msoTrue | Displays the embedded object (or link) as an icon.

An error occurs if there is no data on the Clipboard when the PasteSpecial method is called.

See also

Concepts

Shapes Object

Other resources

Shapes Object Members


LinkFormat.SourceFullName Property (PowerPoint)

 Copy code hover
[image]

LinkFormat.SourceFullName Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the name and path of the source file for the linked OLE object. Read/write.

Syntax

expression .SourceFullName

expression A variable that represents a LinkFormat object.

Return Value

String

Example

This example sets the source file for shape one on slide one in the active presentation to Wordtest.doc and specifies that the object's image be updated automatically.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(1)

    If .Type = msoLinkedOLEObject Then

        With .LinkFormat

            .SourceFullName = "c:\my documents\wordtest.doc"

            .AutoUpdate = ppUpdateOptionAutomatic

        End With

    End If

End With

See also

Concepts

LinkFormat Object

Other resources

LinkFormat Object Members


AddIns.Remove Method (PowerPoint)

 Copy code hover
[image]

AddIns.Remove Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Removes an add-in from the collection of add-ins.

Syntax

expression .Remove(Index)

expression A variable that represents a AddIns object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Variant | The name or index number of the add-in to be removed from the collection.

Example

This example removes the add-in named "MyTools" from the list of available add-ins.

VBA Copy code Copy code
AddIns.Remove "mytools"

See also

Concepts

AddIns Object

Other resources

AddIns Object Members


View.MediaControlsTop Property (PowerPoint)

 Copy code hover
[image]

View.MediaControlsTop Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the distance, in points, from the top edge of the media control bounding box to the top edge of the slide. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .MediaControlsTop

expression A variable that represents a View object.

Return Value

Single

See also

Concepts

View Object

Other resources

View Object Members


Application.SmartArtColors Property (PowerPoint)

 Copy code hover
[image]

Application.SmartArtColors Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the SmartArt colors of the current Application object. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .SmartArtColors

expression A variable that represents an Application object.

See also

Concepts

Application Object

Other resources

Application Object Members


FillFormat.PresetGradient Method (PowerPoint)

 Copy code hover
[image]

FillFormat.PresetGradient Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets the specified fill to a preset gradient.

Syntax

expression .PresetGradient(Style, Variant, PresetGradientType)

expression A variable that represents a FillFormat object.

Parameters

Name | Required/Optional | Data Type | Description
Style | Required | MsoGradientStyle | The gradient style.
Variant | Required | Integer | The gradient variant. Can be a value from 1 to 4, corresponding to the four variants on the Gradient subtab on the Shape Fill tab. If Style is msoGradientFromTitle or msoGradientFromCenter, this argument can be either 1 or 2.
PresetGradientType | Required | MsoPresetGradientType | The gradient type.

Remarks

The Style parameter value can be one of these MsoGradientStyle constants.

msoGradientDiagonalDown

msoGradientDiagonalUp

msoGradientFromCenter

msoGradientFromCorner

msoGradientFromTitle

msoGradientHorizontal

msoGradientMixed

msoGradientVertical

The PresetGradientType parameter value can be one of these MsoPresetGradientType constants.

msoGradientBrass

msoGradientCalmWater

msoGradientChrome

msoGradientChromeII

msoGradientDaybreak

msoGradientDesert

msoGradientEarlySunset

msoGradientFire

msoGradientFog

msoGradientGold

msoGradientGoldII

msoGradientHorizon

msoGradientLateSunset

msoGradientMahogany

msoGradientMoss

msoGradientNightfall

msoGradientOcean

msoGradientParchment

msoGradientPeacock

msoGradientRainbow

msoGradientRainbowII

msoGradientSapphire

msoGradientSilver

msoGradientWheat

msoPresetGradientMixed

Example

This example adds a rectangle with a preset gradient fill to myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes.AddShape(msoShapeRectangle, 90, 90, 140, 80).Fill.PresetGradient msoGradientHorizontal, 1, msoGradientBrass

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


CustomLayout.Copy Method (PowerPoint)

 Copy code hover
[image]

CustomLayout.Copy Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Copies the specified object to the Clipboard.

Syntax

expression .Copy

expression A variable that represents a CustomLayout object.

Remarks

Use the Paste method of the CustomLayouts object to paste the slides on the Clipboard into a custom layout and add the custom layout to the CustomLayouts collection.

See also

Concepts

CustomLayout Object

Other resources

CustomLayout Object Members


SlideRange.ColorScheme Property (PowerPoint)

 Copy code hover
[image]

SlideRange.ColorScheme Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the ColorScheme object that represents the scheme colors for the specified slide, slide range, or slide master. Read/write.

Syntax

expression .ColorScheme

expression A variable that represents a SlideRange object.

Return Value

ColorScheme

Example

This example sets the title color to green for slides one and three in the active presentation.

VBA Copy code Copy code
Set mySlides = ActivePresentation.Slides.Range(Array(1, 3))

mySlides.ColorScheme.Colors(ppTitle).RGB = RGB(0, 255, 0)

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


PrintOptions.Application Property (PowerPoint)

 Copy code hover
[image]

PrintOptions.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a PrintOptions object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

PrintOptions Object

Other resources

PrintOptions Object Members


Walls.Thickness Property (PowerPoint)

 Copy code hover
[image]

Walls.Thickness Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the thickness of the wall. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Thickness

expression A variable that represents a Walls object.

Remarks

Use this property to set the thickness of the walls on a chart. The default value is zero (0).

See also

Concepts

Walls Object

Other resources

Walls Object Members


ChartTitle.HorizontalAlignment Property (PowerPoint)

 Copy code hover
[image]

ChartTitle.HorizontalAlignment Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the horizontal alignment for the specified object. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .HorizontalAlignment

expression A variable that represents a ChartTitle object.

Remarks

You can set the value of this property to one of the following XlConstants constants:

  • xlCenter

  • xlDistributed

  • xlJustify

  • xlLeft

  • xlRight

Some of these constants may not be available to you, depending on the language support (for example, U.S. English) that you have selected or installed.

See also

Concepts

ChartTitle Object

Other resources

ChartTitle Object Members


Legend.Delete Method (PowerPoint)

 Copy code hover
[image]

Legend.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Delete

expression A variable that represents a Legend object.

See also

Concepts

Legend Object

Other resources

Legend Object Members


Trendline.Name Property (PowerPoint)

 Copy code hover
[image]

Trendline.Name Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets name of the object. Read/write String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Name

expression A variable that represents a Trendline object.

See also

Concepts

Trendline Object

Other resources

Trendline Object Members


SlideShowSettings.ShowMediaControls Property (PowerPoint)

 Copy code hover
[image]

SlideShowSettings.ShowMediaControls Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Allows access to the media controls in the SlideShowSettings object. Read/write.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .ShowMediaControls

expression A variable that represents a SlideShowSettings object.

See also

Concepts

SlideShowSettings Object

Other resources

SlideShowSettings Object Members


PropertyEffect.Points Property (PowerPoint)

 Copy code hover
[image]

PropertyEffect.Points Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an AnimationPoints object that represents a point in an animation.

Syntax

expression .Points

expression A variable that represents a PropertyEffect object.

Remarks

Use the From and To properties to set the value of this property.

See also

Concepts

PropertyEffect Object

Other resources

PropertyEffect Object Members


TickLabels.ReadingOrder Property (PowerPoint)

 Copy code hover
[image]

TickLabels.ReadingOrder Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets an XlReadingOrder constant that represents the reading order for the specified object. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ReadingOrder

expression A variable that represents a TickLabels object.

See also

Concepts

TickLabels Object

Other resources

TickLabels Object Members


LegendKey.MarkerForegroundColor Property (PowerPoint)

 Copy code hover
[image]

LegendKey.MarkerForegroundColor Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets the marker foreground color as an RGB value or returns the corresponding color index value. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .MarkerForegroundColor

expression A variable that represents a LegendKey object.

Remarks

This property applies only to line, scatter, and radar charts.

See also

Concepts

LegendKey Object

Other resources

LegendKey Object Members


MediaFormat.Parent Property (PowerPoint)

 Copy code hover
[image]

MediaFormat.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Parent

expression An expression that returns a MediaFormat object.

Return Value

Object

See also

Concepts

MediaFormat Object

Other resources

MediaFormat Object Members


FileConverter Object (PowerPoint)

 Copy code hover
[image]

FileConverter Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a file converter that is used to open or save files. The FileConverter object is a member of the FileConverters collection. The FileConverters collection contains all the installed file converters for opening and saving files.

Version Information

Version Added: PowerPoint 2007

Remarks

Use FileConverters(Index), where Index is a class name or index number, to return a single FileConverter object. The following example displays the extensions associated with the Microsoft Excel worksheet converter.

VBA Copy code Copy code
MsgBox FileConverters("MSBiff").Extensions

The index number represents the position of the file converter in the FileConverters collection. The following example displays the format name of the first file converter.

VBA Copy code Copy code
MsgBox FileConverters(1).FormatName

You cannot create a new file converter or add one to the FileConverters collection. FileConverter objects are added during installation of Microsoft Office or by installing supplemental file converters. Use either the CanSave or CanOpen property to determine whether a FileConverter object can be used to open or save document.

File converters for saving documents are listed in the Save As dialog box. File converters for opening documents appear in a dialog box if the Confirm conversion at Open check box is selected on the General tab in the Options dialog box.

See also

Concepts

PowerPoint Object Model Reference

Other resources

FileConverter Object Members


ChartArea.Select Method (PowerPoint)

 Copy code hover
[image]

ChartArea.Select Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Selects the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Select

expression A variable that represents a ChartArea object.

See also

Concepts

ChartArea Object

Other resources

ChartArea Object Members


ShadowFormat.RotateWithShape Property (PowerPoint)

 Copy code hover
[image]

ShadowFormat.RotateWithShape Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets whether the specified shadow rotates when the shape it is associated with rotates. Read/write.

Syntax

expression .RotateWithShape

expression An expression that returns a ShadowFormat object.

Return Value

MsoTriState

Remarks

The value returned by the RotateWithShape property can be one of these MsoTriState constants.

Constant | Description
msoFalse | The shadow does not rotate with the shape.
msoTrue | The shadow does rotate with the shape.

See also

Concepts

ShadowFormat Object

Other resources

ShadowFormat Object Members


Master.BackgroundStyle Property (PowerPoint)

 Copy code hover
[image]

Master.BackgroundStyle Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns the background style of the specified object. Read/write.

Syntax

expression .BackgroundStyle

expression An expression that returns a Master object.

Remarks

The value of the BackgroundStyle property can be one of the MsoBackgroundStyleIndex constants.

See also

Concepts

Master Object

Other resources

Master Object Members


CellRange.Borders Property (PowerPoint)

 Copy code hover
[image]

CellRange.Borders Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Borders collection that represents the borders and diagonal lines for the specified Cell object or CellRange collection. Read-only.

Syntax

expression .Borders

expression A variable that represents a CellRange object.

Return Value

Borders

Example

This example sets the thickness of the left border for the first cell in the second row of the selected table to three points.

VBA Copy code Copy code
ActiveWindow.Selection.ShapeRange.Table.Rows(2) _

    .Cells(1).Borders.Item(ppBorderLeft).Weight = 3

See also

Concepts

CellRange Object

Other resources

CellRange Object Members


ThreeDFormat.ProjectText Property (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.ProjectText Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Specifies whether text on the specified ThreeDFormat object rotates with the object. Read/write.

Syntax

expression .ProjectText

expression A variable that represents a ThreeDFormat object.

Return Value

MsoTriState

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


ChartGroup.RadarAxisLabels Property (PowerPoint)

 Copy code hover
[image]

ChartGroup.RadarAxisLabels Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the radar axis labels for the specified chart group. Read-only TickLabels.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .RadarAxisLabels

expression A variable that represents a ChartGroup object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example enables radar axis labels for chart group one for the first chart in the active document and then sets the color for the labels to red. You should run the example on a radar chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.ChartGroups(1)

            .HasRadarAxisLabels = True

            .RadarAxisLabels.Font.ColorIndex = 3

        End With

    End If

End With

See also

Concepts

ChartGroup Object

Other resources

ChartGroup Object Members


Trendline.DataLabel Property (PowerPoint)

 Copy code hover
[image]

Trendline.DataLabel Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the data label that is associated with the trendline. Read-only DataLabel.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .DataLabel

expression A variable that represents a Trendline object.

Remarks

To enable data labels for a trendline, you need to set the DisplayEquation property or the DisplayRSquared property to True.

See also

Concepts

Trendline Object

Other resources

Trendline Object Members


Shape.ConnectorFormat Property (PowerPoint)

 Copy code hover
[image]

Shape.ConnectorFormat Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a ConnectorFormat object that contains connector formatting properties. Applies to Shape or ShapeRange objects that represent connectors. Read-only.

Syntax

expression .ConnectorFormat

expression A variable that represents a Shape object.

Return Value

ConnectorFormat

Example

This example adds two rectangles to myDocument, attaches them with a connector, automatically reroutes the connector along the shortest path, and then detaches the connector from the rectangles.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

Set s = myDocument.Shapes

Set firstRect = s.AddShape(msoShapeRectangle, 100, 50, 200, 100)

Set secondRect = s.AddShape(msoShapeRectangle, 300, 300, 200, 100)

With s.AddConnector(msoConnectorCurve, 0, 0, 0, 0).ConnectorFormat

    .BeginConnect firstRect, 1

    .EndConnect secondRect, 1

    .Parent.RerouteConnections

    .BeginDisconnect

    .EndDisconnect

End With

See also

Concepts

Shape Object

Other resources

Shape Object Members


ChartGroups.Creator Property (PowerPoint)

 Copy code hover
[image]

ChartGroups.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents a ChartGroups object.

See also

Concepts

ChartGroups Object

Other resources

ChartGroups Object Members


Axis Members (PowerPoint)

 Copy code hover
[image]

Axis Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a single axis in a chart.

Methods

Name | Description
Delete | Deletes the object.
Select | Selects the object.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
AxisBetweenCategories | True if the value axis crosses the category axis between categories. Read/write Boolean.
AxisGroup | Returns the type of axis group. Read-only XlAxisGroup.
AxisTitle | Returns the title of the specified axis. Read-only AxisTitle.
BaseUnit | Returns or sets the base unit for the specified category axis. Read/write XlTimeUnit.
BaseUnitIsAuto | True if Microsoft Word chooses appropriate base units for the specified category axis. The default is True. Read/write Boolean.
Border | Returns the border of the object. Read-only ChartBorder.
CategoryNames | Returns or sets all the category names as a text array for the specified axis. Read/write Variant.
CategoryType | Returns or sets the category axis type. Read/write XlCategoryType.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Crosses | Returns or sets the point on the specified axis where the other axis crosses. Read/write Long.
CrossesAt | Returns or sets the point on the value axis where the category axis crosses it. Applies only to the value axis. Read/write Double.
DisplayUnit | Returns or sets the unit label for the value axis. Read/write XlDisplayUnit, xlCustom, or xlNone.
DisplayUnitCustom | If the value of the DisplayUnit property is xlCustom, returns or sets the value of the displayed units. Read/write Double.
DisplayUnitLabel | Returns the DisplayUnitLabel object for the specified axis. Returns null if the HasDisplayUnitLabel property is set to False. Read-only.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
HasDisplayUnitLabel | True if the label specified by the DisplayUnit or DisplayUnitCustom property is displayed on the specified axis. The default is True. Read/write Boolean.
HasMajorGridlines | True if the axis has major gridlines. Read/write Boolean.
HasMinorGridlines | True if the axis has minor gridlines. Read/write Boolean.
HasTitle | True if the axis or chart has a visible title. Read/write Boolean.
Height | Returns the height, in points, of the object. Read-only Double.
Left | Returns the distance, in points, from the left edge of the object to the left edge of the chart area. Read-only Double.
LogBase | Returns or sets the base of the logarithm when you are using log scales. Read/write Double.
MajorGridlines | Returns the major gridlines for the specified axis. Read-only Gridlines.
MajorTickMark | Returns or sets the type of major tick mark for the specified axis. Read/write XlTickMark.
MajorUnit | Returns or sets the major units for the value axis. Read/write Double.
MajorUnitIsAuto | True if Microsoft Word calculates the major units for the value axis. Read/write Boolean.
MajorUnitScale | Returns or sets the major unit scale value for the category axis when the CategoryType property is set to xlTimeScale. Read/write XlTimeUnit.
MaximumScale | Returns or sets the maximum value on the value axis. Read/write Double.
MaximumScaleIsAuto | True if Microsoft Word calculates the maximum value for the value axis. Read/write Boolean.
MinimumScale | Returns or sets the minimum value on the value axis. Read/write Double.
MinimumScaleIsAuto | True if Microsoft Word calculates the minimum value for the value axis. Read/write Boolean.
MinorGridlines | Returns the minor gridlines for the specified axis. Read-only Gridlines.
MinorTickMark | Returns or sets the type of minor tick mark for the specified axis. Read/write XlTickMark.
MinorUnit | Returns or sets the minor units on the value axis. Read/write Double.
MinorUnitIsAuto | True if Microsoft Word calculates minor units for the value axis. Read/write Boolean.
MinorUnitScale | Returns or sets the minor unit scale value for the category axis when the CategoryType property is set to xlTimeScale. Read/write XlTimeUnit.
Parent | Returns the parent for the specified object. Read-only Object.
ReversePlotOrder | True if Microsoft Word plots data points from last to first. Read/write Boolean.
ScaleType | Returns or sets the value axis scale type. Read/write XlScaleType.
TickLabelPosition | Describes the position of tick-mark labels on the specified axis. Read/write XlTickLabelPosition.
TickLabels | Returns the tick-mark labels for the specified axis. Read-only TickLabels.
TickLabelSpacing | Returns or sets the number of categories or series between tick-mark labels. Read/write Long.
TickLabelSpacingIsAuto | Returns or sets a value that indicates whether the tick label spacing is automatic. Read/write Boolean.
TickMarkSpacing | Returns or sets the number of categories or series between tick marks. Read/write Long.
Top | Returns the distance, in points, from the top edge of the object to the top of row 1 (on a worksheet) or the top of the chart area (on a chart). Read-only Double.
Type | Returns the axis type. Read-only XlAxisType.
Width | Returns the width, in points, of the object. Read-only Double.


MotionEffect.Parent Property (PowerPoint)

 Copy code hover
[image]

MotionEffect.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a MotionEffect object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

MotionEffect Object

Other resources

MotionEffect Object Members


PictureFormat Methods (PowerPoint)

 Copy code hover
[image]

PictureFormat Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
IncrementBrightness | Changes the brightness of the picture by the specified amount.
IncrementContrast | Changes the contrast of the picture by the specified amount.


Design.Application Property (PowerPoint)

 Copy code hover
[image]

Design.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a Design object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

Design Object

Other resources

Design Object Members


ChartCharacters Members (PowerPoint)

 Copy code hover
[image]

ChartCharacters Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents characters in an object that contains text.

Methods

Name | Description
Delete | Deletes the object.
Insert | Inserts a string preceding the selected characters.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Caption | Returns the text of this range of characters. Read-only String.
Count | Returns the number of objects in the collection. Read-only Long.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Font | Returns the font of the specified object. Read-only ChartFont.
Parent | Returns the parent for the specified object. Read-only Object.
PhoneticCharacters | Returns or sets the phonetic text for the object. Read/write String.
Text | Returns or sets the text for the specified object. Read/write String.


ShapeRange.Creator Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.

Syntax

expression .Creator

expression A variable that represents a ShapeRange object.

Return Value

Long

Remarks

The Creator property is designed to be used in Microsoft Office applications for the Macintosh.

Example

This example displays a message about the creator of myObject.

VBA Copy code Copy code
Set myObject = Application.ActivePresentation.Slides(1).Shapes(1)

If myObject.Creator = &h50575054 Then

    MsgBox "This is a PowerPoint object"

Else

    MsgBox "This is not a PowerPoint object"

End If

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


ResampleMediaTask.AudioSamplingRate Property (PowerPoint)

 Copy code hover
[image]

ResampleMediaTask.AudioSamplingRate Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the audio sampling rate per second. Read-only.

Syntax

expression .AudioSamplingRate

expression A variable that represents a ResampleMediaTask object.

Return Value

Long

See also

Concepts

ResampleMediaTask Object

Other resources

ResampleMediaTask Object Members


Walls Members (PowerPoint)

 Copy code hover
[image]

Walls Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents the walls of a 3-D chart.

Methods

Name | Description
ClearFormats | Clears the formatting of the object.
Paste | Pastes a picture from the Clipboard on the walls of the specified chart.
Select | Selects the object.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Name | Returns the name of the object. Read-only String.
Parent | Returns the parent for the specified object. Read-only Object.
PictureType | Returns or sets a value that specifies how pictures are displayed on the walls and faces of a 3-D chart. Read/write Variant.
PictureUnit | Returns or sets the unit for each picture on the chart if the PictureType property is set to xlStackScale; otherwise, this property is ignored. Read/write Long.
Thickness | Returns or sets the thickness of the wall. Read/write Long.


Series.MarkerBackgroundColor Property (PowerPoint)

 Copy code hover
[image]

Series.MarkerBackgroundColor Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets the marker background color as an RGB value or returns the corresponding color index value. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .MarkerBackgroundColor

expression A variable that represents a Series object.

Remarks

This property applies only to line, scatter, and radar charts.

See also

Concepts

Series Object

Other resources

Series Object Members


MsoAnimEffectRestart Enumeration (PowerPoint)

 Copy code hover
[image]

MsoAnimEffectRestart Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies whether the animation effect restarts after the effect has started once.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
msoAnimEffectRestartAlways | 1 | Always restarts.
msoAnimEffectRestartNever | 3 | Never restarts.
msoAnimEffectRestartWhenOff | 2 | Restarts when animation is off.


Series.ErrorBars Property (PowerPoint)

 Copy code hover
[image]

Series.ErrorBars Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the error bars for the series. Read-only ErrorBars.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ErrorBars

expression A variable that represents a Series object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the error bar color for series one of the first chart in the active document. You should run the example on a 2-D line chart that has error bars for series one.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.SeriesCollection(1)

            .ErrorBars.Border.ColorIndex = 8

        End With

    End If

End With

See also

Concepts

Series Object

Other resources

Series Object Members


ShapeNode.EditingType Property (PowerPoint)

 Copy code hover
[image]

ShapeNode.EditingType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

If the specified node is a vertex, this property returns a value that indicates how changes made to the node affect the two segments connected to the node. If the node is a control point for a curved segment, this property returns the editing type of the adjacent vertex. Read-only.

Syntax

expression .EditingType

expression A variable that represents an ShapeNode object.

Return Value

MsoEditingType

Remarks

This property is read-only. Use the SetEditingType method to set the value of this property.

The value of the EditingType property can be one of these MsoEditingType constants.

msoEditingAuto

msoEditingCorner

msoEditingSmooth

msoEditingSymmetric

Example

This example changes all corner nodes to smooth nodes in shape three on myDocument. Shape three must be a freeform drawing.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(3).Nodes

    For n = 1 to .Count

        If .Item(n).EditingType = msoEditingCorner Then

            .SetEditingType n, msoEditingSmooth

        End If

    Next

End With

See also

Concepts

ShapeNode Object

Other resources

ShapeNode Object Members


AnimationBehaviors Properties (PowerPoint)

 Copy code hover
[image]

AnimationBehaviors Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


SlideNavigation.Application Property (PowerPoint)

 Copy code hover
[image]

SlideNavigation.Application Property (PowerPoint)
Send feedback

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2013

Syntax

expression .Application

expression A variable that represents a SlideNavigation object.


Presentation.Save Method (PowerPoint)

 Copy code hover
[image]

Presentation.Save Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Saves the specified presentation.

Syntax

expression .Save

expression A variable that represents a Presentation object.

Remarks

Use the SaveAs method to save a presentation that has not been previously saved. To determine whether a presentation has been saved, test for a nonempty value for the FullName or Path property. If a document that has the same name as the specified presentation already exists on disk, that document will be overwritten. No warning message is displayed.

To mark the presentation as saved without writing it to disk, set the Saved property to True.

Example

This example saves the active presentation if it is been changed since the last time it was saved.

VBA Copy code Copy code
With Application.ActivePresentation

    If Not .Saved And .Path <> "" Then .Save

End With

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


PictureFormat.CropBottom Property (PowerPoint)

 Copy code hover
[image]

PictureFormat.CropBottom Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the number of points that are cropped off the bottom of the specified picture or OLE object. Read/write.

Syntax

expression .CropBottom

expression A variable that represents a PictureFormat object.

Return Value

Single

Remarks

Cropping is calculated relative to the original size of the picture. For example, if you insert a picture that is originally 100 points high, rescale it so that it is 200 points high, and then set the CropBottom property to 50, 100 points (not 50) will be cropped off the bottom of your picture.

Example

This example crops 20 points off the bottom of shape three on myDocument. For the example to work, shape three must be either a picture or an OLE object.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes(3).PictureFormat.CropBottom = 20

This example crops the percentage specified by the user off the bottom of the selected shape, regardless of whether the shape has been scaled. For the example to work, the selected shape must be either a picture or an OLE object.

VBA Copy code Copy code
percentToCrop = InputBox("What percentage do you " & _

    "want to crop off the bottom of this picture?")

Set shapeToCrop = ActiveWindow.Selection.ShapeRange(1)

With shapeToCrop.Duplicate

    .ScaleHeight 1, True

    origHeight = .Height

    .Delete

End With

cropPoints = origHeight * percentToCrop / 100

shapeToCrop.PictureFormat.CropBottom = cropPoints

See also

Concepts

PictureFormat Object

Other resources

PictureFormat Object Members


Slide.SlideNumber Property (PowerPoint)

 Copy code hover
[image]

Slide.SlideNumber Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the slide number. Read-only.

Syntax

expression .SlideNumber

expression A variable that represents a Slide object.

Return Value

Integer

Remarks

The SlideNumber property of a Slide object is the actual number that appears in the lower-right corner of the slide when you display slide numbers. This number is determined by the number of the slide within the presentation (the SlideIndex property value) and the starting slide number for the presentation (the FirstSlideNumber property value). The slide number is always equal to the starting slide number + the slide index number - 1.

Example

This example shows how changing the first slide number affects the slide number of a specific slide.

VBA Copy code Copy code
With Application.ActivePresentation

    .PageSetup.FirstSlideNumber = 1   'starts slide numbering at 1

    MsgBox .Slides(2).SlideNumber     'returns 2

    .PageSetup.FirstSlideNumber = 10 'starts slide numbering at 10

    MsgBox .Slides(2).SlideNumber     'returns 11

End With

See also

Concepts

Slide Object

Other resources

Slide Object Members


ShapeRange.Application Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a ShapeRange object.

Return Value

Object

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


Font.NameAscii Property (PowerPoint)

 Copy code hover
[image]

Font.NameAscii Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the font used for ASCII characters (characters with character set numbers within the range of 0 to 127). Read/write.

Syntax

expression .NameAscii

expression A variable that represents a Font object.

Return Value

String

Remarks

The default value of this property is Times New Roman. Use the Replace method to change the font that's applied to all text and that appears in the Font box on the Font tab.

Example

This example sets the font used for ASCII characters in the title of the first slide to Century.

VBA Copy code Copy code
Application.ActivePresentation.Slides(1).Shapes.Title _

    .TextFrame.TextRange.Font.NameAscii = "Century"

See also

Concepts

Font Object

Other resources

Font Object Members


TimeLine.InteractiveSequences Property (PowerPoint)

 Copy code hover
[image]

TimeLine.InteractiveSequences Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a Sequences object that represents animations that are triggered by click a specified shape.

Syntax

expression .InteractiveSequences

expression A variable that represents an TimeLine object.

Return Value

Sequences

Remarks

The default value of the InteractiveSequences property is an empty Sequences collection.

Example

The following example adds an interactive sequence to the first slide and sets the text effect properties for the new animation sequence.

VBA Copy code Copy code
Sub NewInteractiveSeqence()

    Dim seqInteractive As Sequence

    Dim shpText As Shape

    Dim effText As Effect

    Set seqInteractive = ActivePresentation.Slides(1).TimeLine _

        .InteractiveSequences.Add(1)

    Set shpText = ActivePresentation.Slides(1).Shapes(1)

    Set effText = ActivePresentation.Slides(1).TimeLine _

        .MainSequence.AddEffect(Shape:=shpText, _

        EffectId:=msoAnimEffectChangeFont, _

        Trigger:=msoAnimTriggerOnPageClick)

    effText.EffectParameters.FontName = "Broadway"

    seqInteractive.ConvertToTextUnitEffect Effect:=effText, _

        UnitEffect:=msoAnimTextUnitEffectByWord

End Sub

See also

Concepts

TimeLine Object

Other resources

TimeLine Object Members


ChartBorder Properties (PowerPoint)

 Copy code hover
[image]

ChartBorder Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Color | Returns or sets the primary color of the object. Read/write Variant.
ColorIndex | Returns or sets the color of the border. Read/write Variant.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
LineStyle | Returns or sets the line style for the border. Read/write XlLineStyle, xlGray25, xlGray50, xlGray75, or xlAutomatic.
Parent | Returns the parent for the specified object. Read-only Object.
Weight | Returns or sets the weight of the border. Read/write XlBorderWeight.


MotionEffect Members (PowerPoint)

 Copy code hover
[image]

MotionEffect Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a motion effect for an AnimationBehavior object.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
ByX | Sets or returns a Single that represents scaling or moving an object horizontally by a specified percentage of the screen width, depending on whether it used in conjunction with a ScaleEffect or MotionEffect object, respectively. For example, a value of 50 for a motion effect means to move the object half the screen width to the right. Read/write.
ByY | Sets or returns a Single that represents scaling or moving an object vertically by a specified percentage of the screen width, depending on whether it is used in conjunction with a ScaleEffect or MotionEffect object, respectively. Read/write.
FromX | Sets or returns a Single that represents the starting width or horizontal position of a MotionEffect object, specified as a percent of the screen width. Read/write.
FromY | Returns or sets a Single that represents the vertical position of a MotionEffect object, specified as a percentage of the screen width. Read/write.
Parent | Returns the parent object for the specified object.
Path | Returns a String that represents the path followed by a MotionEffect object. Read-only.
ToX | Sets or returns a Single that represents the horizontal position of a MotionEffect object, specified as a percent of the screen width. Read/write.
ToY | Returns or sets a Single that represents the vertical position of a MotionEffect object, specified as a percentage of the screen width. Read/write.


CommandEffect.Parent Property (PowerPoint)

 Copy code hover
[image]

CommandEffect.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a CommandEffect object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

CommandEffect Object

Other resources

CommandEffect Object Members


Shape.TextFrame Property (PowerPoint)

 Copy code hover
[image]

Shape.TextFrame Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a TextFrame object that contains the alignment and anchoring properties for the specified shape or master text style.

Syntax

expression .TextFrame

expression A variable that represents a Shape object.

Return Value

TextFrame

Remarks

Use the TextRange property of the TextFrame object to return the text in the text frame.

Use the HasTextFrame property to determine whether a shape contains a text frame before you apply the TextFrame property.

Example

This example adds a rectangle to myDocument, adds text to the rectangle, and sets the top margin for the text frame.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes _

        .AddShape(msoShapeRectangle, 180, 175, 350, 140).TextFrame

    .TextRange.Text = "Here is some test text"

    .MarginTop = 10

End With

See also

Concepts

Shape Object

Other resources

Shape Object Members


TickLabels Members (PowerPoint)

 Copy code hover
[image]

TickLabels Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents the tick-mark labels associated with tick marks on a chart axis.

Methods

Name | Description
Delete | Deletes the object.
Select | Selects the object.

Properties

Name | Description
Alignment | Returns or sets the alignment for the specified phonetic text or tick label. Read/write Long.
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Depth | Returns the number of levels of category tick labels. Read-only Long.
Font | Returns the font of the specified object. Read-only ChartFont.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
MultiLevel | Returns or sets a value that indicates whether an axis is multilevel. Read/write Boolean.
Name | Returns the name of the object. Read-only String.
NumberFormat | Returns or sets the format code for the object. Read/write String.
NumberFormatLinked | True if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). Read/write Boolean.
NumberFormatLocal | Returns or sets the format code for the object as a string in the language of the user. Read/write Variant.
Offset | Returns or sets the distance between the levels of labels, and the distance between the first level and the axis line. Read/write Long.
Orientation | Returns or sets the text orientation. Read/write Long.
Parent | Returns the parent for the specified object. Read-only Object.
ReadingOrder | Returns or sets an XlReadingOrder constant that represents the reading order for the specified object. Read/write Long.


MsoAnimProperty Enumeration (PowerPoint)

 Copy code hover
[image]

MsoAnimProperty Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Represents an animation property.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
msoAnimColor | 7 | Color
msoAnimHeight | 4 | Height
msoAnimNone | 0 | None
msoAnimOpacity | 5 | Opacity
msoAnimRotation | 6 | Rotation
msoAnimShapeFillBackColor | 1007 | Shape filled with back color
msoAnimShapeFillColor | 1005 | Shape filled with color
msoAnimShapeFillOn | 1004 | Shape fill on
msoAnimShapeFillOpacity | 1006 | Shape fill opacity
msoAnimShapeLineColor | 1009 | Colored line
msoAnimShapeLineOn | 1008 | Shape line on
msoAnimShapePictureBrightness | 1001 | Brightness of the picture
msoAnimShapePictureContrast | 1000 | Contrast of the picture
msoAnimShapePictureGamma | 1002 | Gamma properties of the picture
msoAnimShapePictureGrayscale | 1003 | Grayscale properties of the picture
msoAnimShapeShadowColor | 1012 | Shadow properties of the picture
msoAnimShapeShadowOffsetX | 1014 | Shadow Offset X
msoAnimShapeShadowOffsetY | 1015 | ShadowOffset Y
msoAnimShapeShadowOn | 1010 | Shadow on
msoAnimShapeShadowOpacity | 1013 | Opacity of the shape's shadow
msoAnimShapeShadowType | 1011 | Type of shadow
msoAnimTextBulletCharacter | 111 | Text bullet character
msoAnimTextBulletColor | 114 | Text bullet color
msoAnimTextBulletFontName | 112 | Text bullet fontname
msoAnimTextBulletNumber | 113 | Text bullet number
msoAnimTextBulletRelativeSize | 115 | Relative size of text bullet
msoAnimTextBulletStyle | 116 | Text bullet style
msoAnimTextBulletType | 117 | Text bullet type
msoAnimTextFontBold | 100 | Text font bold
msoAnimTextFontColor | 101 | Text font color
msoAnimTextFontEmboss | 102 | Text font emboss
msoAnimTextFontItalic | 103 | Text font italic
msoAnimTextFontName | 104 | Text font name
msoAnimTextFontShadow | 105 | Text font shadow
msoAnimTextFontSize | 106 | Text font size
msoAnimTextFontStrikeThrough | 110 | Text font strikethrough
msoAnimTextFontSubscript | 107 | Text font subscript
msoAnimTextFontSuperscript | 108 | Text font superscript
msoAnimTextFontUnderline | 109 | Text font underline
msoAnimVisibility | 8 | Visibility
msoAnimWidth | 3 | Width
msoAnimX | 1 | X coordinate
msoAnimY | 2 | Y coordinate


Ruler.Levels Property (PowerPoint)

 Copy code hover
[image]

Ruler.Levels Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a RulerLevels object that represents outline indent formatting. Read-only.

Syntax

expression .Levels

expression A variable that represents a Ruler object.

See also

Concepts

Ruler Object

Other resources

Ruler Object Members


ChartArea.Parent Property (PowerPoint)

 Copy code hover
[image]

ChartArea.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents a ChartArea object.

See also

Concepts

ChartArea Object

Other resources

ChartArea Object Members


DataLabels.AutoText Property (PowerPoint)

 Copy code hover
[image]

DataLabels.AutoText Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if all objects in the collection automatically generate appropriate text based on context. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .AutoText

expression A variable that represents a DataLabels object.

Remarks

Setting the value of this property sets the AutoText property of all DataLabel objects contained by the collection. This property returns True only when the AutoText property for all DataLabel objects contained in the collection is set to True; otherwise, this property returns False.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the data labels for series one of the first chart in the active document to automatically generate appropriate text.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1). _

            DataLabels.AutoText = True

    End If

End With

See also

Concepts

DataLabels Object

Other resources

DataLabels Object Members


AnimationPoints Object (PowerPoint)

 Copy code hover
[image]

AnimationPoints Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a collection of animation points for a PropertyEffect object.

Example

Use the Points property of the PropertyEffect object to return an AnimationPoints collection object. The following example adds an animation point to the first behavior in the active presentation's main animation sequence.

VBA Copy code Copy code
Sub AddPoint()

    ActivePresentation.Slides(1).TimeLine.MainSequence(1) _

        .Behaviors(1).PropertyEffect.Points.Add

End Sub

Transitions from one animation point to another can sometimes be abrupt or choppy. Use the Smooth property to make transitions smoother. This example smoothes the transitions between animation points.

VBA Copy code Copy code
Sub SmoothTransition()

    ActivePresentation.Slides(1).TimeLine.MainSequence(1) _

        .Behaviors(1).PropertyEffect.Points.Smooth = msoTrue

End Sub

See also

Concepts

PowerPoint Object Model Reference

Other resources

AnimationPoints Object Members


ChartTitle.Select Method (PowerPoint)

 Copy code hover
[image]

ChartTitle.Select Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Selects the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Select

expression A variable that represents a ChartTitle object.

See also

Concepts

ChartTitle Object

Other resources

ChartTitle Object Members


XlAxisType Enumeration (PowerPoint)

 Copy code hover
[image]

XlAxisType Enumeration (PowerPoint)
Send feedback

Published: July 12, 2012

Specifies the axis type.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlCategory | 1 | Axis displays categories.
xlSeriesAxis | 3 | Axis displays data series.
xlValue | 2 | Axis displays values.


Trendline Methods (PowerPoint)

 Copy code hover
[image]

Trendline Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
ClearFormats | Clears the formatting of the object.
Delete | Deletes the object.
Select | Selects the object.


PlotArea Members (PowerPoint)

 Copy code hover
[image]

PlotArea Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents the plot area of a chart.

Methods

Name | Description
ClearFormats | Clears the formatting of the object.
Select | Selects the object.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Height | Returns or sets the height, in points, of the object. Read/write Double.
InsideHeight | Returns or sets the inside height, in points, of the plot area. Read/write Double.
InsideLeft | Returns or sets the distance, in points, from the chart edge to the inside left edge of the plot area. Read/write Double.
InsideTop | Returns or sets the distance, in points, from the chart edge to the inside top edge of the plot area. Read/write Double.
InsideWidth | Returns or sets the inside width, in points, of the plot area. Read/write Double.
Left | Returns or sets the distance, in points, from the left edge of the object to the left edge of the chart area. Read/write Double.
Name | Returns the name of the object. Read-only String.
Parent | Returns the parent for the specified object. Read-only Object.
Position | Returns or sets the position of the plot area on the chart. Read/write XlChartElementPosition.
Top | Returns or sets the distance, in points, from the top edge of the object to the top of the first row (on a worksheet) or the top of the chart area (on a chart). Read/write Double.
Width | Returns or sets the width, in points, of the object. Read/write Double.


Font.Superscript Property (PowerPoint)

 Copy code hover
[image]

Font.Superscript Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the specified text is superscript. Read/write.

Syntax

expression .Superscript

expression A variable that represents a Font object.

Return Value

MsoTriState

Remarks

Setting the BaselineOffset property to a negative value automatically sets the Subscript property to msoTrue and the Superscript property to msoFalse.

Setting the BaselineOffset property to a positive value automatically sets the Subscript property to msoFalse and the Superscript property to msoTrue.

Setting the Superscript property to msoTrue automatically sets the BaselineOffset property to 0.3 (30 percent).

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

Constant | Description
msoFalse | The specified text is not superscript. The default.
msoTriStateMixed | Some characters are superscript and some aren't.
msoTrue | The specified text is superscript.

Example

This example sets the text for shape two on slide one and then makes the fifth character superscript with a 30-percent offset.

VBA Copy code Copy code
With Application.ActivePresentation.Slides(1).Shapes(2).TextFrame

    With .TextRange

        .Text = "E=mc2"

        .Characters(5, 1).Font.Superscript = msoTrue

    End With

End With

See also

Concepts

ThreeDFormat Object
Font Object

Other resources

Font Object Members
ThreeDFormat Object Members


OLEFormat Properties (PowerPoint)

 Copy code hover
[image]

OLEFormat Properties (PowerPoint)
Send feedback

Published: July 12, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
FollowColors | Returns or sets the extent to which the colors in the specified object follow the slide's color scheme. Read/write.
Object | Returns the object that represents the specified OLE object's top-level interface. Read-only.
ObjectVerbs | Returns a ObjectVerbs collection that contains all the OLE verbs for the specified OLE object. Read-only.
Parent | Returns the parent object for the specified object.
ProgID | Returns the programmatic identifier (ProgID) for the specified OLE object. Read-only.


Chart.Axes Method (PowerPoint)

 Copy code hover
[image]

Chart.Axes Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a collection of axes on the chart.

Syntax

expression .Axes(Type, AxisGroup)

expression A variable that represents a Chart object.

Parameters

Name

Required/Optional

Data Type

Description

Type

Optional

Variant

The axis to return. Can be one of the following XlAxisType constants: xlValue, xlCategory, or xlSeriesAxis (xlSeriesAxis is valid only for 3-D charts).

AxisGroup

Optional

XlAxisGroup

One of the enumeration values that specifies the axis group. The default is xlPrimary.

Note Note

3-D charts have only one axis group.

Return Value

An Axes object that contains the selected axes from the chart.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example adds an axis label to the category axis for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)
    If .HasChart Then
        With .Chart.Axes(xlCategory)
            .HasTitle = True
            .AxisTitle.Text = "July Sales"
        End With
    End If
End With

The following example turns off major gridlines in the category axis for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)
    If .HasChart Then
        .Chart.Axes(xlCategory). _
            HasMajorGridlines = False
    End If
End With

The following example turns off all gridlines for all axes in the first chart of the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)
    If .HasChart Then
        For Each a In .Chart.Axes
            a.HasMajorGridlines = False
            a.HasMinorGridlines = False
        Next
    End If
End With

See also

Concepts

Chart Object

Other resources

Chart Object Members


DataLabels.Name Property (PowerPoint)

 Copy code hover
[image]

DataLabels.Name Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the name of the object. Read-only String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Name

expression A variable that represents a DataLabels object.

See also

Concepts

DataLabels Object

Other resources

DataLabels Object Members


SlideShowView.PresentationElapsedTime Property (PowerPoint)

 Copy code hover
[image]

SlideShowView.PresentationElapsedTime Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of seconds that have elapsed since the beginning of the specified slide show. Read-only.

Syntax

expression .PresentationElapsedTime

expression A variable that represents a SlideShowView object.

Return Value

Long

Example

This example goes to slide seven in slide show window one if more than five minutes have elapsed since the beginning of the slide show.

VBA Copy code Copy code
With SlideShowWindows(1).View

    If .PresentationElapsedTime > 300 Then

        .GotoSlide 7

    End If

End With

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


XlPictureAppearance Enumeration (PowerPoint)

 Copy code hover
[image]

XlPictureAppearance Enumeration (PowerPoint)
Send feedback

Published: July 12, 2012

Specifies how the picture should be copied.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlPrinter | 2 | The picture is copied as it will look when it is printed.
xlScreen | 1 | The picture is copied to resemble its display on the screen as closely as possible.


ChartData.BreakLink Method (PowerPoint)

 Copy code hover
[image]

ChartData.BreakLink Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Removes the link between the data for a chart and a Microsoft Excel workbook.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .BreakLink

expression A variable that represents a ChartData object.

Remarks

Calling this method sets the IsLinked property of the ChartData object to False.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example removes the link between the ChartData object for the first chart in the active document and the Excel workbook that provided the data for the chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.ChartData.Activate

        .Chart.ChartData.BreakLink

    End If

End With

See also

Concepts

ChartData Object

Other resources

ChartData Object Members


DataTable.HasBorderHorizontal Property (PowerPoint)

 Copy code hover
[image]

DataTable.HasBorderHorizontal Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if the chart data table has horizontal cell borders. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .HasBorderHorizontal

expression A variable that represents a DataTable object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example causes the data table for the first chart in the active document to be displayed with an outline border and no cell borders.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart

            .HasDataTable = True

            With .DataTable

                .HasBorderHorizontal = False

                .HasBorderVertical = False

                .HasBorderOutline = True

            End With

        End With

    End If

End With

See also

Concepts

DataTable Object

Other resources

DataTable Object Members


ObjectVerbs.Parent Property (PowerPoint)

 Copy code hover
[image]

ObjectVerbs.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents an ObjectVerbs object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

ObjectVerbs Object

Other resources

ObjectVerbs Object Members


LinkFormat Properties (PowerPoint)

 Copy code hover
[image]

LinkFormat Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
AutoUpdate | Returns or sets the way the link will be updated. Read/write.
Parent | Returns the parent object for the specified object.
SourceFullName | Returns or sets the name and path of the source file for the linked OLE object. Read/write.


AxisTitle.Position Property (PowerPoint)

 Copy code hover
[image]

AxisTitle.Position Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the position of the axis title on the chart. Read/write XlChartElementPosition.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Position

expression A variable that represents an AxisTitle object.

See also

Concepts

AxisTitle Object

Other resources

AxisTitle Object Members


TextStyleLevels Methods (PowerPoint)

 Copy code hover
[image]

TextStyleLevels Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Item | Returns a single text style level from the specified TextStyleLevels collection.


TextRange.ActionSettings Property (PowerPoint)

 Copy code hover
[image]

TextRange.ActionSettings Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an ActionSettings object that contains information about what action occurs when the user clicks or moves the mouse over the specified shape or text range during a slide show. Read-only.

Syntax

expression .ActionSettings

expression A variable that represents a TextRange object.

Return Value

ActionSettings

Example

The following example sets the actions for clicking and moving the mouse over shape one on slide two in the active presentation.

VBA Copy code Copy code
Set myShape = ActivePresentation.Slides(2).Shapes(1)

myShape.ActionSettings(ppMouseClick).Action = ppActionLastSlide

myShape.ActionSettings(ppMouseOver).SoundEffect.Name = "applause"

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


Broadcast Methods (PowerPoint)

 Copy code hover
[image]

Broadcast Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
AddMeetingNotes | Adds shared meeting notes for the specified broadcast that are accessible to attendees who use either Microsoft OneNote 2013 rich client or web app.
End | Elevates to the system to delete the document from the Broadcast Documents library.
Pause | Pauses the specified broadcast.
Resume | Resumes the specified broadcast.
Start | Returns a list of supported functionality and the maximum allowed file size.


Research.SetLanguagePair Method (PowerPoint)

 Copy code hover
[image]

Research.SetLanguagePair Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets the languages for the translation service.

Syntax

expression .SetLanguagePair(Language1, Language2)

expression An expression that returns a Research object.

Parameters

Name | Required/Optional | Data Type | Description
Language1 | Required | Variant | Specifies the language to translate from.
Language2 | Required | Variant | Specifies the langauge to translate to.

See also

Concepts

Research Object

Other resources

Research Object Members


CustomerData.Delete Method (PowerPoint)

 Copy code hover
[image]

CustomerData.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the specified CustomXMLPart object from the CustomerData collection of a CustomLayout, Master, Presentation, Shape, or Slide object.

Syntax

expression .Delete(Id)

expression An expression that returns a CustomerData object.

Parameters

Name | Required/Optional | Data Type | Description
Id | Required | String | The ID of the CustomXMLPart object to be deleted.

Remarks

Individual CustomXMLPart objects in the CustomerData collection are represented by GUIDs (globally unique identifiers). Pass the GUID that represents the custom XML part that you want to delete to the Id parameter of the Delete method as a String. You can get the ID of a particular custom XML part by iterating through the collection, using the Id property of the CustomerData collection.

Example

The following example shows how to use the Delete method to delete a custom XML part from the CustomerData collection. It adds a new custom XML part to the CustomerData collection of the first shape on the first slide of the active presentaion. Then it gets the ID of the new part and passes it to the Delete method.

VBA Copy code Copy code
Public Sub Delete_Example()

    Dim pptSlide As Slide
    Set pptSlide = ActivePresentation.Slides(1)

    Dim pptShape As Shape
    Set pptShape = pptSlide.Shapes(1)

    ' Get the CustomerData collection of the shape
    Dim pptCustomerData As customerData
    Set pptCustomerData = pptShape.customerData

    ' Get the current count of custom XML parts
    Debug.Print pptCustomerData.Count

    ' Add a new CustomXMLPart object to the CustomerData
    ' collection for this shape and get the revised count of
    ' custom XML parts
    Dim pptCustomXMLPart As CustomXMLPart
    Set pptCustomXMLPart = pptCustomerData.Add
    Debug.Print pptCustomerData.Count

    ' Get the ID of the new part
    Dim myString As String
    myString = pptCustomXMLPart.Id
    Debug.Print myString

    ' Delete the new part and re-check the count of custom XML parts
    pptCustomerData.Delete (myString)
    Debug.Print pptCustomerData.Count

End Sub

See also

Concepts

CustomerData Collection

Other resources

CustomerData Object Members


Application Members (PowerPoint)

 Copy code hover
[image]

Application Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents the entire Microsoft PowerPoint application.

Events

Name | Description
AfterDragDropOnSlide | Occurs after a shape has been dropped onto a slide in an open presentation.
AfterNewPresentation | Occurs after a presentation is created.
AfterPresentationOpen | Occurs after an existing presentation is opened.
AfterShapeSizeChange | Occurs after an object (shape, picture, text box, chart, SmartArt as examples) has been resized on the slide.
ColorSchemeChanged | Occurs after a color scheme is changed.
NewPresentation | Occurs after a presentation is created, as it is added to the Presentations collection.
PresentationBeforeClose | Represents a Presentation object before it closes.
PresentationBeforeSave | Occurs before a presentation is saved.
PresentationClose | Occurs immediately before any open presentation closes, as it is removed from the Presentations collection.
PresentationCloseFinal | Represents closing the final Presentation object.
PresentationNewSlide | Occurs when a new slide is created in any open presentation, as the slide is added to the Slides collection.
PresentationOpen | Occurs after an existing presentation is opened, as it is added to the Presentations collection.
PresentationPrint | Occurs before a presentation is printed.
PresentationSave | Occurs before any open presentation is saved.
PresentationSync | Occurs when the local copy of a presentation that is part of a Document Workspace is synchronized with the copy on the server. Provides important status information regarding the success or failure of the synchronization of the presentation.
ProtectedViewWindowActivate | Occurs when any protected view window is activated.
ProtectedViewWindowBeforeClose | Occurs immediately before a protected view window or a document in a protected view window closes.
ProtectedViewWindowBeforeEdit | Occurs immediately before editing is enabled on the document in the specified protected view window.
ProtectedViewWindowDeactivate | Occurs when a protected view window is deactivated.
ProtectedViewWindowOpen | Occurs when a protected view window is opened.
SlideSelectionChanged | Occurs at different times depending on the current view.
SlideShowBegin | Occurs when you start a slide show.
SlideShowEnd | Occurs after a slide show ends, immediately after the last SlideShowNextSlide event occurs.
SlideShowNextBuild | Occurs upon mouse-click or timing animation, but before the animated object becomes visible. .
SlideShowNextClick | Occurs on the next click of the slide.
SlideShowNextSlide | Occurs immediately before the transition to the next slide. For the first slide, occurs immediately after the SlideShowBegin event.
SlideShowOnNext | Occurs when the user clicks Next to move within the current slide.
SlideShowOnPrevious | Occurs when the user clicks Previous to move within the current slide.
WindowActivate | Occurs when the application window or any document window is activated.
WindowBeforeDoubleClick | Occurs when you double-click the items in the views listed in the following table.
WindowBeforeRightClick | Occurs when you right-click a shape, a slide, a notes page, or some text. This event is triggered by the MouseUp event.
WindowDeactivate | Occurs when the application window or any document window is deactivated.
WindowSelectionChange | Occurs when the selection of text, a shape, or a slide in the active document window changes, whether in the user interface or in code.

Methods

Name | Description
Activate | Activates the specified object.
Help | Displays a Help topic.
OpenThemeFile | Opens the specified theme file (*thmx).
Quit | Quits Microsoft PowerPoint. This is equivalent to clicking the Office button and then clicking Exit PowerPoint.
Run | Runs a Visual Basic procedure.
StartNewUndoEntry | Starts a new undo entry in the Application object.

Properties

Name | Description
Active | Returns whether the specified pane or window is active. Read-only.
ActiveEncryptionSession | Represents the encryption session associated with the active presentation. Read-only.
ActivePresentation | Returns a Presentation object that represents the presentation open in the active window. Read-only.
ActivePrinter | Returns the name of the active printer. Read-only.
ActiveProtectedViewWindow | Returns a ProtectedViewWindow object that represents the active Protected View window (the window on top). Read-only.
ActiveWindow | Returns a DocumentWindow object that represents the active document window. Read-only.
AddIns | Returns the program-specific AddIns collection that represents all the add-ins listed in the Add-Ins dialog box (click the Office button, click PowerPoint Options, click Add-Ins, click PowerPoint Add-Ins on the Manage list). Read-only.
Assistance | Gets a reference to the Microsoft Office IAssistance object, which provides a means for developers to create a customized help experience for users within Microsoft Office. Read-only.
AutoCorrect | Returns an AutoCorrect object that represents the AutoCorrect functionality in Microsoft PowerPoint.
AutomationSecurity | Represents the security mode that Microsoft PowerPoint uses when it opens files programmatically. Read/write.
Build | Returns the build number for the current instance of Microsoft PowerPoint. Read-only.
Caption | Returns the text that appears in the title bar of the application window. Read/write.
ChartDataPointTrack | Returns or sets a Boolean that specifies whether charts use cell-reference data-point tracking. Read-write.
COMAddIns | Returns a reference to the Component Object Model (COM) add-ins currently loaded in Microsoft PowerPoint. These add-ins are listed on the Add-Ins tab in the PowerPoint Options dialog box. Read-only.
CommandBars | Returns a CommandBars collection that represents all the command bars in Microsoft PowerPoint. Read-only.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
DisplayAlerts | Sets or returns whether Microsoft PowerPoint displays alerts while running a macro. Read/write.
DisplayDocumentInformationPanel | Returns or sets whether the Document Properties panel is displayed in the Microsoft PowerPoint user interface. Read/write.
DisplayGridLines | Determines whether to display gridlines in Microsoft PowerPoint. Read/write.
DisplayGuides | Gets or sets whether drawing guides are displayed in the application.
FeatureInstall | Returns or sets how Microsoft PowerPoint handles calls to methods and properties that require features not yet installed. Read/write.
FileConverters | Returns information about installed file converters. Returns null if there are no converters installed. Read-only Variant.
FileDialog | Returns a FileDialog object that represents a single instance of a file dialog box. Read-only.
FileValidation | Returns or sets a value that indicates how PowerPoint will validate files before opening them. Read/write
Height | Returns or sets the height of the specified object, in points. Read/write.
IsSandboxed | Returns True if the specified presentation is open in a Protected View window. Read-only.
LanguageSettings | Returns a LanguageSettings object that contains information about the language settings in Microsoft PowerPoint. Read-only.
Left | Returns or sets a Single that represents the distance in points from the left edge of the document, application, and slide show windows to the left edge of the application window's client area. Setting this property to a very large positive or negative value may position the window completely off the desktop. Read/write.
Name | Returns the string "Microsoft PowerPoint." Read-only.
NewPresentation | Returns a NewFile object that represents a presentation listed on the New Presentation task pane. Read-only.
OperatingSystem | Returns the name of the operating system. Read-only.
Options | Returns an Options object that represents application options in Microsoft PowerPoint.
Path | Returns a String that represents the path to the specified Application object. Read-only.
Presentations | Returns a Presentations collection that represents all open presentations. Read-only.
ProductCode | Returns the Microsoft PowerPoint globally unique identifier (GUID). Read-only.
ProtectedViewWindows | Returns a ProtectedViewWindows collection that represents all the Protected View windows that are open in the application. Read-only
ShowStartupDialog | Determines whether to display the New Presentation task pane when Microsoft PowerPoint is started. Read/write.
ShowWindowsInTaskbar | Determines whether there is a separate Windows taskbar button for each open presentation. Read/write.
SlideShowWindows | Returns a SlideShowWindows collection that represents all open slide show windows. Read-only.
SmartArtColors | Returns the SmartArt colors of the current Application object. Read-only.
SmartArtLayouts | Returns the SmartArt layout of the current Application object. Read-only.
SmartArtQuickStyles | Returns the quick styles of the SmartArt diagram in the current Application object. Read-only.
Top | Returns or sets a Single that represents the distance in points from the top edge of the document, application, and slide show window to the top edge of the application window's client area. Read/write.
VBE | Returns a VBE object that represents the Visual Basic Editor. Read-only.
Version | Returns the Microsoft PowerPoint version number. Read-only.
Visible | Returns or sets the visibility of the specified object or the formatting applied to the specified object. Read/write.
Width | Returns or sets the width of the specified object, in points. Read/write.
Windows | Returns a DocumentWindows collection that represents all open document windows. Read-only.
WindowState | Returns or sets the state of the specified window. Read/write.


LineFormat.InsetPen Property (PowerPoint)

 Copy code hover
[image]

LineFormat.InsetPen Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Detemines whether to draw lines on the inside of a specified shape. Read/write.

Syntax

expression .InsetPen

expression A variable that represents an LineFormat object.

Return Value

MsoTriState

Remarks

An error occurs if this property attempts to set an inset pen drawing on any Microsoft Office AutoShape that does not support inset pen drawing.

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

Constant | Description
msoFalse | The default. An inset pen is not enabled.
msoTrue | An inset pen is enabled.

Example

The following line of code enables an inset pen for a shape. This example assumes that the first slide of the active presentation contains a shape and that the shape supports inset pen drawing.

VBA Copy code Copy code
Sub DrawLinesInsideShape

    ActivePresentation.Slides(1).Shapes(1).Line.InsetPen = msoTrue

End Sub

See also

Concepts

LineFormat Object

Other resources

LineFormat Object Members


TextFrame2.WordArtFormat Property (PowerPoint)

 Copy code hover
[image]

TextFrame2.WordArtFormat Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets the WordArt type for the specified text frame. Read/write.

Syntax

expression .WordArtFormat

expression An expression that returns a TextFrame2 object.

Return Value

MsoPresetTextEffect

Remarks

The value of the WordArtFormat property can be one of these MsoPresetTextEffect constants.

Example

This example shows how to set the word art format for shape one on slide one in the active presentation.

VBA Copy code Copy code
Public Sub WordArtFormat_Example()

    Dim pptSlide As Slide
    Set pptSlide = ActivePresentation.Slides(1)
    pptSlide.Shapes(1).TextFrame2.WordArtFormat = msoTextEffect20

End Sub

See also

Concepts

TextFrame2 Object

Other resources

TextFrame2 Object Members


Column.Width Property (PowerPoint)

 Copy code hover
[image]

Column.Width Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the width of the specified object, in points. Read/write.

Syntax

expression .Width

expression A variable that represents a Column object.

Return Value

Single

Example

This example arranges windows one and two horizontally; in other words, each window occupies half the available vertical space and all the available horizontal space in the application window's client area. For this example to work, there must be only two document windows open.

VBA Copy code Copy code
Windows.Arrange ppArrangeTiled

ah = Windows(1).Height                      ' available height

aw = Windows(1).Width + Windows(2).Width    ' available width

With Windows(1)

    .Width = aw

    .Height = ah / 2

    .Left = 0

End With

With Windows(2)

    .Width = aw

    .Height = ah / 2

    .Top = ah / 2

    .Left = 0

End With

This example sets the width for column one in the specified table to 80 points (72 points per inch).

VBA Copy code Copy code
ActivePresentation.Slides(2).Shapes(5).Table.Columns(1).Width = 80

See also

Concepts

Column Object

Other resources

Column Object Members


SlideShowWindow Members (PowerPoint)

 Copy code hover
[image]

SlideShowWindow Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a window in which a slide show runs.

Methods

Name | Description
Activate | Activates the specified object.

Properties

Name | Description
Active | Returns whether the specified pane or window is active. Read-only.
Application | Returns an Application object that represents the creator of the specified object.
Height | Returns or sets the height of the specified object, in points. Read/write.
IsFullScreen | Returns whether the specified slide show window occupies the entire screen. Read-only.
Left | Returns or sets a Single that represents the distance in points from the left edge of the document, application, and slide show windows to the left edge of the application window's client area. Setting this property to a very large positive or negative value may position the window completely off the desktop. Read/write.
Parent | Returns the parent object for the specified object.
Presentation | Returns a Presentation object that represents the presentation in which the specified document window or slide show window was created. Read-only.
SlideNavigation | Returns a SlideNavigation object that represents the slide navigation screen in slide show view. Read-only
Top | Returns or sets a Single that represents the distance in points from the top edge of the document, application, and slide show window to the top edge of the application window's client area. Read/write.
View | Returns a SlideShowView object. Read-only.
Width | Returns or sets the width of the specified object, in points. Read/write.


Designs Properties (PowerPoint)

 Copy code hover
[image]

Designs Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


Comment.Top Property (PowerPoint)

 Copy code hover
[image]

Comment.Top Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Single that represents the distance in points from the left edge of the comment to the left edge of the slide. Read-only.

Syntax

expression .Top

expression A variable that represents a Comment object.

See also

Concepts

Comment Object

Other resources

Comment Object Members


Shape.Chart Property (PowerPoint)

 Copy code hover
[image]

Shape.Chart Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Chart object of the current Shape object. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Chart

expression A variable that represents a Shape object.

Return Value

Chart

See also

Concepts

Shape Object

Other resources

Shape Object Members


ColorEffect Members (PowerPoint)

 Copy code hover
[image]

ColorEffect Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a color effect for an animation behavior.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
By | Returns a ColorFormat object that represents a change to the color of the object by the specified number, expressed in RGB format. Read-only.
From | Sets or returns a ColorFormat object that represents the starting RGB color value of an animation behavior.
Parent | Returns the parent object for the specified object.
To | Sets or returns a ColorFormat object that represents the RGB color value of an animation behavior. Read/write.


LegendKey.Smooth Property (PowerPoint)

 Copy code hover
[image]

LegendKey.Smooth Property (PowerPoint)
Send feedback

Published: July 12, 2012

True if curve smoothing is turned on for the legend key. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Smooth

expression A variable that represents a LegendKey object.


CustomLayout.Height Property (PowerPoint)

 Copy code hover
[image]

CustomLayout.Height Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the height of the specified object, in points. Read-only.

Syntax

expression .Height

expression A variable that represents a CustomLayout object.

Return Value

Single

See also

Concepts

CustomLayout Object

Other resources

CustomLayout Object Members


Row.Parent Property (PowerPoint)

 Copy code hover
[image]

Row.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a Row object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

Row Object

Other resources

Row Object Members


ShapeRange.Ungroup Method (PowerPoint)

 Copy code hover
[image]

ShapeRange.Ungroup Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Ungroups any grouped shapes in the specified shape or range of shapes. Disassembles pictures and OLE objects within the specified shape or range of shapes. Returns the ungrouped shapes as a single ShapeRange object.

Syntax

expression .Ungroup

expression A variable that represents a ShapeRange object.

Return Value

ShapeRange

Remarks

Because a group of shapes is treated as a single object, grouping and ungrouping shapes changes the number of items in the Shapes collection and changes the index numbers of items that come after the affected items in the collection.

Example

This example ungroups any grouped shapes and disassembles any pictures or OLE objects on myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

For Each s In myDocument.Shapes

    s.Ungroup

Next

This example ungroups any grouped shapes on myDocument without disassembling pictures or OLE objects on the slide.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

For Each s In myDocument.Shapes

    If s.Type = msoGroup Then s.Ungroup

Next

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


PpFarEastLineBreakLevel Enumeration (PowerPoint)

 Copy code hover
[image]

PpFarEastLineBreakLevel Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies where to add the line break based upon Asian character level.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppFarEastLineBreakLevelCustom | 3 | Custom level
ppFarEastLineBreakLevelNormal | 1 | Normal level
ppFarEastLineBreakLevelStrict | 2 | Strict level


ShapeNode.Application Property (PowerPoint)

 Copy code hover
[image]

ShapeNode.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a ShapeNode object.

Return Value

Object

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

ShapeNode Object

Other resources

ShapeNode Object Members


AddIn Members (PowerPoint)

 Copy code hover
[image]

AddIn Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a single add-in, either loaded or not loaded.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
AutoLoad | Determines whether the specified add-in is automatically loaded each time PowerPoint is started. Read/write.
FullName | Returns the name of the specified add-in or saved presentation, including the path, the current file system separator, and the file name extension. Read-only.
Loaded | Determines whether the specified add-in is loaded. Read/write.
Name | The name (title) of the add-in for file types that are registered. Read-only.
Parent | Returns the parent object for the specified object.
Path | Returns a String that represents the path to the specified AddIn object. Read-only.
Registered | Determines whether the specified add-in is registered in the Windows registry. Read/write.


TextFrame.HasText Property (PowerPoint)

 Copy code hover
[image]

TextFrame.HasText Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns whether the specified shape has text associated with it. Read-only.

Syntax

expression .HasText

expression A variable that represents a TextFrame object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified shape does not have text associated with it.
msoTrue | The specified shape has text associated with it.

Example

If shape two on myDocument contains text, this example resizes the shape to fit the text.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(2).TextFrame

    If .HasText Then .AutoSize = ppAutoSizeShapeToFitText

End With

See also

Concepts

TextFrame Object

Other resources

TextFrame Object Members


Legend Object (PowerPoint)

 Copy code hover
[image]

Legend Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the legend in a chart. Each chart can have only one legend.

Version Information

Version Added: PowerPoint 2007

Remarks

The Legend object contains one or more LegendEntry objects; each LegendEntry object contains a LegendKey object.

The chart legend is not visible unless the HasLegend property is True. If this property is False, properties and methods of the Legend object will fail.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

Use the Legend property to return the Legend object. The following example sets the font style for the legend of the first chart in the active document to bold.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.Legend.Font.Bold = True

    End If

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

Legend Object Members


SlideShowTransition.Speed Property (PowerPoint)

 Copy code hover
[image]

SlideShowTransition.Speed Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the speed of the transition to the specified slide. Read/write.

Syntax

expression .Speed

expression A variable that represents a SlideShowTransition object.

Return Value

PpTransitionSpeed

Remarks

The value of the Speed property can be one of these PpTransitionSpeed constants.

ppTransitionSpeedFast

ppTransitionSpeedMedium

ppTransitionSpeedMixed

ppTransitionSpeedSlow

Example

This example sets the special effect for the transition to the first slide in the active presentation and specifies that the transition be fast.

VBA Copy code Copy code
With ActivePresentation.Slides(1).SlideShowTransition

    .EntryEffect = ppEffectStripsDownLeft

    .Speed = ppTransitionSpeedFast

End With

See also

Concepts

SlideShowTransition Object

Other resources

SlideShowTransition Object Members


UpBars Members (PowerPoint)

 Copy code hover
[image]

UpBars Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents the up bars in a chart group.

Methods

Name | Description
Delete | Deletes the object.
Select | Selects the object.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Fill | Returns a FillFormatobject for the parent chart element that contains fill formatting properties for the chart element. Read-only.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Name | Returns the name of the object. Read-only String.
Parent | Returns the parent for the specified object. Read-only Object.


CalloutFormat Object (PowerPoint)

 Copy code hover
[image]

CalloutFormat Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Contains properties and methods that apply to line callouts.

Example

Use the Callout property to return a CalloutFormat object. The following example specify the following attributes of shape three (a line callout) on myDocument:

  • The callout will have a vertical accent bar that separates the text from the callout line.

  • The angle between the callout line and the side of the callout text box will be 30 degrees.

  • There will be no border around the callout text.

  • The callout line will be attached to the top of the callout text box.

  • The callout line will contain two segments.

For this example to work, shape three must be a callout.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(3).Callout

    .Accent = True

    .Angle = msoCalloutAngle30

    .Border = False

    .PresetDrop msoCalloutDropTop

    .Type = msoCalloutThree

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

CalloutFormat Object Members


SectionProperties.SlidesCount Method (PowerPoint)

 Copy code hover
[image]

SectionProperties.SlidesCount Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of slides in the specified section.

Syntax

expression .SlidesCount(sectionIndex)

expression A variable that represents a SectionProperties object.

Parameters

Name | Required/Optional | Data Type | Description
sectionIndex | Required | Integer | The index of the section.

Return Value

Long

See also

Concepts

SectionProperties Object

Other resources

SectionProperties Object Members


TimeLine.Parent Property (PowerPoint)

 Copy code hover
[image]

TimeLine.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a TimeLine object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

TimeLine Object

Other resources

TimeLine Object Members


TextRange Object (PowerPoint)

 Copy code hover
[image]

TextRange Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Contains the text that's attached to a shape, and properties and methods for manipulating the text.

Remarks

The following examples describe how to:

  • Return the text range in any shape you specify.

  • Return a text range from the selection.

  • Return particular characters, words, lines, sentences, or paragraphs from a text range.

  • Find and replace text in a text range.

  • Insert text, the date and time, or the slide number into a text range.

  • Position the cursor wherever you want in a text range.

Example

Use the TextRange property of the TextFrame object to return a TextRange object for any shape you specify. Use the Text property to return the string of text in the TextRange object. The following example adds a rectangle to myDocument and sets the text it contains.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes.AddShape(msoShapeRectangle, 0, 0, 250, 140) _

    .TextFrame.TextRange.Text = "Here is some test text"

Because the Text property is the default property of the TextRange object, the following two statements are equivalent.

VBA Copy code Copy code
ActivePresentation.Slides(1).Shapes(1).TextFrame _

    .TextRange.Text = "Here is some test text"

ActivePresentation.Slides(1).Shapes(1).TextFrame _

    .TextRange = "Here is some test text"

Use the HasTextFrame property to determine whether a shape has a text frame, and use the HasText property to determine whether the text frame contains text.

Use the TextRange property of the Selection object to return the currently selected text. The following example copies the selection to the Clipboard.

VBA Copy code Copy code
ActiveWindow.Selection.TextRange.Copy

Use one of the following methods to return a portion of the text of a TextRange object: Characters , Lines , Paragraphs , Runs , Sentences , or Words .

Use the Find and Replace methods to find and replace text in a text range.

Use one of the following methods to insert characters into a TextRange object: InsertAfter , InsertBefore , InsertDateTime , InsertSlideNumber , or InsertSymbol .

See also

Concepts

PowerPoint Object Model Reference

Other resources

TextRange Object Members


ChartArea.ClearContents Method (PowerPoint)

 Copy code hover
[image]

ChartArea.ClearContents Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Clears the data from a chart but leaves the formatting.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ClearContents

expression A variable that represents a ChartArea object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example clears the chart data from the first chart in the active document but leaves the formatting intact.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.ChartArea.ClearContents

    End If

End With

See also

Concepts

ChartArea Object

Other resources

ChartArea Object Members


Rows.Add Method (PowerPoint)

 Copy code hover
[image]

Rows.Add Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Row object that represents a row being added to a table.

Syntax

expression .Add(BeforeRow)

expression A variable that represents a Rows object.

Parameters

Name | Required/Optional | Data Type | Description
BeforeRow | Optional | Long | The row before which the row is to be added.

Return Value

Row

See also

Concepts

Rows Object

Other resources

Rows Object Members


View.MediaControlsVisible Property (PowerPoint)

 Copy code hover
[image]

View.MediaControlsVisible Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Indicates whether the media controls are currently visible. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .MediaControlsVisible

expression A variable that represents a View object.

Return Value

MsoTriState

See also

Concepts

View Object

Other resources

View Object Members


Ruler Properties (PowerPoint)

 Copy code hover
[image]

Ruler Properties (PowerPoint)
Send feedback

Published: July 12, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Levels | Returns a RulerLevels object that represents outline indent formatting. Read-only.
Parent | Returns the parent object for the specified object.
TabStops | Returns a TabStops collection that represents the tab stops for the specified text. Read-only.


LegendKey.Application Property (PowerPoint)

 Copy code hover
[image]

LegendKey.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents a LegendKey object.

See also

Concepts

LegendKey Object

Other resources

LegendKey Object Members


LineFormat.Transparency Property (PowerPoint)

 Copy code hover
[image]

LineFormat.Transparency Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the degree of transparency of the specified fill, shadow, or line as a value between 0.0 (opaque) and 1.0 (clear). Read/write.

Syntax

expression .Transparency

expression A variable that represents a LineFormat object.

Return Value

Single

Remarks

The value of this property affects the appearance of solid-colored fills and lines only; it has no effect on the appearance of patterned lines or patterned, gradient, picture, or textured fills.

Example

This example sets the shadow for shape three on myDocument to semitransparent red. If the shape doesn't already have a shadow, this example adds one to it.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(3).Shadow

    .Visible = True

    .ForeColor.RGB = RGB(255, 0, 0)

    .Transparency = 0.5

End With

See also

Concepts

LineFormat Object

Other resources

LineFormat Object Members


PpParagraphAlignment Enumeration (PowerPoint)

 Copy code hover
[image]

PpParagraphAlignment Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the alignment for each paragraph in the specified paragraph format.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppAlignCenter | 2 | Center align
ppAlignDistribute | 5 | Distribute
ppAlignJustify | 4 | Justify
ppAlignJustifyLow | 7 | Low justify
ppAlignLeft | 1 | Left aligned
ppAlignmentMixed | -2 | Mixed alignment
ppAlignRight | 3 | Right-aligned
ppAlignThaiDistribute | 6 | Thai distributed


TabStop Properties (PowerPoint)

 Copy code hover
[image]

TabStop Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Parent | Returns the parent object for the specified object.
Position | Returns or sets the position of the specified tab stop, in points. Read/write.
Type | Represents the formatting of a tab stop. Read/write.


XlTimeUnit Enumeration (PowerPoint)

 Copy code hover
[image]

XlTimeUnit Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the unit of time for chart axes and data series.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlDays | 0 | Days
xlMonths | 1 | Months
xlYears | 2 | Years


Point.Top Property (PowerPoint)

 Copy code hover
[image]

Point.Top Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a value that represents the distance, in points, from the top edge of the object to the top edge of the chart area. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Top

expression A variable that represents a Point object.

Return Value

Double

See also

Concepts

Point Object

Other resources

Point Object Members


XlPattern Enumeration (PowerPoint)

 Copy code hover
[image]

XlPattern Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the interior pattern of a chart or interior object.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlPatternAutomatic | -4105 | Word controls the pattern.
xlPatternChecker | 9 | A checkerboard.
xlPatternCrissCross | 16 | Criss-crossed lines.
xlPatternDown | -4121 | Dark diagonal lines running from the upper left to the lower right.
xlPatternGray16 | 17 | 16% gray.
xlPatternGray25 | -4124 | 25% gray.
xlPatternGray50 | -4125 | 50% gray.
xlPatternGray75 | -4126 | 75% gray.
xlPatternGray8 | 18 | 8% gray.
xlPatternGrid | 15 | A grid.
xlPatternHorizontal | -4128 | Dark horizontal lines.
xlPatternLightDown | 13 | Light diagonal lines running from the upper left to the lower right.
xlPatternLightHorizontal | 11 | Light horizontal lines.
xlPatternLightUp | 14 | Light diagonal lines running from the lower left to the upper right.
xlPatternLightVertical | 12 | Light vertical bars.
xlPatternLinearGradient | 4000 | A linear gradient.
xlPatternNone | -4142 | No pattern.
xlPatternRectangularGradient | 4001 | A rectangular gradient.
xlPatternSemiGray75 | 10 | 75% dark moiré.
xlPatternSolid | 1 | A solid color.
xlPatternUp | -4162 | Dark diagonal lines running from the lower left to the upper right.
xlPatternVertical | -4166 | Dark vertical bars.


ShapeNode.Parent Property (PowerPoint)

 Copy code hover
[image]

ShapeNode.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a ShapeNode object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

ShapeNode Object

Other resources

ShapeNode Object Members


Master.Width Property (PowerPoint)

 Copy code hover
[image]

Master.Width Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the width of the specified object, in points. Read-only.

Syntax

expression .Width

expression A variable that represents a Master object.

Return Value

Single

Example

This example arranges windows one and two horizontally; in other words, each window occupies half the available vertical space and all the available horizontal space in the application window's client area. For this example to work, there must be only two document windows open.

VBA Copy code Copy code
Windows.Arrange ppArrangeTiled

ah = Windows(1).Height                      ' available height

aw = Windows(1).Width + Windows(2).Width    ' available width

With Windows(1)

    .Width = aw

    .Height = ah / 2

    .Left = 0

End With

With Windows(2)

    .Width = aw

    .Height = ah / 2

    .Top = ah / 2

    .Left = 0

End With

This example sets the width for column one in the specified table to 80 points (72 points per inch).

VBA Copy code Copy code
ActivePresentation.Slides(2).Shapes(5).Table.Columns(1).Width = 80

See also

Concepts

Master Object

Other resources

Master Object Members


Slide.TimeLine Property (PowerPoint)

 Copy code hover
[image]

Slide.TimeLine Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a TimeLine object that represents the animation timeline for the slide. Read-only.

Syntax

expression .TimeLine

expression A variable that represents a Slide object.

Return Value

TimeLine

Example

The following example adds a bouncing animation to the first shape on the first slide.

VBA Copy code Copy code
Sub NewTimeLineEffect()

    Dim sldFirst As Slide

    Dim shpFirst As Shape

    Set sldFirst = ActivePresentation.Slides(1)

    Set shpFirst = sldFirst.Shapes(1)

    sldFirst.TimeLine.MainSequence.AddEffect _

        Shape:=shpFirst, EffectId:=msoAnimEffectBounce

End Sub

See also

Concepts

Slide Object

Other resources

Slide Object Members


Shapes.AddMediaObject Method (PowerPoint)

 Copy code hover
[image]

Shapes.AddMediaObject Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Creates a media object. Returns a Shape object that represents the new media object.

Syntax

expression .AddMediaObject(FileName, Left, Top, Width, Height)

expression A variable that represents a Shapes object.

Parameters

Name | Required/Optional | Data Type | Description
FileName | Required | String | Required String. The file from which the media object is to be created. If the path isn't specified, the current working folder is used.
Left | Optional | Single | The position (in points) of the upper-left corner of the media object's bounding box relative to the upper-left corner of the document.
Top | Optional | Single | The position (in points) of the upper-left corner of the media object's bounding box relative to the upper-left corner of the document.
Width | Optional | Single | The width of the media object's bounding box, in points.
Height | Optional | Single | The height of the media object's bounding box, in points.

Return Value

Shape

Example

This example adds the movie named "Clock.avi" to myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes.AddMediaObject FileName:="C:\Windows\clock.avi", _

    Left:=5, Top:=5, Width:=100, Height:=100

See also

Concepts

Shapes Object

Other resources

Shapes Object Members


Timing.SmoothStart Property (PowerPoint)

 Copy code hover
[image]

Timing.SmoothStart Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether an animation should accelerate when it starts. Read/write.

Syntax

expression .SmoothStart

expression A variable that represents a Timing object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The default. The animation does not accelerate when it starts.
msoTrue | The animation accelerates when it starts.

Example

The following example adds a shape to a slide, animates the shape, and instructs the shape to accelerate when it starts.

VBA Copy code Copy code
Sub AddShapeSetTiming()

    Dim effDiamond As Effect

    Dim shpRectangle As Shape

    Set shpRectangle = ActivePresentation.Slides(1).Shapes _

        .AddShape(Type:=msoShapeRectangle, Left:=100, _

        Top:=100, Width:=50, Height:=50)

    Set effDiamond = ActivePresentation.Slides(1).TimeLine.MainSequence _

        .AddEffect(Shape:=shpRectangle, effectId:=msoAnimEffectPathDiamond)

    With effDiamond.Timing

        .Duration = 5

        .SmoothStart = msoTrue

    End With

End Sub

See also

Concepts

Timing Object

Other resources

Timing Object Members


ChartFormat.ThreeD Property (PowerPoint)

 Copy code hover
[image]

ChartFormat.ThreeD Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the 3-D-effect formatting properties for the specified chart. Read-only ThreeDFormat.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ThreeD

expression A variable that represents a ChartFormat object.

See also

Concepts

ChartFormat Object

Other resources

ChartFormat Object Members


Shape.ZOrderPosition Property (PowerPoint)

 Copy code hover
[image]

Shape.ZOrderPosition Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the position of the specified shape in the z-order. Read-only.

Syntax

expression .ZOrderPosition

expression A variable that represents a Shape object.

Return Value

Long

Remarks

Shapes(1) returns the shape at the back of the z-order, and Shapes(Shapes.Count) returns the shape at the front of the z-order.

To set the shape's position in the z-order, use the ZOrder method.

A shape's position in the z-order corresponds to the shape's index number in the Shapes collection. For example, if there are four shapes on the slide, the expression myDocument.Shapes(1) returns the shape at the back of the z-order, and the expression myDocument.Shapes(4) returns the shape at the front of the z-order.

Whenever you add a new shape to a collection, it is added to the front of the z-order by default.

Example

This example adds an oval to myDocument and then places the oval second from the back in the z-order if there is at least one other shape on the slide.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddShape(msoShapeOval, 100, 100, 100, 300)

    While .ZOrderPosition > 2

        .ZOrder msoSendBackward

    Wend

End With

See also

Concepts

Shape Object

Other resources

Shape Object Members


FullSeriesCollection Properties (PowerPoint)

 Copy code hover
[image]

FullSeriesCollection Properties (PowerPoint)
Send feedback

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Count | Returns a Long that represents the number of full series in the collection. Read-only.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
Parent | Returns the parent for the specified object. Read-only Object.


AnimationPoints.Application Property (PowerPoint)

 Copy code hover
[image]

AnimationPoints.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents an AnimationPoints object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

AnimationPoints Object

Other resources

AnimationPoints Object Members


SlideShowView.GotoNamedShow Method (PowerPoint)

 Copy code hover
[image]

SlideShowView.GotoNamedShow Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Switches to the specified custom, or named, slide show during another slide show. When the slide show advances from the current slide, the next slide displayed will be the next one in the specified custom slide show, not the next one in current slide show.

Syntax

expression .GotoNamedShow(SlideShowName)

expression A variable that represents a SlideShowView object.

Parameters

Name | Required/Optional | Data Type | Description
SlideShowName | Required | String | The name of the custom slide show to be switched to.

Example

This example redefines the slide show running in slide show window one to include only the slides in the custom slide show named "Quick Show."

VBA Copy code Copy code
SlideShowWindows(1).View.GotoNamedShow "Quick Show"

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


TextFrame.Creator Property (PowerPoint)

 Copy code hover
[image]

TextFrame.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.

Syntax

expression .Creator

expression A variable that represents a TextFrame object.

Return Value

Long

Remarks

The Creator property is designed to be used in Microsoft Office applications for the Macintosh.

Example

This example displays a message about the creator of myObject.

VBA Copy code Copy code
Set myObject = Application.ActivePresentation.Slides(1).Shapes(1)

If myObject.Creator = &h50575054 Then

    MsgBox "This is a PowerPoint object"

Else

    MsgBox "This is not a PowerPoint object"

End If

See also

Concepts

TextFrame Object

Other resources

TextFrame Object Members


DataLabel.Application Property (PowerPoint)

 Copy code hover
[image]

DataLabel.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents a DataLabel object.

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


NamedSlideShow.Application Property (PowerPoint)

 Copy code hover
[image]

NamedSlideShow.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a NamedSlideShow object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

NamedSlideShow Object

Other resources

NamedSlideShow Object Members


Axis.MinimumScaleIsAuto Property (PowerPoint)

 Copy code hover
[image]

Axis.MinimumScaleIsAuto Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if Microsoft Word calculates the minimum value for the value axis. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .MinimumScaleIsAuto

expression A variable that represents an Axis object.

Remarks

Setting the MinimumScale property sets this property to False.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example automatically calculates the minimum scale and the maximum scale for the value axis of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.Axes(xlValue)

            .MinimumScaleIsAuto = True

            .MaximumScaleIsAuto = True

        End With

    End If

End With

See also

Concepts

Axis Object

Other resources

Axis Object Members


DataLabel.ShowCategoryName Property (PowerPoint)

 Copy code hover
[image]

DataLabel.ShowCategoryName Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True to display the category name for the data labels on a chart. False to hide the category name. Read/write Boolean.

Syntax

expression .ShowCategoryName

expression A variable that represents a DataLabel object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example shows the category name for the data labels of the first series on the first chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)
    If .HasChart Then
        .Chart.SeriesCollection(1).DataLabels. _
            ShowCategoryName = True
    End If
End With

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


ColorScheme Methods (PowerPoint)

 Copy code hover
[image]

ColorScheme Methods (PowerPoint)
Send feedback

Published: July 12, 2012

This object has the following methods:

Methods

Name | Description
Colors | Returns an RGBColor object that represents a single color in a color scheme.
Delete | Deletes the specified ColorScheme object.


HiLoLines Properties (PowerPoint)

 Copy code hover
[image]

HiLoLines Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Border | Returns the border of the object. Read-only ChartBorder.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Name | Returns the name of the object. Read-only String.
Parent | Returns the parent for the specified object. Read-only Object.


Interior Properties (PowerPoint)

 Copy code hover
[image]

Interior Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Color | Returns or sets the primary color of the object. Read/write Variant.
ColorIndex | Returns or sets the color of the interior. Read/write Variant.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
InvertIfNegative | True if Microsoft Word inverts the pattern in the object when it corresponds to a negative number. Read/write Variant.
Parent | Returns the parent for the specified object. Read-only Object.
Pattern | Returns or sets a Variant value, containing an XlPattern constant, that represents the interior pattern.
PatternColor | Returns or sets the color of the interior pattern as an RGB value. Read/write Variant.
PatternColorIndex | Returns or sets the color of the interior pattern as an index into the current color palette, or as one of the following XlColorIndex constants: xlColorIndexAutomatic or xlColorIndexNone. Read/write Long.


Application.StartNewUndoEntry Method (PowerPoint)

 Copy code hover
[image]

Application.StartNewUndoEntry Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Starts a new undo entry in the Application object.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .StartNewUndoEntry

expression A variable that represents an Application object.

See also

Concepts

Application Object

Other resources

Application Object Members


PublishObjects Object (PowerPoint)

 Copy code hover
[image]

PublishObjects Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

A collection of PublishObject objects representing the set of complete or partial loaded presentations that are available for publishing to HTML.

Remarks

You can specify the content and attributes of the published presentation by setting various properties of the PublishObject object. For example, the SourceType property defines the portion of a loaded presentation to be published. The RangeStart property and the RangeEnd property specify the range of slides to publish, and the SpeakerNotes property designates whether or not to publish the speaker's notes.

You cannot add to the PublishObjects collection.

Example

Use the PublishObjects property to return the PublishObjects collection. This example publishes slides three through five of the active presentation to HTML. It names the published presentation Mallard.htm.

VBA Copy code Copy code
With ActivePresentation.PublishObjects(1)

    .FileName = "C:\Test\Mallard.htm"

    .SourceType = ppPublishSlideRange

    .RangeStart = 3

    .RangeEnd = 5

    .Publish

End With

Use Item(index), where index is always "1", to return the single PublishObject object for a loaded presentation. There can be only one PublishObject object for each loaded presentation.

This example defines the PublishObject object to be the entire active presentation by setting the SourceType property to ppPublishAll.

VBA Copy code Copy code
ActivePresentation.PublishObjects.Item(1).SourceType = ppPublishAll

See also

Concepts

PowerPoint Object Model Reference

Other resources

PublishObjects Object Members


Shapes.AddChart2 Method (PowerPoint)

 Copy code hover
[image]

Shapes.AddChart2 Method (PowerPoint)
Send feedback

Adds a chart to the document. Returns a Shape object that represents a chart and adds it to the specified collection.

Version information

Version Added: PowerPoint 2013

Syntax

expression .AddChart2(Style,Type,Left,Top,Width,Height,NewLayout)

expression A variable that represents a Shapes object.

Parameters

Name | Required/Optional | Data type | Description
Style | Optional | Integer | The chart style.
Type | Optional | XLCHARTTYPE | The type of chart.
Left | Optional | Float | The position, in points, of the left edge of the chart, relative to the anchor.
Top | Optional | Float | The position, in points, of the top edge of the chart, relative to the anchor.
Width | Optional | Float | The width, in points, of the chart.
Height | Optional | Float | The height, in points, of the chart.
NewLayout | Optional | Boolean | If NewLayout is true, the chart is inserted by using the new dynamic formatting rules (Title is on, and Legend is on only if there are multiple series).
Style | Optional | INT |
Type | Optional | <unknown |
Left | Optional | FLOAT |
Top | Optional | FLOAT |
Width | Optional | FLOAT |
Height | Optional | FLOAT |
NewLayout | Optional | BOOL |

Return value

SHAPE


Broadcast Members (PowerPoint)

 Copy code hover
[image]

Broadcast Members (PowerPoint)
Send feedback

Published: July 16, 2012

A Broadcast Documents library that is used to store documents being presented.

Methods

Name | Description
AddMeetingNotes | Adds shared meeting notes for the specified broadcast that are accessible to attendees who use either Microsoft OneNote 2013 rich client or web app.
End | Elevates to the system to delete the document from the Broadcast Documents library.
Pause | Pauses the specified broadcast.
Resume | Resumes the specified broadcast.
Start | Returns a list of supported functionality and the maximum allowed file size.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
AttendeeUrl | Provides the attendee URL that the presenter must share with remote attendees. Read-only.
Capabilities | Returns a Long that represents the capabilities of the specified broadcast. Read-only.
IsBroadcasting | Indicates whether the file is in the Broadcast Documents library. Read-only.
Parent | Returns the parent object for the specified object. Read-only.
PresenterServiceUrl | If a broadcast is in progress, returns a String that represents the URL of the presenter service hosting the broadcast. Read-only.
SessionID | If a broadcast is in progress, returns a String that specifies the ID of the session. Read-only.
State | Returns an MSOBroadcastState constant that describes the current broadcast state. Read-only.


LineFormat.DashStyle Property (PowerPoint)

 Copy code hover
[image]

LineFormat.DashStyle Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets the dash style for the specified line. Read/write.

Syntax

expression .DashStyle

expression A variable that represents a LineFormat object.

Return Value

MsoLineDashStyle

Remarks

The value of the DashStyle property can be one of these MsoLineDashStyle constants.

msoLineDash

msoLineDashDot

msoLineDashDotDot

msoLineDashStyleMixed

msoLineLongDash

msoLineLongDashDot

msoLineRoundDot

msoLineSolid

msoLineSquareDot

Example

This example adds a blue dashed line to myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddLine(10, 10, 250, 250).Line

    .DashStyle = msoLineDashDotDot

    .ForeColor.RGB = RGB(50, 0, 128)

End With

See also

Concepts

LineFormat Object

Other resources

LineFormat Object Members


Trendline.NameIsAuto Property (PowerPoint)

 Copy code hover
[image]

Trendline.NameIsAuto Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if Microsoft Word automatically determines the name of the trendline. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .NameIsAuto

expression A variable that represents a Trendline object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets Microsoft Word to automatically determine the name for trendline one of the first chart in the active document. You should run the example on a 2-D column chart that contains a single series that has a trendline.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1) _

            .Trendlines(1).NameIsAuto = True

    End If

End With

See also

Concepts

Trendline Object

Other resources

Trendline Object Members


ProtectedViewWindow.Active Property (PowerPoint)

 Copy code hover
[image]

ProtectedViewWindow.Active Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns whether the specified window is active. Read-only.

Syntax

expression .Active

expression A variable that represents a ProtectedViewWindow object.

See also

Concepts

ProtectedViewWindow Object

Other resources

ProtectedViewWindow Object Members


LineFormat.Style Property (PowerPoint)

 Copy code hover
[image]

LineFormat.Style Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the line style. Read/write.

Syntax

expression .Style

expression A variable that represents a LineFormat object.

Return Value

MsoLineStyle

Remarks

The value of the Style property can be one of these MsoLineStyle constants.

msoLineSingle

msoLineStyleMixed

msoLineThickBetweenThin

msoLineThickThin

msoLineThinThick

msoLineThinThin

Example

This example adds a thick, blue, compound line to myDocument. The compound line consists of a thick line with a thin line on either side of it.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddLine(10, 10, 250, 250).Line

    .Style = msoLineThickBetweenThin

    .Weight = 8

    .ForeColor.RGB = RGB(0, 0, 255)

End With

See also

Concepts

LineFormat Object

Other resources

LineFormat Object Members


MsoAnimDirection Enumeration (PowerPoint)

 Copy code hover
[image]

MsoAnimDirection Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the direction used for an animation effect.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
msoAnimDirectionAcross | 18 | Across
msoAnimDirectionBottom | 11 | Bottom
msoAnimDirectionBottomLeft | 15 | Bottom Left
msoAnimDirectionBottomRight | 14 | Bottom Right
msoAnimDirectionCenter | 28 | Center
msoAnimDirectionClockwise | 21 | Clockwise
msoAnimDirectionCounterclockwise | 22 | Counterclockwise
msoAnimDirectionCycleClockwise | 43 | Cycle Clockwise
msoAnimDirectionCycleCounterclockwise | 44 | Cycle Counterclockwise
msoAnimDirectionDown | 3 | Down
msoAnimDirectionDownLeft | 9 | Down Left
msoAnimDirectionDownRight | 8 | Down Right
msoAnimDirectionFontAllCaps | 40 | Text is all caps
msoAnimDirectionFontBold | 35 | Bold style is used
msoAnimDirectionFontItalic | 36 | Italic style is used
msoAnimDirectionFontShadow | 39 | Shadow style is used
msoAnimDirectionFontStrikethrough | 38 | Strikethrough style is used
msoAnimDirectionFontUnderline | 37 | Underlined style is used
msoAnimDirectionGradual | 42 | Gradual
msoAnimDirectionHorizontal | 16 | Horizontal
msoAnimDirectionHorizontalIn | 23 | Horizontal In
msoAnimDirectionHorizontalOut | 24 | Horizontal Out
msoAnimDirectionIn | 19 | In
msoAnimDirectionInBottom | 31 | In Bottom
msoAnimDirectionInCenter | 30 | In Center
msoAnimDirectionInSlightly | 29 | In Slightly
msoAnimDirectionInstant | 41 | Appears Instantly
msoAnimDirectionLeft | 4 | Appears from Left
msoAnimDirectionNone | 0 | None
msoAnimDirectionOrdinalMask | 5 | Ordinal Mask
msoAnimDirectionOut | 20 | Out
msoAnimDirectionOutBottom | 34 | Moves out from the Bottom
msoAnimDirectionOutCenter | 33 | Moves out from the Center
msoAnimDirectionOutSlightly | 32 | Slightly Out
msoAnimDirectionRight | 2 | Moves to the Right
msoAnimDirectionSlightly | 27 | Slightly
msoAnimDirectionTop | 10 | Moves to the Top
msoAnimDirectionTopLeft | 12 | Moves to the Top Left
msoAnimDirectionTopRight | 13 | Moves to the Top Right
msoAnimDirectionUp | 1 | Moves Up
msoAnimDirectionUpLeft | 6 | Moves up to the Left
msoAnimDirectionUpRight | 7 | Moves up to the Right
msoAnimDirectionVertical | 17 | Moves Vertically
msoAnimDirectionVerticalIn | 25 | Moves Vertically In
msoAnimDirectionVerticalOut | 26 | Moves Vertically Out


UpBars Object (PowerPoint)

 Copy code hover
[image]

UpBars Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the up bars in a chart group.

Version Information

Version Added: PowerPoint 2007

Remarks

Up bars connect points on series one with higher values on the last series in the chart group (the lines go up from series one). Only 2-D line groups that contain at least two series can have up bars. This object is not a collection. There is no object that represents a single up bar; you either enable up bars for all points in a chart group or you disable them.

If the HasUpDownBars property is False, most properties of the UpBars object are disabled.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

Use the UpBars property to return the UpBars object. The following example enables up and down bars for chart group one of the first chart in the active document. The example then sets the up bar color to blue and sets the down bar color to red.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.ChartGroups(1)

            .HasUpDownBars = True

            .UpBars.Interior.Color = RGB(0, 0, 255)

            .DownBars.Interior.Color = RGB(255, 0, 0)

        End With

    End If

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

UpBars Object Members


CustomLayout.Preserved Property (PowerPoint)

 Copy code hover
[image]

CustomLayout.Preserved Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the specified custom layout is preserved from changes. Read/write.

Syntax

expression .Preserved

expression A variable that represents a CustomLayout object.

Return Value

MsoTriState

See also

Concepts

CustomLayout Object

Other resources

CustomLayout Object Members


Slide.SlideIndex Property (PowerPoint)

 Copy code hover
[image]

Slide.SlideIndex Property (PowerPoint)
See also Send feedback

Returns the index number of the specified slide within the Slides collection. Read-only.

Syntax

expression .SlideIndex

expression A variable that represents a Slide object.

Return Value

Long

Remarks

Unlike the SlideID property, the SlideIndex property of a Slide object can change when you add slides to the presentation or rearrange the slides in the presentation. Therefore, using the FindBySlideID method with the slide's ID number can be a more reliable way to return a specific Slide object from a Slides collection than using the Item method with the slide's index number.

Example

This example displays the index number of the currently displayed slide in slide show window one.

VBA Copy code Copy code
MsgBox SlideShowWindows(1).View.Slide.SlideIndex

See also

Concepts

Slide Object

Other resources

Slide Object Members


PpTabStopType Enumeration (PowerPoint)

 Copy code hover
[image]

PpTabStopType Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Constants that specify the tab-stop type, passed to and returned by the Type property of the TabStop object.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppTabStopCenter | 2 | Center tab stop
ppTabStopDecimal | 4 | Decimal tab stop
ppTabStopLeft | 1 | Left tab stop
ppTabStopMixed | -2 | Mixed
ppTabStopRight | 3 | Right tab stop


Shapes.Paste Method (PowerPoint)

 Copy code hover
[image]

Shapes.Paste Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Pastes the shapes, slides, or text on the Clipboard into the specified Shapes collection, at the top of the z-order. Each pasted object becomes a member of the specified Shapes collection. If the Clipboard contains entire slides, the slides will be pasted as shapes that contain the images of the slides. If the Clipboard contains a text range, the text will be pasted into a newly created TextFrame shape. Returns a ShapeRange object that represents the pasted objects.

Syntax

expression .Paste

expression A variable that represents a Shapes object.

Return Value

ShapeRange

Remarks

Use the ViewType property to set the view for a window before pasting the Clipboard contents into it. The following table shows what you can paste into each view.

Into this view | You can paste the following from the Clipboard
Slide view or notes page view | Shapes, text, or entire slides. If you paste a slide from the Clipboard, an image of the slide will be inserted onto the slide, master, or notes page as an embedded object. If one shape is selected, the pasted text will be appended to the shape's text; if text is selected, the pasted text will replace the selection; if anything else is selected, the pasted text will be placed in it is own text frame. Pasted shapes will be added to the top of the z-order and won't replace selected shapes.
Outline view | Text or entire slides. You cannot paste shapes into outline view. A pasted slide will be inserted before the slide that contains the cursor.
Slide sorter view | Entire slides. You cannot paste shapes or text into slide sorter view. A pasted slide will be inserted at the cursor or after the last slide selected in the presentation.

Example

This example copies shape one on slide one in the active presentation to the Clipboard and then pastes it into slide two.

VBA Copy code Copy code
With ActivePresentation

    .Slides(1).Shapes(1).Copy

    .Slides(2).Shapes.Paste

End With

This example cuts the text in shape one on slide one in the active presentation, places it on the Clipboard, and then pastes it after the first word in shape two on the same slide.

VBA Copy code Copy code
With ActivePresentation.Slides(1)

    .Shapes(1).TextFrame.TextRange.Cut

    .Shapes(2).TextFrame.TextRange.Words(1).InsertAfter.Paste

End With

See also

Concepts

Shapes Object

Other resources

Shapes Object Members


ObjectVerbs.Count Property (PowerPoint)

 Copy code hover
[image]

ObjectVerbs.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents an ObjectVerbs object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

ObjectVerbs Object

Other resources

ObjectVerbs Object Members


ThreeDFormat Properties (PowerPoint)

 Copy code hover
[image]

ThreeDFormat Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
BevelBottomDepth | Returns or sets the bottom bevel height for the specified ThreeDFormat object, in points. Read/write.
BevelBottomInset | Returns or sets the bottom bevel inset for the specified ThreeDFormat object, in points. Read/write.
BevelBottomType | Returns or set the bottom bevel type. Read/write.
BevelTopDepth | Returns or sets the top bevel height for the specified ThreeDFormat object, in points. Read/write.
BevelTopInset | Returns or sets the top bevel inset for the specified ThreeDFormat object, in points. Read/write.
BevelTopType | Returns or set the top bevel type. Read/write.
ContourColor | Returns a ColorFormat object that represents the color of the specified ThreeDFormat object's contour. Read-only.
ContourWidth | Returns or sets the width of the contour around the specified ThreeDFormat object, in points. Read/write.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
Depth | Returns or sets the depth of the shape's extrusion. Read/write.
ExtrusionColor | Returns a ColorFormat object that represents the color of the shape's extrusion. Read-only.
ExtrusionColorType | Returns or sets a value that indicates whether the extrusion color is based on the extruded shape's fill (the front face of the extrusion) and automatically changes when the shape's fill changes, or whether the extrusion color is independent of the shape's fill. Read/write.
FieldOfView | Returns or sets the camera field of view for the specified ThreeDFormat object, in degrees. Read/write.
LightAngle | Sets or returns the angle at which light impacts the shape whose three-dimensional format is represented by the specified object. Read/write.
Parent | Returns the parent object for the specified object.
Perspective | Determines whether the extrusion appears in perspective. Read/write.
PresetCamera | Returns the effects camera type used by the specified ThreeDFormat object. Read-only.
PresetExtrusionDirection | Returns the direction that the extrusion's sweep path takes away from the extruded shape (the front face of the extrusion). Read-only.
PresetLighting | Returns or sets the effects lighting used by the specified ThreeDFormat object. Read/write.
PresetLightingDirection | Returns or sets the position of the light source relative to the extrusion. Read/write.
PresetLightingSoftness | Returns or sets the intensity of the extrusion lighting. Read/write.
PresetMaterial | Returns or sets the extrusion surface material. Read/write.
PresetThreeDFormat | Returns the preset extrusion format. Read-only.
ProjectText | Specifies whether text on the specified ThreeDFormat object rotates with the object. Read/write.
RotationX | Returns or sets the rotation of the extruded shape around the x-axis, in degrees. Read/write.
RotationY | Returns or sets the rotation of the extruded shape around the y-axis, in degrees. Read/write.
RotationZ | Returns or sets the rotation of the effects camera for the specified ThreeDFormat object, in degrees. Read/write.
Visible | Returns or sets the visibility of the specified object or the formatting applied to the specified object. Read/write.
Z | Returns or sets the distance the specified ThreeDFormat object is moved away from the ground plane, in points. Read/write.


Gridlines.Application Property (PowerPoint)

 Copy code hover
[image]

Gridlines.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents a GridLines object.

See also

Concepts

GridLines Object

Other resources

Gridlines Object Members


Shape.ConvertTextToSmartArt Method (PowerPoint)

 Copy code hover
[image]

Shape.ConvertTextToSmartArt Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Converts text in a Shape object to a SmartArt diagram.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .ConvertTextToSmartArt(Layout)

expression A variable that represents a Shape object.

Parameters

Name | Required/Optional | Data Type | Description
Layout | Required | [SMARTARTLAYOUT] | The SmartArt layout to convert text to.

See also

Concepts

Shape Object

Other resources

Shape Object Members


Trendlines Object (PowerPoint)

 Copy code hover
[image]

Trendlines Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a collection of all the Trendline objects for the specified series.

Version Information

Version Added: PowerPoint 2007

Remarks

Each Trendline object represents a trendline in a chart. A trendline shows the trend, or direction, of data in a series.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

Use the Trendlines method to return the Trendlines collection. The following example displays the number of trendlines for series one of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        MsgBox .Chart.SeriesCollection(1).Trendlines.Count

    End If

End With

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

Use the Add method to create a new trendline and add it to the series. The following example adds a linear trendline to the first series for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1) _

            .Trendlines.Add Type:=xlLinear, Name:="Linear Trend"

    End If

End With

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

Use Trendlines(Index), where Index is the trendline index number, to return a single TrendLine object. The following example changes the trendline type for the first series of the first chart in the active document. If the series has no trendline, this example will fail.

The index number denotes the order in which the trendlines were added to the series. Trendlines(1) is the first trendline added to the series, and Trendlines(Trendlines.Count) is the last one added.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).Trendlines(1).Type = xlMovingAvg

    End If

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

Trendlines Object Members


Chart.SeriesCollection Method (PowerPoint)

 Copy code hover
[image]

Chart.SeriesCollection Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns all the series in the chart.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .SeriesCollection(Index)

expression A variable that represents a Chart object.

Return Value

A SeriesCollection object that represents all the series in the chart.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example turns on data labels for series one of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).HasDataLabels = True

    End If

End With

See also

Concepts

Chart Object

Other resources

Chart Object Members


ChartTitle.FormulaLocal Property (PowerPoint)

 Copy code hover
[image]

ChartTitle.FormulaLocal Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the formula for the object, using A1-style references in the language of the user. Read/write String.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .FormulaLocal

expression A variable that represents a ChartTitle object.

Remarks

If the cell contains a constant, this property returns that constant. If the cell is empty, the property returns an empty string. If the cell contains a formula, the property returns the formula as a string, in the same format in which it would be displayed in the formula bar (including the equal sign).

If you set the value or formula of a cell to a date, Microsoft PowerPoint verifies whether that cell is already formatted with one of the date or time number formats. If not, the number format is changed to the default short date number format.

If the range is a one-dimensional or two-dimensional range, you can set the formula to a Visual Basic array of the same dimensions. Similarly, you can put the formula into a Visual Basic array.

Setting the formula of a multiple-cell range fills all cells in the range with the formula.

See also

Concepts

ChartTitle Object

Other resources

ChartTitle Object Members


HeaderFooter Object (PowerPoint)

 Copy code hover
[image]

HeaderFooter Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a header, footer, date and time, slide number, or page number on a slide or master. All the HeaderFooter objects for a slide or master are contained in a HeadersFooters object.

Remarks

Use one of the properties listed in the following table to return the HeaderFooter object.

Use this property | To return
DateAndTime | A HeaderFooter object that represents the date and time on the slide.
Footer | A HeaderFooter object that represents the footer for the slide.
Header | A HeaderFooter object that represents the header for the slide. This works only for notes pages and handouts, not for slides.
SlideNumber | A HeaderFooter object that represent the slide number (on a slide) or page number (on a notes page or a handout).
Note Note

HeaderFooter objects aren't available for Slide objects that represent notes pages. The HeaderFooter object that represents a header is available only for a notes master or handout master.

Example

You can set properties of HeaderFooter objects for single slides. The following example sets the footer text for slide one in the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(1).HeadersFooters.Footer.Text = "Volcano Coffee"

You can also set properties of HeaderFooter objects for the slide master, title master, notes master, or handout master to affect all slides, title slides, notes pages, or handouts and outlines at the same time. The following example sets the text for the footer in the slide master for the active presentation, sets the format for the date and time, and turns on the display of slide numbers. These settings will apply to all slides that are based on this master that display master graphics and that have not had their footer and date and time set individually.

VBA Copy code Copy code
Set mySlidesHF = ActivePresentation.SlideMaster.HeadersFooters

With mySlidesHF

    .Footer.Visible = True

    .Footer.Text = "Regional Sales"

    .SlideNumber.Visible = True

    .DateAndTime.Visible = True

    .DateAndTime.UseFormat = True

    .DateAndTime.Format = ppDateTimeMdyy

End With

To clear header and footer information that has been set for individual slides and make sure all slides display the header and information you define for the slide master, run the following code before running the previous example.

VBA Copy code Copy code
For Each s In ActivePresentation.Slides

    s.DisplayMasterShapes = True

    s.HeadersFooters.Clear

Next

See also

Concepts

PowerPoint Object Model Reference

Other resources

HeaderFooter Object Members


Slide.Background Property (PowerPoint)

 Copy code hover
[image]

Slide.Background Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a ShapeRange object that represents the slide background.

Syntax

expression .Background

expression A variable that represents a Slide object.

Return Value

ShapeRange

Remarks

If you use the Background property to set the background for an individual slide without changing the slide master, the FollowMasterBackground property for that slide must be set to False.

Example

This example sets the background of the slide master in the active presentation to a preset shade.

VBA Copy code Copy code
ActivePresentation.SlideMaster.Background.Fill.PresetGradient _

    Style:=msoGradientHorizontal, Variant:=1, _

    PresetGradientType:=msoGradientLateSunset

This example sets the background of slide one in the active presentation to a preset shade.

VBA Copy code Copy code
With ActivePresentation.Slides(1)

    .FollowMasterBackground = False

    .Background.Fill.PresetGradient Style:=msoGradientHorizontal, _

        Variant:=1, PresetGradientType:=msoGradientLateSunset

End With

See also

Concepts

Slide Object

Other resources

Slide Object Members


SlideShowSettings.NamedSlideShows Property (PowerPoint)

 Copy code hover
[image]

SlideShowSettings.NamedSlideShows Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a NamedSlideShows collection that represents all the named slide shows (custom slide shows) in the specified presentation. Read-only.

Syntax

expression .NamedSlideShows

expression A variable that represents a SlideShowSettings object.

Return Value

NamedSlideShows

Remarks

Each named slide show, or custom slide show, is a user-selected subset of the specified presentation.

Use the Add method of the NamedSlideShows object to create a named slide show.

Example

This example adds to the active presentation a named slide show "Quick Show" that contains slides 2, 7, and 9. The example then runs this slide show.

VBA Copy code Copy code
Dim qSlides(1 To 3) As Long

With ActivePresentation

    With .Slides

        qSlides(1) = .Item(2).SlideID

        qSlides(2) = .Item(7).SlideID

        qSlides(3) = .Item(9).SlideID

    End With

    With .SlideShowSettings

        .RangeType = ppShowNamedSlideShow

        .NamedSlideShows.Add "Quick Show", qSlides

        .SlideShowName = "Quick Show"

        .Run

    End With

End With

See also

Concepts

SlideShowSettings Object

Other resources

SlideShowSettings Object Members


View.MediaControlsLeft Property (PowerPoint)

 Copy code hover
[image]

View.MediaControlsLeft Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the distance, in points, from the left edge of the media control bounding box to the left edge of the slide. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .MediaControlsLeft

expression A variable that represents a View object.

Return Value

Single

See also

Concepts

View Object

Other resources

View Object Members


AutoCorrect Members (PowerPoint)

 Copy code hover
[image]

AutoCorrect Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents the AutoCorrect functionality in Microsoft PowerPoint.

Properties

Name | Description
DisplayAutoCorrectOptions | Determines whether Microsoft PowerPoint should display the AutoCorrect Options button. Read/write.
DisplayAutoLayoutOptions | Determines whether Microsoft PowerPoint should display the AutoLayout Options button. Read/write.


AxisTitle.Characters Property (PowerPoint)

 Copy code hover
[image]

AxisTitle.Characters Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a ChartCharacters object that represents a range of characters within the object text. You can use the ChartCharacters object to format characters within a text string.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Characters(Start, Length)

expression A variable that represents an AxisTitle object.

Parameters

Name | Required/Optional | Data Type | Description
Start | Optional | Variant | The first character to be returned. If this argument is either 1 or omitted, this property returns a range of characters starting with the first character.
Length | Optional | Variant | The number of characters to be returned. If this argument is omitted, this property returns the remainder of the string (everything after the Start character).

Remarks

The ChartCharacters object is not a collection.

See also

Concepts

AxisTitle Object

Other resources

AxisTitle Object Members


ParagraphFormat.SpaceAfter Property (PowerPoint)

 Copy code hover
[image]

ParagraphFormat.SpaceAfter Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the amount of space after the last line in each paragraph of the specified text, in points or lines. Read/write.

Syntax

expression .SpaceAfter

expression A variable that represents a ParagraphFormat object.

Return Value

Single

Example

This example sets the spacing after paragraphs to 6 points for the text in shape two on slide one in the active presentation.

VBA Copy code Copy code
With Application.ActivePresentation.Slides(1).Shapes(2)

    With .TextFrame.TextRange.ParagraphFormat

        .LineRuleAfter = False

        .SpaceAfter = 6

    End With

End With

See also

Concepts

ParagraphFormat Object

Other resources

ParagraphFormat Object Members


ExtraColors.Parent Property (PowerPoint)

 Copy code hover
[image]

ExtraColors.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents an ExtraColors object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

ExtraColors Object

Other resources

ExtraColors Object Members


Shape.BackgroundStyle Property (PowerPoint)

 Copy code hover
[image]

Shape.BackgroundStyle Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns the background style of the specified object. Read/write.

Syntax

expression .BackgroundStyle

expression An expression that returns a Shape object.

Remarks

The value of the BackgroundStyle property can be one of the MsoBackgroundStyleIndex constants.

See also

Concepts

Shape Object

Other resources

Shape Object Members


Application.ColorSchemeChanged Event (PowerPoint)

 Copy code hover
[image]

Application.ColorSchemeChanged Event (PowerPoint)
See also Send feedback

Published: July 12, 2012

Occurs after a color scheme is changed.

Syntax

expression .ColorSchemeChanged(SldRange)

expression A variable that represents an Application object.

Parameters

Name | Required/Optional | Data Type | Description
SldRange | Required | SlideRange | The range of slides affected by the change.

Remarks

Actions which trigger this event would include actions such as modifying a slide's or slide master's color scheme, or applying a template.

To access the Application events, declare an Application variable in the General Declarations section of your code. Then set the variable equal to the Application object for which you want to access events. For information about using events with the Microsoft PowerPoint Application object, see How to: Use Events with the Application Object.

Example

This example displays a message when the color scheme for the selected slide or slides is changed. This example assumes an Application object called PPTApp has been declared by using the WithEvents keyword.

VBA Copy code Copy code
Private Sub PPTApp_ColorSchemeChanged(ByVal SldRange As SlideRange)

    If SldRange.Count = 1 Then

        MsgBox "You've changed the color scheme for " _

            & SldRange.Name & "."

    Else

        MsgBox "You've changed the color scheme for " _

            & SldRange.Count & " slides."

    End If

End Sub

See also

Concepts

Application Object

Other resources

Application Object Members


Interior Object (PowerPoint)

 Copy code hover
[image]

Interior Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the interior of an object.

Version Information

Version Added: PowerPoint 2007

See also

Concepts

PowerPoint Object Model Reference

Other resources

Interior Object Members


PpAfterEffect Enumeration (PowerPoint)

 Copy code hover
[image]

PpAfterEffect Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Indicates whether the specified shape appears dimmed, hidden, or unchanged after it is built.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppAfterEffectDim | 2 | Appears dimmed
ppAfterEffectHide | 1 | Hides
ppAfterEffectHideOnClick | 3 | Hidden when clicked
ppAfterEffectMixed | -2 | Mixed effect
ppAfterEffectNothing | 0 | No effect


ExtraColors Properties (PowerPoint)

 Copy code hover
[image]

ExtraColors Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


AddIn.Loaded Property (PowerPoint)

 Copy code hover
[image]

AddIn.Loaded Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the specified add-in is loaded. Read/write.

Syntax

expression .Loaded

expression A variable that represents an AddIn object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | TThe specified add-in is not loaded.
msoTrue | The specified add-in is loaded.

Example

This example adds MyTools.ppa to the list in the Add-Ins tab and then loads it.

VBA Copy code Copy code
Addins.Add("c:\my documents\mytools.ppa").Loaded = msoTrue

This example unloads the add-in named "MyTools."

VBA Copy code Copy code
Application.Addins("mytools").Loaded = msoFalse

See also

Concepts

AddIn Object

Other resources

AddIn Object Members


Application.PresentationBeforeClose Event (PowerPoint)

 Copy code hover
[image]

Application.PresentationBeforeClose Event (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a Presentation object before it closes.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .PresentationBeforeClose(Pres, Cancel)

expression A variable that represents an Application object.

Parameters

Name | Required/Optional | Data Type | Description
Pres | Required | Presentation | The Presentation object.
Cancel | Required | Boolean | If set to True, the presentation will not close.

Return Value

Nothing

See also

Concepts

Application Object

Other resources

Application Object Members


ColorSchemes.Application Property (PowerPoint)

 Copy code hover
[image]

ColorSchemes.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a ColorSchemes object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

ColorSchemes Object

Other resources

ColorSchemes Object Members


Application.Visible Property (PowerPoint)

 Copy code hover
[image]

Application.Visible Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the visibility of the specified object or the formatting applied to the specified object. Read/write.

Syntax

expression .Visible

expression A variable that represents an Application object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified object or object formatting is not visible.
msoTrue | The specified object or object formatting is visible.

See also

Concepts

Application Object

Other resources

Application Object Members


Timing.RepeatDuration Property (PowerPoint)

 Copy code hover
[image]

Timing.RepeatDuration Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Sets or returns how long repeated animations should last, in seconds. Read/write.

Syntax

expression .RepeatDuration

expression A variable that represents a Timing object.

Return Value

Single

Remarks

An animation will stop at the end of its time sequence or the value of the RepeatDuration property, whichever is shorter.

Example

This examples adds a shape and an animation to it, then repeats the animation ten times. However, after five seconds, the animation will be cut off, even though the animation is dimensioned for a 20-second timeline (if the Duration property is not specified, an animation defaults to two seconds).

VBA Copy code Copy code
Sub AddShapeSetTiming()

    Dim effDiamond As Effect

    Dim shpRectangle As Shape

    'Adds new shape and sets animation effect

    Set shpRectangle = ActivePresentation.Slides(1).Shapes _

        .AddShape(Type:=msoShapeRectangle, Left:=100, _

        Top:=100, Width:=50, Height:=50)

    Set effDiamond = ActivePresentation.Slides(1).TimeLine.MainSequence _

        .AddEffect(Shape:=shpRectangle, effectId:=msoAnimEffectPathDiamond)

    'Sets repeat duration and number of times to repeat animation

    With effDiamond.Timing

        .RepeatDuration = 5

        .RepeatCount = 10

    End With

End Sub

See also

Concepts

Timing Object

Other resources

Timing Object Members


BulletFormat Object (PowerPoint)

 Copy code hover
[image]

BulletFormat Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents bullet formatting.

Example

Use the Bullet property to return the BulletFormat object. The following example sets the bullet size and color for the paragraphs in shape two on slide one in the active presentation.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(2)

    With .TextFrame.TextRange.ParagraphFormat.Bullet

        .Visible = True

        .RelativeSize = 1.25

        .Character = 169

        With .Font

            .Color.RGB = RGB(255, 255, 0)

            .Name = "Symbol"

        End With

    End With

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

BulletFormat Object Members


ThemeVariants.Count Property (PowerPoint)

 Copy code hover
[image]

ThemeVariants.Count Property (PowerPoint)
Send feedback

Returns the number of objects in the specified collection. Read-only.

Version information

Version Added: PowerPoint 2013

Syntax

expression .Count

expression A variable that represents a ThemeVariants object.

Property value

INT32


ThreeDFormat.RotationX Property (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.RotationX Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the rotation of the extruded shape around the x-axis, in degrees. Read/write.

Syntax

expression .RotationX

expression A variable that represents a ThreeDFormat object.

Return Value

Single

Remarks

Can be a value from - 90 through 90. A positive value indicates upward rotation; a negative value indicates downward rotation.

To set the rotation of the extruded shape around the y-axis, use the RotationY property of the ThreeDFormat object.

To set the rotation of the extruded shape around the z-axis, use the Rotation property of the Shape object.

To change the direction of the extrusion's sweep path without rotating the front face of the extrusion, use the SetExtrusionDirection method.

Example

This example adds three identical extruded ovals to myDocument and sets their rotation around the x-axis to - 30, 0, and 30 degrees, respectively.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    With .AddShape(msoShapeOval, 30, 60, 50, 25).ThreeD

        .Visible = True

        .RotationX = -30

    End With

    With .AddShape(msoShapeOval, 90, 60, 50, 25).ThreeD

        .Visible = True

        .RotationX = 0

    End With

    With .AddShape(msoShapeOval, 150, 60, 50, 25).ThreeD

        .Visible = True

        .RotationX = 30

    End With

End With

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


DataLabels.ReadingOrder Property (PowerPoint)

 Copy code hover
[image]

DataLabels.ReadingOrder Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets an XlReadingOrder constant that represents the reading order for the specified object. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ReadingOrder

expression A variable that represents a DataLabels object.

See also

Concepts

DataLabels Object

Other resources

DataLabels Object Members


Slide.Select Method (PowerPoint)

 Copy code hover
[image]

Slide.Select Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Selects the specified object.

Syntax

expression .Select

expression A variable that represents a Slide object.

Remarks

If you try to make a selection that isn't appropriate for the view, your code will fail. For example, you can select a slide in slide sorter view but not in slide view.

Example

This example selects the first five characters in the title of slide one in the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(1).Shapes.Title.TextFrame _

    .TextRange.Characters(1, 5).Select

This example selects slide one in the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(1).Select

This example selects a table that has been added to a new slide in a new presentation. The table has three rows and three columns.

VBA Copy code Copy code
With Presentations.Add.Slides

    .Add(1, ppLayoutBlank).Shapes.AddTable(3, 3).Select

End With

See also

Concepts

Slide Object

Other resources

Slide Object Members


GroupShapes.Item Method (PowerPoint)

 Copy code hover
[image]

GroupShapes.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single Shape object from the specified GroupShapes collection.

Syntax

expression .Item(Index)

expression A variable that represents a GroupShapes object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Variant | The name or index number of the singleShape object in the collection to be returned.

Return Value

Shape

See also

Concepts

GroupShapes Object

Other resources

GroupShapes Object Members


ShapeRange.TextEffect Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.TextEffect Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a TextEffectFormat object that contains text-effect formatting properties for the specified shape. Read-only.

Syntax

expression .TextEffect

expression A variable that represents a ShapeRange object.

Return Value

TextEffectFormat

Remarks

Applies to ShapeRange objects that represent WordArt.

Example

This example sets the font style to bold for shape three on myDocument if the shape is WordArt.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(3)

    If .Type = msoTextEffect Then

        .TextEffect.FontBold = True

    End If

End With

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


ChartGroups Properties (PowerPoint)

 Copy code hover
[image]

ChartGroups Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Count | Returns the number of objects in the collection. Read-only Long.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Parent | Returns the parent for the specified object. Read-only Object.


Application.ProtectedViewWindowBeforeEdit Event (PowerPoint)

 Copy code hover
[image]

Application.ProtectedViewWindowBeforeEdit Event (PowerPoint)
See also Send feedback

Published: July 12, 2012

Occurs immediately before editing is enabled on the document in the specified protected view window.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .ProtectedViewWindowBeforeEdit(ProtViewWindow, Cancel)

expression A variable that represents an Application object.

Parameters

Name | Required/Optional | Data Type | Description
ProtViewWindow | Required | ProtectedViewWindow | The protected view window that contains the document that is enabled for editing.
Cancel | Required | Boolean | False when the event occurs. If the event procedure sets this argument to True, editing is not enabled on the document.

Return Value

Nothing

See also

Concepts

Application Object

Other resources

Application Object Members


Presentation.ChartDataPointTrack Property (PowerPoint)

 Copy code hover
[image]

Presentation.ChartDataPointTrack Property (PowerPoint)
Send feedback

Returns or sets a Boolean that specifies whether charts use cell-reference data-point tracking. Read-write.

Version information

Version Added: PowerPoint 2013

Syntax

expression .ChartDataPointTrack

expression A variable that represents a Presentation object.

Property value

BOOL


ChartGroup.HasSeriesLines Property (PowerPoint)

 Copy code hover
[image]

ChartGroup.HasSeriesLines Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if a stacked column chart or bar chart has series lines or if a pie-of-pie chart or bar-of-pie chart has connector lines between the two sections. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .HasSeriesLines

expression A variable that represents a ChartGroup object.

Remarks

This property applies only to 2-D stacked bar, 2-D stacked column, pie-of-pie, or bar-of-pie charts.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example enables series lines for chart group one of the first chart in the active document and then sets their line style, weight, and color. You should run the example on a 2-D stacked column chart that has two or more series.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.ChartGroups(1)

            .HasSeriesLines = True

            With .SeriesLines.Border

                .LineStyle = xlThin

                .Weight = xlMedium

                .ColorIndex = 3

            End With

        End With

    End If

End With

See also

Concepts

ChartGroup Object

Other resources

ChartGroup Object Members


ThreeDFormat Members (PowerPoint)

 Copy code hover
[image]

ThreeDFormat Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a shape's three-dimensional formatting.

Methods

Name | Description
IncrementRotationHorizontal | Rotates the ThreeDFormat object along the horizontal axis by the specified number of degrees.
IncrementRotationVertical | Rotates the ThreeDFormat object along the vertical axis by the specified number of degrees.
IncrementRotationX | Changes the rotation of the specified shape around the x-axis by the specified number of degrees.
IncrementRotationY | Changes the rotation of the specified shape around the y-axis by the specified number of degrees.
IncrementRotationZ | Rotates the ThreeDFormat object around the ground plane by the specified number of degrees.
ResetRotation | Resets the extrusion rotation around the x-axis and the y-axis to 0 (zero) so that the front of the extrusion faces forward. This method doesn't reset the rotation around the z-axis.
SetExtrusionDirection | Sets the direction that the extrusion's sweep path takes away from the extruded shape.
SetPresetCamera | Specifies the effects camera type and rotation to use for the specified ThreeDFormat object.
SetThreeDFormat | Sets the preset extrusion format.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
BevelBottomDepth | Returns or sets the bottom bevel height for the specified ThreeDFormat object, in points. Read/write.
BevelBottomInset | Returns or sets the bottom bevel inset for the specified ThreeDFormat object, in points. Read/write.
BevelBottomType | Returns or set the bottom bevel type. Read/write.
BevelTopDepth | Returns or sets the top bevel height for the specified ThreeDFormat object, in points. Read/write.
BevelTopInset | Returns or sets the top bevel inset for the specified ThreeDFormat object, in points. Read/write.
BevelTopType | Returns or set the top bevel type. Read/write.
ContourColor | Returns a ColorFormat object that represents the color of the specified ThreeDFormat object's contour. Read-only.
ContourWidth | Returns or sets the width of the contour around the specified ThreeDFormat object, in points. Read/write.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
Depth | Returns or sets the depth of the shape's extrusion. Read/write.
ExtrusionColor | Returns a ColorFormat object that represents the color of the shape's extrusion. Read-only.
ExtrusionColorType | Returns or sets a value that indicates whether the extrusion color is based on the extruded shape's fill (the front face of the extrusion) and automatically changes when the shape's fill changes, or whether the extrusion color is independent of the shape's fill. Read/write.
FieldOfView | Returns or sets the camera field of view for the specified ThreeDFormat object, in degrees. Read/write.
LightAngle | Sets or returns the angle at which light impacts the shape whose three-dimensional format is represented by the specified object. Read/write.
Parent | Returns the parent object for the specified object.
Perspective | Determines whether the extrusion appears in perspective. Read/write.
PresetCamera | Returns the effects camera type used by the specified ThreeDFormat object. Read-only.
PresetExtrusionDirection | Returns the direction that the extrusion's sweep path takes away from the extruded shape (the front face of the extrusion). Read-only.
PresetLighting | Returns or sets the effects lighting used by the specified ThreeDFormat object. Read/write.
PresetLightingDirection | Returns or sets the position of the light source relative to the extrusion. Read/write.
PresetLightingSoftness | Returns or sets the intensity of the extrusion lighting. Read/write.
PresetMaterial | Returns or sets the extrusion surface material. Read/write.
PresetThreeDFormat | Returns the preset extrusion format. Read-only.
ProjectText | Specifies whether text on the specified ThreeDFormat object rotates with the object. Read/write.
RotationX | Returns or sets the rotation of the extruded shape around the x-axis, in degrees. Read/write.
RotationY | Returns or sets the rotation of the extruded shape around the y-axis, in degrees. Read/write.
RotationZ | Returns or sets the rotation of the effects camera for the specified ThreeDFormat object, in degrees. Read/write.
Visible | Returns or sets the visibility of the specified object or the formatting applied to the specified object. Read/write.
Z | Returns or sets the distance the specified ThreeDFormat object is moved away from the ground plane, in points. Read/write.


Timing Members (PowerPoint)

 Copy code hover
[image]

Timing Members (PowerPoint)
Send feedback

Published: July 12, 2012

Represents timing properties for an animation effect.

Properties

Name | Description
Accelerate | Returns or sets the percentage of the duration over which a timing acceleration should take place. Read/write.
Application | Returns an Application object that represents the creator of the specified object.
AutoReverse | Determines whether an effect should play forward and then in reverse, thereby doubling its duration. Read/write.
BounceEnd | Read/write
BounceEndIntensity | Read/write
Decelerate | Sets or returns the percentageof the duration over which a timing deceleration should take place. Read/write.
Duration | Returns or sets the length of an animation in seconds. Read/write.
Parent | Returns the parent object for the specified object.
RepeatCount | Sets or returns the number of times to repeat an animation. Read/write.
RepeatDuration | Sets or returns how long repeated animations should last, in seconds. Read/write.
Restart | Represents whether the animation effect restarts after the effect has started once. Read/write.
RewindAtEnd | Represents whether an object returns to its beginning position after an animation has ended. Read/write.
SmoothEnd | Determines whether an animation should decelerate as it ends. Read/write.
SmoothStart | Determines whether an animation should accelerate when it starts. Read/write.
Speed | Returns or sets the speed, in seconds, of the specified animation. Read/write.
TriggerBookmark | Read/write
TriggerDelayTime | Sets or returns the delay, in seconds, from when an animation trigger is enabled. Read/write.
TriggerShape | Sets or returns a Shape object that represents the shape associated with an animation trigger. Read/write.
TriggerType | Represents the trigger that starts an animation. Read/write.


Trendline Properties (PowerPoint)

 Copy code hover
[image]

Trendline Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Backward2 | Returns or sets the number of periods (or units on a scatter chart) that the trendline extends backward. Read/write Double.
Border | Returns the border of the object. Read-only ChartBorder.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
DataLabel | Returns the data label that is associated with the trendline. Read-only DataLabel.
DisplayEquation | True if the equation for the trendline is displayed on the chart (in the same data label as the R-squared value). Read/write Boolean.
DisplayRSquared | True if the R-squared value of the trendline is displayed on the chart (in the same data label as the equation). Read/write Boolean.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Forward2 | Returns or sets the number of periods (or units on a scatter chart) that the trendline extends forward. Read/write Double.
Index | Returns the index number of the object within the collection of similar objects. Read-only Long.
Intercept | Returns or sets the point where the trendline crosses the value axis. Read/write Double.
InterceptIsAuto | True if the point where the trendline crosses the value axis is automatically determined by the regression. Read/write Boolean.
Name | Returns or sets name of the object. Read/write String.
NameIsAuto | True if Microsoft Word automatically determines the name of the trendline. Read/write Boolean.
Order | Returns or sets the trendline order (an integer greater than 1) when the trendline type is xlPolynomial. Read/write Long.
Parent | Returns the parent for the specified object. Read-only Object.
Period | Returns or sets the period for the moving-average trendline. Read/write Long.
Type | Returns or sets the trendline type. Read/write XlTrendlineType.


BulletFormat.UseTextFont Property (PowerPoint)

 Copy code hover
[image]

BulletFormat.UseTextFont Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Determines whether the specified bullets are set to the font of the first text character in the paragraph. Read/write.

Syntax

expression .UseTextFont

expression A variable that represents an BulletFormat object.

Return Value

MsoTriState

Remarks

You cannot explicitly set this property to msoFalse. Setting the bullet format font (by using the Name property of the Font object) sets this property to msoFalse. When UseTextFont is msoFalse, you can set it to msoTrue to reset the bullet format to the default font.

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

Constant | Description
msoFalse | The specified bullets are set to a custom font.
msoTrue | The specified bullets are set to the font of the first text character in the paragraph..

Example

This example resets bullets in shape two on slide one in the active presentation to their default character, font, and color.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(2)

    With .TextFrame.TextRange.ParagraphFormat.Bullet

        .RelativeSize = 1

        .UseTextColor = msoTrue

        .UseTextFont = msoTrue

        .Character = 8226

    End With

End With

See also

Concepts

BulletFormat Object

Other resources

BulletFormat Object Members


SlideRange.Shapes Property (PowerPoint)

 Copy code hover
[image]

SlideRange.Shapes Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Shapes collection that represents all the elements that have been placed or inserted on the specified slide, slide master, or range of slides. Read-only.

Syntax

expression .Shapes

expression A variable that represents a SlideRange object.

Return Value

Shapes

Remarks

The Shapes collection returned can contain the drawings, shapes, OLE objects, pictures, text objects, titles, headers, footers, slide numbers, and date and time objects on a slide, or on the slide image on a notes page.

Example

This example adds a rectangle that's 100 points wide and 50 points high, and whose upper-left corner is 5 points from the left edge of slide one in the active presentation and 25 points from the top of the slide.

VBA Copy code Copy code
Set firstSlide = ActivePresentation.Slides(1)

firstSlide.Shapes.AddShape msoShapeRectangle, 5, 25, 100, 50

This example sets the fill texture for shape three on slide one in the active presentation.

VBA Copy code Copy code
Set newRect = ActivePresentation.Slides(1).Shapes(3)

newRect.Fill.PresetTextured msoTextureOak

Assuming that slide one in the active presentation contains a title, both the second and third lines of code in the following example set the title text on slide one in the presentation.

VBA Copy code Copy code
Set firstSl = ActivePresentation.Slides(1)

firstSl.Shapes.Title.TextFrame.TextRange.Text = "Some title text"

firstSl.Shapes(1).TextFrame.TextRange.Text = "Other title text"

Assuming that shape two on slide two in the active presentation contains a text frame, the following example adds a series of paragraphs to the slide. Note that Chr(13) is used to insert paragraph marks within the text.

VBA Copy code Copy code
Set tShape = ActivePresentation.Slides(2).Shapes(2)

tShape.TextFrame.TextRange.Text = "First Item" & Chr(13) & _

    "Second Item" & Chr(13) & "Third Item"

For most slide layouts, the first shapes on the slide are text placeholders, and the following example accomplishes the same task as the preceding example.

VBA Copy code Copy code
Set testShape = ActivePresentation.Slides(2).Shapes.Placeholders(2)

testShape.TextFrame.TextRange.Text = "First Item" & _

    Chr(13) & "Second Item" & Chr(13) & "Third Item"

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


Tags.Value Method (PowerPoint)

 Copy code hover
[image]

Tags.Value Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the value of the specified tag as a String.

Syntax

expression .Value(Index)

expression A variable that represents a Tags object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Long | The tag number.

Return Value

String

Example

This example displays the name and value for each tag associated with slide one in the active presentation.

VBA Copy code Copy code
With Application.ActivePresentation.Slides(1).Tags

    For i = 1 To .Count

        MsgBox "Tag #" & i & ": Name = " & .Name(i)

        MsgBox "Tag #" & i & ": Value = " & .Value(i)

    Next

End With

This example searches through the tags for each slide in the active presentation. If there's a tag named "PRIORITY," a message box displays the tag value. If there isn't a tag named "PRIORITY," the example adds this tag that has the value "Unknown."

VBA Copy code Copy code
For Each s In Application.ActivePresentation.Slides

    With s.Tags

        found = False

        For i = 1 To .Count

            If .Name(i) = "PRIORITY" Then

                found = True

                slNum = .Parent.SlideIndex

                MsgBox "Slide " & slNum & " priority: " & .Value(i)

            End If

        Next

        If Not found Then

            slNum = .Parent.SlideIndex

            .Add "Name", "New Figures"

            .Add "Priority", "Unknown"

            MsgBox "Slide " & slNum & _

               " priority tag added: Unknown"

        End If

    End With

Next

See also

Concepts

Tags Object

Other resources

Tags Object Members


Master.Theme Property (PowerPoint)

 Copy code hover
[image]

Master.Theme Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Theme object that represents the theme used by the specified slide master, title master, handout master, notes master, or design master. Read-only.

Syntax

expression .Theme

expression A variable that represents a Master object.

Return Value

Theme

See also

Concepts

Master Object

Other resources

Master Object Members


ShapeRange.IncrementLeft Method (PowerPoint)

 Copy code hover
[image]

ShapeRange.IncrementLeft Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Moves the specified shape range horizontally by the specified number of points.

Syntax

expression .IncrementLeft(Increment)

expression A variable that represents a ShapeRange object.

Parameters

Name | Required/Optional | Data Type | Description
Increment | Required | Single | Specifies how far the shape range is to be moved horizontally, in points. A positive value moves the shape range to the right; a negative value moves it to the left.

Example

This example duplicates shape one on myDocument, sets the fill for the duplicate, moves it 70 points to the right and 50 points up, and rotates it 30 degrees clockwise.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(1).Duplicate

    .Fill.PresetTextured msoTextureGranite

    .IncrementLeft 70

    .IncrementTop -50

    .IncrementRotation 30

End With

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


Slide.NotesPage Property (PowerPoint)

 Copy code hover
[image]

Slide.NotesPage Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a SlideRange object that represents the notes pages for the specified slide or range of slides. Read-only.

Syntax

expression .NotesPage

expression A variable that represents a Slide object.

Return Value

SlideRange

Remarks

The NotesPage property returns the notes page for either a single slide or a range of slides and allows you to make changes only to those notes pages. If you want to make changes that affect all notes pages, use the NotesMaster property to return the Slide object that represents the notes master.

Example

This example sets the background fill for the notes page for slide one in the active presentation.

VBA Copy code Copy code
With ActivePresentation.Slides(1). NotesPage
    .FollowMasterBackground = False
    .Background.Fill.PresetGradient _
        msoGradientHorizontal, 1, msoGradientLateSunset
End With
Note Note

The following properties and methods will fail if applied to a SlideRange object that represents a notes page: Copy method, Cut method, Delete method, Duplicate method, HeadersFooters property, Hyperlinks property, Layout property, PrintSteps property, SlideShowTransition property.

See also

Concepts

Slide Object

Other resources

Slide Object Members


PpPrintRangeType Enumeration (PowerPoint)

 Copy code hover
[image]

PpPrintRangeType Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the type of print range for the presentation.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppPrintAll | 1 | Print all slides in the presentation.
ppPrintCurrent | 3 | Print the current slide from the presentation.
ppPrintNamedSlideShow | 5 | Print a named slideshow.
ppPrintSelection | 2 | Print a selection of slides.
ppPrintSlideRange | 4 | Print a range of slides.


SlideShowSettings.Parent Property (PowerPoint)

 Copy code hover
[image]

SlideShowSettings.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a SlideShowSettings object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

SlideShowSettings Object

Other resources

SlideShowSettings Object Members


ShapeNodes.SetPosition Method (PowerPoint)

 Copy code hover
[image]

ShapeNodes.SetPosition Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets the location of the node specified by Index. Note that, depending on the editing type of the node, this method may affect the position of adjacent nodes.

Syntax

expression .SetPosition(Index, X1, Y1)

expression A variable that represents a ShapeNodes object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Long | The node whose position is to be set.
Y1 | Required | Single | The x-position (in points) of the new node relative to the upper-left corner of the document.
Y1 | Required | Single | The y-position (in points) of the new node relative to the upper-left corner of the document.

Example

This example moves node two in shape three on myDocument to the right 200 points and down 300 points. Shape three must be a freeform drawing.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(3).Nodes

    pointsArray = .Item(2).Points

    currXvalue = pointsArray(1, 1)

    currYvalue = pointsArray(1, 2)

    .SetPosition 2, currXvalue + 200, currYvalue + 300

End With

See also

Concepts

ShapeNodes Object

Other resources

ShapeNodes Object Members


ShapeNodes.SetSegmentType Method (PowerPoint)

 Copy code hover
[image]

ShapeNodes.SetSegmentType Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets the segment type of the segment that follows the specified node.

Syntax

expression .SetSegmentType(Index, SegmentType)

expression A variable that represents a ShapeNodes object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Long | The node whose segment type is to be set.
SegmentType | Required | MsoSegmentType | Specifies if the segment is straight or curved.

Remarks

If the node specified by Index is a control point for a curved segment, this method sets the segment type for that curve. Note that this may affect the total number of nodes by inserting or deleting adjacent nodes.

The SegmentType parameter value can be one of these MsoSegmentType constants.

msoSegmentCurve

msoSegmentLine

Example

This example changes all straight segments to curved segments in shape three on myDocument. Shape three must be a freeform drawing.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(3).Nodes

    n = 1

    While n <= .Count

        If .Item(n).SegmentType = msoSegmentLine Then

            .SetSegmentType n, msoSegmentCurve

        End If

        n = n + 1

    Wend

End With

See also

Concepts

ShapeNodes Object

Other resources

ShapeNodes Object Members


Axis.AxisBetweenCategories Property (PowerPoint)

 Copy code hover
[image]

Axis.AxisBetweenCategories Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if the value axis crosses the category axis between categories. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .AxisBetweenCategories

expression A variable that represents an Axis object.

Remarks

This property applies only to category axes, and it does not apply to 3-D charts.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example causes the value axis for the first chart in the active document to cross the category axis between categories.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.Axes(xlCategory). _

            AxisBetweenCategories = True

    End If

End With

See also

Concepts

Axis Object

Other resources

Axis Object Members


AnimationSettings.TextLevelEffect Property (PowerPoint)

 Copy code hover
[image]

AnimationSettings.TextLevelEffect Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Indicates whether the text in the specified shape is animated by first-level paragraphs, second-level paragraphs, or some other level of paragraphs (up to fifth-level paragraphs). Read/write.

Syntax

expression .TextLevelEffect

expression A variable that represents a AnimationSettings object.

Return Value

PpTextLevelEffect

Remarks

For the TextLevelEffect property setting to take effect, the Animate property must be set to True.

The value of the TextLevelEffect property can be one of these PpTextLevelEffect constants.

ppAnimateByAllLevels

ppAnimateByFifthLevel

ppAnimateByFirstLevel

ppAnimateByFourthLevel

ppAnimateBySecondLevel

ppAnimateByThirdLevel

ppAnimateLevelMixed

ppAnimateLevelNone

Example

This example adds a title slide and title text to the active presentation and sets the title to be built letter by letter.

VBA Copy code Copy code
With ActivePresentation.Slides.Add(1, ppLayoutTitleOnly).Shapes(1)

    .TextFrame.TextRange.Text = "Sample title"

    With .AnimationSettings

        .Animate = True

        .TextLevelEffect = ppAnimateByFirstLevel

        .TextUnitEffect = ppAnimateByCharacter

        .EntryEffect = ppEffectFlyFromLeft

    End With

End With

See also

Concepts

AnimationSettings Object

Other resources

AnimationSettings Object Members


ProtectedViewWindow Properties (PowerPoint)

 Copy code hover
[image]

ProtectedViewWindow Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Active | Returns whether the specified window is active. Read-only.
Application | Returns an Application object that represents the creator of the specified object.
Caption | Returns the text that appears in the title bar of the specified window. Read-only.
Height | Returns or sets the height of the specified object, in points. Read/write.
Left | Returns or sets the distance in points from the left edge of the specified window to the left edge of the application window's client area. Read/write.
Parent | Returns the parent object for the specified object. Read-only.
Presentation | Returns a Presentation object that represents the presentation in which the specified window was created. Read-only.
SourceName | Returns the source name of the current ProtectedViewWindow object. Read-only.
SourcePath | Returns the source path of the current ProtectedViewWindow object. Read-only.
Top | Returns or sets the distance in points from the top edge of the specified window to the top edge of the application window's client area. Read/write.
Width | Returns or sets the width of the specified object, in points. Read/write.
WindowState | Returns or sets the state of the specified window. Read/write.


TextRange.Lines Method (PowerPoint)

 Copy code hover
[image]

TextRange.Lines Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a TextRange object that represents the specified subset of text lines. For information about counting or looping through the lines in a text range, see the TextRange object.

Syntax

expression .Lines(Start, Length)

expression A variable that represents a TextRange object.

Parameters

Name | Required/Optional | Data Type | Description
Start | Optional | Long | The first line in the returned range.
Length | Optional | Long | The number of lines to be returned.

Return Value

TextRange

Remarks

If both Start and Length are omitted, the returned range starts with the first line and ends with the last paragraph in the specified range.

If Start is specified but Length is omitted, the returned range contains one line.

If Length is specified but Start is omitted, the returned range starts with the first line in the specified range.

If Start is greater than the number of lines in the specified text, the returned range starts with the last line in the specified range.

If Length is greater than the number of lines from the specified starting line to the end of the text, the returned range contains all those lines.

Example

This example formats as italic the first two lines of the second paragraph in shape two on slide one in the active presentation.

VBA Copy code Copy code
Application.ActivePresentation.Slides(1).Shapes(2) _

    .TextFrame.TextRange.Paragraphs(2) _

    .Lines(1, 2).Font.Italic = True

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


PictureFormat.Crop Property (PowerPoint)

 Copy code hover
[image]

PictureFormat.Crop Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the number of points that are cropped off the specified picture or OLE object. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Crop

expression A variable that represents a PictureFormat object.

Return Value

Single

Remarks

Cropping is calculated relative to the original size of the picture.

See also

Concepts

PictureFormat Object

Other resources

PictureFormat Object Members


AnimationBehavior.ScaleEffect Property (PowerPoint)

 Copy code hover
[image]

AnimationBehavior.ScaleEffect Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a ScaleEffect object for a given animation behavior. Read-only.

Syntax

expression .ScaleEffect

expression A variable that represents an AnimationBehavior object.

Return Value

ScaleEffect

Example

This example scales the first shape on the first slide starting at zero and increasing in size until it reaches 100 percent of its original size.

VBA Copy code Copy code
Sub ChangeScale()

    Dim shpFirst As Shape

    Dim effNew As Effect

    Dim aniScale As AnimationBehavior

    Set shpFirst = ActivePresentation.Slides(1).Shapes(1)

    Set effNew = ActivePresentation.Slides(1).TimeLine.MainSequence _

        .AddEffect(Shape:=shpFirst, effectId:=msoAnimEffectCustom)

    Set aniScale = effNew.Behaviors.Add(msoAnimTypeScale)

    With aniScale.ScaleEffect

        'Starting size

        .FromX = 0

        .FromY = 0

        'Size after scale effect

        .ToX = 100

        .ToY = 100

    End With

End Sub

See also

Concepts

AnimationBehavior Object

Other resources

AnimationBehavior Object Members


Fonts.Application Property (PowerPoint)

 Copy code hover
[image]

Fonts.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a Fonts object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

Fonts Object

Other resources

Fonts Object Members


ChartGroup Methods (PowerPoint)

 Copy code hover
[image]

ChartGroup Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
CategoryCollection | Returns all the visible categories in the chart group, or the specified visible category.
FullCategoryCollection | Returns all the categories in the chart group, or the specified category, whether visible or filtered out.
SeriesCollection | Returns all the series in the chart group.


Slide.Shapes Property (PowerPoint)

 Copy code hover
[image]

Slide.Shapes Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Shapes collection that represents all the elements that have been placed or inserted on the specified slide, slide master, or range of slides. Read-only.

Syntax

expression .Shapes

expression A variable that represents a Slide object.

Return Value

Shapes

Remarks

The Shapes collection returned can contain the drawings, shapes, OLE objects, pictures, text objects, titles, headers, footers, slide numbers, and date and time objects on a slide, or on the slide image on a notes page.

Example

This example adds a rectangle that's 100 points wide and 50 points high, and whose upper-left corner is 5 points from the left edge of slide one in the active presentation and 25 points from the top of the slide.

VBA Copy code Copy code
Set firstSlide = ActivePresentation.Slides(1)

firstSlide.Shapes.AddShape msoShapeRectangle, 5, 25, 100, 50

This example sets the fill texture for shape three on slide one in the active presentation.

VBA Copy code Copy code
Set newRect = ActivePresentation.Slides(1).Shapes(3)

newRect.Fill.PresetTextured msoTextureOak

Assuming that slide one in the active presentation contains a title, both the second and third lines of code in the following example set the title text on slide one in the presentation.

VBA Copy code Copy code
Set firstSl = ActivePresentation.Slides(1)

firstSl.Shapes.Title.TextFrame.TextRange.Text = "Some title text"

firstSl.Shapes(1).TextFrame.TextRange.Text = "Other title text"

Assuming that shape two on slide two in the active presentation contains a text frame, the following example adds a series of paragraphs to the slide. Note that Chr(13) is used to insert paragraph marks within the text.

VBA Copy code Copy code
Set tShape = ActivePresentation.Slides(2).Shapes(2)

tShape.TextFrame.TextRange.Text = "First Item" & Chr(13) & _

    "Second Item" & Chr(13) & "Third Item"

For most slide layouts, the first shapes on the slide are text placeholders, and the following example accomplishes the same task as the preceding example.

VBA Copy code Copy code
Set testShape = ActivePresentation.Slides(2).Shapes.Placeholders(2)

testShape.TextFrame.TextRange.Text = "First Item" & _

    Chr(13) & "Second Item" & Chr(13) & "Third Item"

See also

Concepts

Slide Object

Other resources

Slide Object Members


ResampleMediaTask.profile Property (PowerPoint)

 Copy code hover
[image]

ResampleMediaTask.profile Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the media mobilization profile for the specified media asset. Read-only.

Syntax

expression .profile

expression A variable that represents a ResampleMediaTask object.

Return Value

PpResampleMediaProfile

Remarks

profile can be one of the following PpResampleMediaProfile values.

Constant | Value | Description
ppResampleMediaProfileCustom | 1 | Custom profile
ppResampleMediaProfileSmall | 2 | Small profile
ppResampleMediaProfileSmaller | 3 | Smaller profile
ppResampleMediaProfileSmallest | 4 | Smallest profile

See also

Concepts

ResampleMediaTask Object

Other resources

ResampleMediaTask Object Members


ChartFont Members (PowerPoint)

 Copy code hover
[image]

ChartFont Members (PowerPoint)
Send feedback

Published: July 16, 2012

Contains the font attributes (font name, font size, color, and so on) for an object chart.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Background | Returns or sets the type of background for text used in charts. Read/write Variant that is set to one of the constants of XlBackground.
Bold | True if the font is bold. Read/write Variant.
Color | Returns or sets the primary color of the object. Read/write Variant.
ColorIndex | Returns or sets the color of the font. Read/write Variant.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
FontStyle | Returns or sets the font style. Read/write String.
Italic | True if the font style is italic. Read/write Boolean.
Name | Returns or sets the name of the object. Read/write String.
Parent | Returns the parent for the specified object. Read-only Object.
Size | Returns or sets the size of the font. Read/write Variant.
Strikethrough | True if the font is struck through with a horizontal line. Read/write Boolean.
Subscript | True if the font is formatted as subscript. The default is False. Read/write Variant.
Superscript | True if the font is formatted as superscript. The default is False. Read/write Variant.
Underline | Returns or sets the type of underline applied to the font. Can be one of the XlUnderlineStyle constants. Read/write Variant.


Options Properties (PowerPoint)

 Copy code hover
[image]

Options Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
DisplayPasteOptions | Determines whether Microsoft PowerPoint displays the Paste Options button, which appears directly under newly pasted text. Read/write.
ShowCoauthoringMergeChanges | Returns or sets the show changes mode. Read/write.


AxisTitle Object (PowerPoint)

 Copy code hover
[image]

AxisTitle Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a chart axis title.

Version Information

Version Added: PowerPoint 2007

Remarks

Use the AxisTitle property to return an AxisTitle object.

The AxisTitle object does not exist and cannot be used unless the HasTitle property for the axis is True.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the caption, sets the font to Bookman 10 point, and formats the word "millions" as italic for the axis title of the value axis for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.Axes(xlValue)

            .HasTitle = True

            With .AxisTitle

                .Caption = "Revenue (millions)"

                .Font.Name = "bookman"

                .Font.Size = 10

                .Characters(10, 8).Font.Italic = True

            End With

        End With

    End If

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

AxisTitle Object Members


XlErrorBarInclude Enumeration (PowerPoint)

 Copy code hover
[image]

XlErrorBarInclude Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies which error-bar parts to include.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlErrorBarIncludeBoth | 1 | Both the positive and negative error range.
xlErrorBarIncludeMinusValues | 3 | Only the negative error range.
xlErrorBarIncludeNone | -4142 | No error bar range.
xlErrorBarIncludePlusValues | 2 | Only the positive error range.


Cell.Select Method (PowerPoint)

 Copy code hover
[image]

Cell.Select Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Selects the specified object.

Syntax

expression .Select

expression A variable that represents a Cell object.

Remarks

If you try to make a selection that isn't appropriate for the view, your code will fail. For example, you can select a slide in slide sorter view but not in slide view.

Example

This example selects the first five characters in the title of slide one in the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(1).Shapes.Title.TextFrame _

    .TextRange.Characters(1, 5).Select

This example selects slide one in the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(1).Select

This example selects a table that has been added to a new slide in a new presentation. The table has three rows and three columns.

VBA Copy code Copy code
With Presentations.Add.Slides

    .Add(1, ppLayoutBlank).Shapes.AddTable(3, 3).Select

End With

See also

Concepts

Cell Object

Other resources

Cell Object Members


Gridlines.Creator Property (PowerPoint)

 Copy code hover
[image]

Gridlines.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents a GridLines object.

See also

Concepts

GridLines Object

Other resources

Gridlines Object Members


Chart.DisplayBlanksAs Property (PowerPoint)

 Copy code hover
[image]

Chart.DisplayBlanksAs Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the way that blank cells are plotted on a chart. Can be one of the XlDisplayBlanksAs constants. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .DisplayBlanksAs

expression A variable that represents a Chart object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets Microsoft Word to not plot blank cells for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.DisplayBlanksAs = xlNotPlotted

    End If

End With

See also

Concepts

Chart Object

Other resources

Chart Object Members


CellRange.Application Property (PowerPoint)

 Copy code hover
[image]

CellRange.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a CellRange object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

CellRange Object

Other resources

CellRange Object Members


TextRange.BoundHeight Property (PowerPoint)

 Copy code hover
[image]

TextRange.BoundHeight Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the height (in points) of the text bounding box for the specified text frame. Read-only.

Syntax

expression .BoundHeight

expression A variable that represents a TextRange object.

Return Value

Single

Example

This example adds a rounded rectangle to slide one in the active presentation. The rectangle has the same dimensions as the text bounding box for shape one.

VBA Copy code Copy code
With Application.ActivePresentation.Slides(1).Shapes

    Set tr = .Item(1).TextFrame.TextRange

    Set roundRect = .AddShape(msoShapeRoundedRectangle, _

        tr.BoundLeft, tr.BoundTop, tr.BoundWidth, tr.BoundHeight)

End With

With roundRect.Fill

    .ForeColor.RGB = RGB(255, 0, 128)

    .Transparency = 0.75

End With

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


DataLabel.Delete Method (PowerPoint)

 Copy code hover
[image]

DataLabel.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Delete

expression A variable that represents a DataLabel object.

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


LineFormat.EndArrowheadStyle Property (PowerPoint)

 Copy code hover
[image]

LineFormat.EndArrowheadStyle Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the style of the arrowhead at the end of the specified line. Read/write.

Syntax

expression .EndArrowheadStyle

expression A variable that represents an LineFormat object.

Return Value

MsoArrowheadStyle

Remarks

The EndArrowheadStyle proerty value can be one of these MsoArrowheadStyle constants.

msoArrowheadDiamond

msoArrowheadNone

msoArrowheadOpen

msoArrowheadOval

msoArrowheadStealth

msoArrowheadStyleMixed

msoArrowheadTriangle

Example

This example adds a line to myDocument. There's a short, narrow oval on the line's starting point and a long, wide triangle on its endpoint.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddLine(100, 100, 200, 300).Line

    .BeginArrowheadLength = msoArrowheadShort

    .BeginArrowheadStyle = msoArrowheadOval

    .BeginArrowheadWidth = msoArrowheadNarrow

    .EndArrowheadLength = msoArrowheadLong

    .EndArrowheadStyle = msoArrowheadTriangle

    .EndArrowheadWidth = msoArrowheadWide

End With

See also

Concepts

LineFormat Object

Other resources

LineFormat Object Members


ExtraColors Object (PowerPoint)

 Copy code hover
[image]

ExtraColors Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the extra colors in a presentation. The object can contain up to eight colors, each of which is represented by an red-green-blue (RGB) value.

Example

Use the ExtraColors property to return the ExtraColors object. Use ExtraColors(index), where index is the extra color index number, to return the red-green-blue (RGB) value for a single extra color. The following example adds a rectangle to slide one in the active presentation and sets its fill foreground color to the first extra color. If there hasn't been at least one extra color defined for the presentation, this example will fail.

VBA Copy code Copy code
With ActivePresentation

    Set rect = .Slides(1).Shapes _

        .AddShape(msoShapeRectangle, 50, 50, 100, 200)

    rect.Fill.ForeColor.RGB = .ExtraColors(1)

End With

Use the Add method to add an extra color. The following example adds an extra color to the active presentation (if the color hasn't already been added).

VBA Copy code Copy code
ActivePresentation.ExtraColors.Add RGB(69, 32, 155)

See also

Concepts

PowerPoint Object Model Reference

Other resources

ExtraColors Object Members


Placeholders.Count Property (PowerPoint)

 Copy code hover
[image]

Placeholders.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a Placeholders object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

Placeholders Object

Other resources

Placeholders Object Members


ConnectorFormat.BeginDisconnect Method (PowerPoint)

 Copy code hover
[image]

ConnectorFormat.BeginDisconnect Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Detaches the beginning of the specified connector from the shape it is attached to.

Syntax

expression .BeginDisconnect

expression A variable that represents a ConnectorFormat object.

Remarks

This method doesn't alter the size or position of the connector: the beginning of the connector remains positioned at a connection site but is no longer connected. Use the EndDisconnect method to detach the end of the connector from a shape.

Example

This example adds two rectangles to the first slide in the active presentation, attaches them with a connector, automatically reroutes the connector along the shortest path, and then detaches the connector from the rectangles.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

Set s = myDocument.Shapes

Set firstRect = s.AddShape(msoShapeRectangle, 100, 50, 200, 100)

Set secondRect = s.AddShape(msoShapeRectangle, 300, 300, 200, 100)

With s.AddConnector(msoConnectorCurve, 0, 0, 0, 0).ConnectorFormat

    .BeginConnect firstRect, 1

    .EndConnect secondRect, 1

    .Parent.RerouteConnections

    .BeginDisconnect

    .EndDisconnect

End With

See also

Concepts

ConnectorFormat Object

Other resources

ConnectorFormat Object Members


ObjectVerbs Members (PowerPoint)

 Copy code hover
[image]

ObjectVerbs Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents the collection of OLE verbs for the specified OLE object. OLE verbs are the operations supported by an OLE object. Commonly used OLE verbs are "play" and "edit."

Methods

Name | Description
Item | Returns a single object from the specified ObjectVerbs collection.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


PropertyEffect Object (PowerPoint)

 Copy code hover
[image]

PropertyEffect Object (PowerPoint)
See also Send feedback

Published: July 12, 2012

Represents a property effect for an AnimationBehavior object.

Example

Use the PropertyEffect property of the AnimationBehavior object to return a PropertyEffect object. The following example refers to the property effect for a specified animation behavior.

VBA Copy code Copy code
ActivePresentation.Slides(1).TimeLine.MainSequence.Item(1) _

   .Behaviors(1).PropertyEffect

Use the Points property to access the animation points of a particular animation behavior. If you want to change only two states of an animation behavior, use the From and To properties. This example adds a new shape to the and sets the property effect to animate the fill color from blue to red.

VBA Copy code Copy code
Sub AddShapeSetAnimFill()

    Dim effBlinds As Effect

    Dim shpRectangle As Shape

    Dim animProperty As AnimationBehavior

    Set shpRectangle = ActivePresentation.Slides(1).Shapes _

        .AddShape(Type:=msoShapeRectangle, Left:=100, _

        Top:=100, Width:=50, Height:=50)

    Set effBlinds = ActivePresentation.Slides(1).TimeLine.MainSequence _

        .AddEffect(Shape:=shpRectangle, effectId:=msoAnimEffectBlinds)

    effBlinds.Timing.Duration = 3

    Set animProperty = effBlinds.Behaviors.Add(msoAnimTypeProperty)

    With animProperty.PropertyEffect

        .Property = msoAnimColor

        .From = RGB(Red:=0, Green:=0, Blue:=255)

        .To = RGB(Red:=255, Green:=0, Blue:=0)

    End With

End Sub

See also

Concepts

PowerPoint Object Model Reference

Other resources

PropertyEffect Object Members


Walls Methods (PowerPoint)

 Copy code hover
[image]

Walls Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
ClearFormats | Clears the formatting of the object.
Paste | Pastes a picture from the Clipboard on the walls of the specified chart.
Select | Selects the object.


Control and Dialog Box Events (PowerPoint)

 Copy code hover
[image]

Control and Dialog Box Events (PowerPoint)
Send feedback

After you add controls to your dialog box or document, you add event procedures to determine how the controls respond to user actions.

UserForms and controls have a predefined set of events. For example, a command button has a Click event that occurs when the user clicks the command button, and UserForms have an Initialize event that runs when the form is loaded.

To write a control or form event procedure, open a module by double-clicking the form or control, and select the event from the Procedure drop-down list box.

Event procedures include the name of the control. For example, the name of the Click event procedure for a command button named Command1 is Command1_Click.

If you add code to an event procedure and then change the name of the control, your code remains in procedures with the previous name.

For example, assume you add code to the Click event for Commmand1 and then rename the control to Command2. When you double-click Command2, you will not see any code in the Click event procedure. You will need to move code from Command1_Click to Command2_Click.

To simplify development, it is a good practice to name your controls before writing code.


ShapeRange Properties (PowerPoint)

 Copy code hover
[image]

ShapeRange Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
ActionSettings | Returns an ActionSettings object that contains information about what action occurs when the user clicks or moves the mouse over the specified shape or text range during a slide show. Read-only.
Adjustments | Returns an Adjustments object that contains adjustment values for all the adjustments in the specified shape. Applies to any ShapeRange object that represents an AutoShape, WordArt, or a connector. Read-only.
AlternativeText | Returns or sets the alternative text associated with a shape in a Web presentation. Read/write.
AnimationSettings | Returns an AnimationSettings object that represents all the special effects you can apply to the animation of the specified shape. Read-only.
Application | Returns an Application object that represents the creator of the specified object.
AutoShapeType | Returns or sets the shape type for the specified ShapeRange object, which must represent an AutoShape other than a line, freeform drawing, or connector. Read/write.
BackgroundStyle | Sets or returns the background style of the specified object. Read/write.
BlackWhiteMode | Returns or sets a value that indicates how the specified shape appears when the presentation is viewed in black-and-white mode. Read/write.
Callout | Returns a CalloutFormat object that contains callout formatting properties for the specified shape. Applies to Shape or ShapeRange objects that represent line callouts. Read-only.
Chart | Returns the Chart object of the current ShapeRange object. Read-only.
Child | MsoTrue if the shape is a child shape or if all shapes in a shape range are child shapes of the same parent. Read-only.
ConnectionSiteCount | Returns the number of connection sites on the specified shape. Read-only.
Connector | Determines whether the specified shape is a connector. Read-only.
ConnectorFormat | Returns a ConnectorFormat object that contains connector formatting properties. Applies to Shape or ShapeRange objects that represent connectors. Read-only.
Count | Returns the number of objects in the specified collection. Read-only.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
CustomerData | Returns a CustomerData object.
Fill | Returns a FillFormat object that contains fill formatting properties for the specified shape. Read-only.
Glow | Returns the glow format for the specified range of shapes. Read-only.
GroupItems | Returns a GroupShapes object that represents the individual shapes in the specified group. Use the Item method of the GroupShapes object to return a single shape from the group. Read-only.
HasChart | Returns whether the shape range represented by the specified object contains a chart. Read-only.
HasSmartArt | Returns True if the current ShapeRange object has a SmartArt diagram. Read-only.
HasTable | Returns whether the specified shape is a table. Read-only.
HasTextFrame | Returns whether the specified shape has a text frame. Read-only.
Height | Returns or sets the height of the specified object, in points. Read/write.
HorizontalFlip | Returns whether the specified shape is flipped around the horizontal axis. Read-only.
Id | Returns a Long that identifies the shape or range of shapes. Read-only.
Left | Returns or sets a Single that represents the distance in points from the left edge of the leftmost shape in the shape range to the left edge of the slide. Read/write.
Line | Returns a LineFormat object that contains line formatting properties for the specified shape. (For a line, the LineFormat object represents the line itself; for a shape with a border, the LineFormat object represents the border.) Read-only.
LinkFormat | Returns a LinkFormat object that contains the properties that are unique to linked OLE objects. Read-only.
LockAspectRatio | Determines whether the specified shape retains its original proportions when you resize it. Read/write.
MediaFormat | Returns the current MediaFormat object. Read-only.
MediaType | Returns the OLE media type. Read-only.
Name | When a shape is created, Microsoft PowerPoint automatically assigns it a name in the form ShapeType Number, where ShapeType identifies the type of shape or AutoShape, and Number is an integer that's unique within the collection of shapes on the slide. For example, the automatically generated names of the shapes on a slide could be Placeholder 1, Oval 2, and Rectangle 3. To avoid conflict with automatically assigned names, don't use the form ShapeType Number for user-defined names, where ShapeType is a value that is used for automatically generated names, and Number is any positive integer. A shape range must contain exactly one shape. Read/write.
Nodes | Returns a ShapeNodes collection that represents the geometric description of the specified shape. Applies to ShapeRange objects that represent freeform drawings.
OLEFormat | Returns an OLEFormat object that contains OLE formatting properties for the specified shape. Applies to Shape or ShapeRange objects that represent OLE objects. Read-only.
Parent | Returns the parent object for the specified object.
ParentGroup | Returns a Shape object that represents the common parent shape of a child shape or a range of child shapes.
PictureFormat | Returns a PictureFormat object that contains picture formatting properties for the specified shape. Read-only.
PlaceholderFormat | Returns a PlaceholderFormat object that contains the properties that are unique to placeholders. Read-only.
Reflection | Returns the reflection format for the specified range of shapes. Read-only.
Rotation | Returns or sets the number of degrees the specified shape is rotated around the z-axis. Read/write.
Shadow | Returns a ShadowFormat object that contains shadow formatting properties for the specified shapes. Read-only.
ShapeStyle | Sets or returns the shape style index for the specified object.
SmartArt | Returns the SmartArt diagram of the ShapeRange object. Read-only.
SoftEdge | Returns the soft edge format for the specified range of shapes. Read-only.
Table | Returns a Table object that represents a table in a shape or in a shape range. Read-only.
Tags | Returns a Tags object that represents the tags for the specified object. Read-only.
TextEffect | Returns a TextEffectFormat object that contains text-effect formatting properties for the specified shape. Read-only.
TextFrame | Returns a TextFrame object that contains the alignment and anchoring properties for the specified shape or master text style. Read-only.
TextFrame2 | Returns the TextFrame2 object associated with the specified ShapeRange object that contains the alignment and anchoring properties for the specified shape range. Read-only.
ThreeD | Returns a ThreeDFormat object that contains 3-D - effect formatting properties for the specified shape. Read-only.
Title | Returns a Shape object that represents the slide title. Read-only.
Top | Returns or sets a Single that represents the distance from the top edge of the topmost shape in the shape range to the top edge of the document. Read/write.
Type | Represents the type of shape or shapes in a range of shapes. Read-only.
VerticalFlip | Determines whether the specified shape is flipped around the vertical axis. Read-only.
Vertices | Returns the coordinates of the specified freeform drawing's vertices (and control points for Bézier curves) as a series of coordinate pairs. Read-only.
Visible | Returns or sets the visibility of the specified object or the formatting applied to the specified object. Read/write.
Width | Returns or sets the width of the specified object, in points. Read/write.
ZOrderPosition | Returns the position of the specified shape in the z-order. Read-only.


LegendKey.Width Property (PowerPoint)

 Copy code hover
[image]

LegendKey.Width Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the width, in points, of the object. Read-only Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Width

expression A variable that represents a LegendKey object.

See also

Concepts

LegendKey Object

Other resources

LegendKey Object Members


AddIn Properties (PowerPoint)

 Copy code hover
[image]

AddIn Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
AutoLoad | Determines whether the specified add-in is automatically loaded each time PowerPoint is started. Read/write.
FullName | Returns the name of the specified add-in or saved presentation, including the path, the current file system separator, and the file name extension. Read-only.
Loaded | Determines whether the specified add-in is loaded. Read/write.
Name | The name (title) of the add-in for file types that are registered. Read-only.
Parent | Returns the parent object for the specified object.
Path | Returns a String that represents the path to the specified AddIn object. Read-only.
Registered | Determines whether the specified add-in is registered in the Windows registry. Read/write.


Slide.DisplayMasterShapes Property (PowerPoint)

 Copy code hover
[image]

Slide.DisplayMasterShapes Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Determines whether the specified slide displays the background objects on the slide master. Read/write.

Syntax

expression .DisplayMasterShapes

expression A variable that represents a Slide object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified slide does not display the background objects on the slide master.
msoTrue | The specified slide displays the background objects on the slide master. These background objects can include text, drawings, OLE objects, and clip art you add to the slide master. Headers and footers aren't included.

When you create a new slide, the default value for this property is msoTrue. If you copy a slide from another presentation, it retains the setting it had in the original presentation. That is, if the slide omitted slide master background objects in the original presentation, it will omit them in the new presentation as well.

Note that the look of the slide's background is determined by the color scheme and background and by the background objects. If setting the DisplayMasterShapes property alone doesn't give you the results you want, try setting the FollowMasterBackground and ColorScheme properties as well.

Example

This example copies slide one from presentation two, pastes it at the end of presentation one, and matches the slide's background, color scheme, and background objects to the rest of presentation one.

VBA Copy code Copy code
Presentations(2).Slides(1).Copy

With Presentations(1).Slides.Paste

    .FollowMasterBackground = True

    .ColorScheme = Presentations(1).SlideMaster.ColorScheme

    .DisplayMasterShapes = msoTrue

End With

See also

Concepts

Slide Object

Other resources

Slide Object Members


FileConverter.CanOpen Property (PowerPoint)

 Copy code hover
[image]

FileConverter.CanOpen Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if the specified file converter is designed to open files. Read-only Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .CanOpen

expression A variable that represents a FileConverter object.

Remarks

The CanSave property returns True if the specified file converter can be used to save (export) files.

Example

This example determines whether the first file converter is able to open files.

VBA Copy code Copy code
If FileConverters(1).CanOpen = True Then

    MsgBox FileConverters(1).FormatName & " can open files"

End If

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

This example determines whether the WordPerfect6x file converter can be used to open files. If the CanOpen property returns True, a document named "Test.wp" is opened.

VBA Copy code Copy code
If FileConverters("WordPerfect6x").CanOpen = True Then

    Documents.Open FileName:="C:\Test.wp", _

        Format:=FileConverters("WordPerfect6x").OpenFormat

End If

See also

Concepts

FileConverter Object

Other resources

FileConverter Object Members


Presentations.Add Method (PowerPoint)

 Copy code hover
[image]

Presentations.Add Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Creates a presentation. Returns a Presentation object that represents the new presentation.

Syntax

expression .Add(WithWindow)

expression A variable that represents a Presentations object.

Parameters

Name | Required/Optional | Data Type | Description
WithWindow | Optional | MsoTriState | Whether the presentation appears in a visible window.

Return Value

Presentation

Remarks

The WithWindow parameter value can be one of these MsoTriState constants.

Constant | Description
msoFalse | The new presentation isn't visible.
msoTrue | The default. Creates the presentation in a visible window.

Example

This example creates a presentation, adds a slide to it, and then saves the presentation.

VBA Copy code Copy code
With Presentations.Add

    .Slides.Add Index:=1, Layout:=ppLayoutTitle

    .SaveAs "Sample"

End With

See also

Concepts

Presentations Object

Other resources

Presentations Object Members


Rows Object (PowerPoint)

 Copy code hover
[image]

Rows Object (PowerPoint)
See also Send feedback

Published: July 12, 2012

A collection of Row objects that represent the rows in a table.

Example

Use the Rows property to return the Rows collection. This example changes the height of all rows in the specified table to 160 points.

VBA Copy code Copy code
Dim i As Integer

With ActivePresentation.Slides(2).Shapes(4).Table

    For i = 1 To .Rows.Count

        .Rows.Height = 160

    Next i

End With

Use the Add method to add a row to a table. This example inserts a row before the second row in the referenced table.

VBA Copy code Copy code
ActivePresentation.Slides(2).Shapes(5).Table.Rows.Add (2)

Use Rows(index), where index is a number that represents the position of the row in the table, to return a single Row object. This example deletes the first row from the table in shape five on slide two.

VBA Copy code Copy code
ActivePresentation.Slides(2).Shapes(5).Table.Rows(1).Delete

See also

Concepts

PowerPoint Object Model Reference

Other resources

Rows Object Members


ResampleMediaTasks.PercentComplete Property (PowerPoint)

 Copy code hover
[image]

ResampleMediaTasks.PercentComplete Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the percentage of completion of the sample. Read-only.

Syntax

expression .PercentComplete

expression A variable that represents a ResampleMediaTasks object.

See also

Concepts

ResampleMediaTasks Object

Other resources

ResampleMediaTasks Object Members


Shapes.AddChart Method (PowerPoint)

 Copy code hover
[image]

Shapes.AddChart Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Adds a chart to a presentation.

Syntax

expression .AddChart(Type, Left, Top, Width, Height)

expression An expression that returns a Shapes object.

Parameters

Name | Required/Optional | Data Type | Description
Type | Optional | Varient | Type of chart.
Left | Optional | Single | Left dimension.
Top | Optional | Single | Top dimension.
Width | Optional | Single | Width of the chart.
Height | Optional | Single | Height of the chart.

Return Value

Shape

See also

Concepts

Shapes Object

Other resources

Shapes Object Members


Axis.TickLabelSpacing Property (PowerPoint)

 Copy code hover
[image]

Axis.TickLabelSpacing Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the number of categories or series between tick-mark labels. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .TickLabelSpacing

expression A variable that represents an Axis object.

Remarks

This property applies only to category and series axes. It can be a value from 1 through 31999.

Tick-mark label spacing on the value axis is always calculated by Microsoft Word.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the number of categories between tick-mark labels on the category axis of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.Axes(xlCategory).TickLabelSpacing = 10

    End If

End With

See also

Concepts

Axis Object

Other resources

Axis Object Members


AxisTitle.IncludeInLayout Property (PowerPoint)

 Copy code hover
[image]

AxisTitle.IncludeInLayout Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if an axis title will occupy the chart layout space when a chart layout is being determined. The default is True. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .IncludeInLayout

expression An expression that returns a AxisTitle object.

Remarks

This property does not affect whether a chart is in autolayout mode or not. If the user adds a title by using the Above Chart command, the chart will resize smaller, as in previous versions of Microsoft Office. If the user then removes the title or selects one of the overlay title options, the chart will resize larger, as if the title were not on the chart.

See also

Concepts

AxisTitle Object

Other resources

AxisTitle Object Members


FileConverter.Application Property (PowerPoint)

 Copy code hover
[image]

FileConverter.Application Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns an Application object that represents the Microsoft PowerPoint application.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression Required. A variable that represents a FileConverter object.

Remarks

Visual Basic's CreateObject and GetObject functions give you access to an OLE Automation object from a Visual Basic for Applications project.

See also

Concepts

FileConverter Object

Other resources

FileConverter Object Members


SlideShowView.Exit Method (PowerPoint)

 Copy code hover
[image]

SlideShowView.Exit Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Ends the specified slide show.

Syntax

expression .Exit

expression A variable that represents a SlideShowView object.

Example

This example ends the slide show that's running in slide show window one.

Copy code Copy code
SlideShowWindows(1).View.Exit

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


Broadcast.Capabilities Property (PowerPoint)

 Copy code hover
[image]

Broadcast.Capabilities Property (PowerPoint)
Send feedback

Returns a Long that represents the capabilities of the specified broadcast. Read-only.

Version information

Version Added: PowerPoint 2013

Syntax

expression .Capabilities

expression A variable that represents a Broadcast object.

Remarks

The Capabilities property can return the following MSOBroadcastCapabilities values:

Name | Value | Description
MSOBroadcastCapFileSizeLimited | 1 | File size limited
MSOBroadcastCapSupportsMeetingNotes | 2 | Supports meeting notes
MSOBroadcastCapSupportsUpdateDoc | 4 | Supports document update

The values returned correspond to either Microsoft Office 2013 or Microsoft Office 2010 broadcast presentation service capabilities.

Property value

INT32


MsoAnimTriggerType Enumeration (PowerPoint)

 Copy code hover
[image]

MsoAnimTriggerType Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

The action that triggers the animation effect. The default value is msoAnimTriggerOnPageClick.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
msoAnimTriggerAfterPrevious | 3 | After the Previous button is clicked.
msoAnimTriggerMixed | -1 | Mixed actions.
msoAnimTriggerNone | 0 | No action associated as the trigger.
msoAnimTriggerOnPageClick | 1 | When a page is clicked.
msoAnimTriggerOnShapeClick | 4 | When a shape is clicked.
msoAnimTriggerWithPrevious | 2 | When the Previous button is clicked.


NamedSlideShow.Count Property (PowerPoint)

 Copy code hover
[image]

NamedSlideShow.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a NamedSlideShow object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

NamedSlideShow Object

Other resources

NamedSlideShow Object Members


Point.PieSliceLocation Method (PowerPoint)

 Copy code hover
[image]

Point.PieSliceLocation Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the vertical or horizontal position, in points, of a point on a chart item from the top or left edge of the object to the top or left edge of the chart area.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .PieSliceLocation(loc, Index)

expression A variable that represents a Point object.

Parameters

Name | Required/Optional | Data Type | Description
loc | Required | XlPieSliceLocation | Specifies a horizontal or vertical coordinate.
Index | Optional | XlPieSliceIndex | Specifies which pie slice position coordinate to return. The default is xlOuterCenterPoint.

Return Value

Double

Remarks

This property applies only to pie chart types.

See also

Concepts

Point Object

Other resources

Point Object Members


Guides Methods (PowerPoint)

 Copy code hover
[image]

Guides Methods (PowerPoint)
Send feedback

This object has the following methods:

Methods

Name | Description
Add | Adds a new drawing guide to the presentation, slide master, or custom layout.
Item | Returns a Guide object from the collection.


Designs Object (PowerPoint)

 Copy code hover
[image]

Designs Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a collection of slide design templates.

Remarks

Use the Designs property of the Presentation object to reference a design template.

To add or clone an individual design template, use the Designs collection's Add or Clone methods, respectively. To refer to an individual design template, use the Item method.

To load a design template, use the Load method.

Example

The following example adds a new design template to the Designs collection and confirms it was added correctly.

VBA Copy code Copy code
Sub AddDesignMaster()

    With ActivePresentation.Designs

        .Add designName:="MyDesignName"

        MsgBox .Item("MyDesignName").Name

    End With

End Sub

See also

Concepts

PowerPoint Object Model Reference

Other resources

Designs Object Members


Chart.PlotVisibleOnly Property (PowerPoint)

 Copy code hover
[image]

Chart.PlotVisibleOnly Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

True if only visible cells are plotted. False if both visible and hidden cells are plotted. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .PlotVisibleOnly

expression A variable that represents a Chart object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example causes Microsoft Word to plot only visible cells for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.PlotVisibleOnly = True

    End If

End With

See also

Concepts

Chart Object

Other resources

Chart Object Members


Chart.Elevation Property (PowerPoint)

 Copy code hover
[image]

Chart.Elevation Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the elevation, in degrees, of the 3-D chart view. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Elevation

expression A variable that represents a Chart object.

Remarks

The chart elevation is the height, in degrees, at which you view the chart. The default is 15 for most chart types. The value of this property must be between -90 and 90, except for 3-D bar charts, where it must be between 0 and 44.

Note Note

This property applies only to 3-D charts.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the chart elevation of the first chart in the active document to 34 degrees. You should run the example on a 3-D chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.Elevation = 34

    End If

End With

See also

Concepts

Chart Object

Other resources

Chart Object Members


LegendKey.Format Property (PowerPoint)

 Copy code hover
[image]

LegendKey.Format Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Format

expression A variable that represents a LegendKey object.

See also

Concepts

LegendKey Object

Other resources

LegendKey Object Members


Presentation.EncryptionProvider Property (PowerPoint)

 Copy code hover
[image]

Presentation.EncryptionProvider Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a String that specifies the name of the algorithm encryption provider that Microsoft PowerPoint 2013 uses when encrypting documents. Read/write.

Syntax

expression .EncryptionProvider

expression An expression that returns a Presentation object.

Return Value

String

Remarks

You can implement an encryption provider by creating a custom COM add-in. Within your presentation, you can store information that the add-in can encrypt and decrypt, and to which it can apply rights. The add-in can also display permission, setup, or authentication user interfaces.

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


ColorSchemes Object (PowerPoint)

 Copy code hover
[image]

ColorSchemes Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

A collection of all the ColorScheme objects in the specified presentation. Each ColorScheme object represents a color scheme, which is a set of colors that are used together on a slide.

Example

Use the ColorSchemes property to return the ColorSchemes collection. Use ColorSchemes(index), where index is the color scheme index number, to return a single ColorScheme object. The following example deletes color scheme two from the active presentation.

VBA Copy code Copy code
ActivePresentation.ColorSchemes(2).Delete

Use the Add method to create a new color scheme and add it to the ColorSchemes collection. The following example adds a color scheme to the active presentation and sets the title color and background color for the color scheme (because no argument was used with the Add method, the added color scheme is initially identical to the first standard color scheme in the presentation).

VBA Copy code Copy code
With ActivePresentation.ColorSchemes.Add

    .Colors(ppTitle).RGB = RGB(255, 0, 0)

    .Colors(ppBackground).RGB = RGB(128, 128, 0)

End With

Set the ColorScheme property of a Slide, SlideRange, or Master object to return the color scheme for one slide, a set of slides, or a master, respectively. The following example sets the color scheme for all the slides in the active presentation to the third color scheme in the presentation.

VBA Copy code Copy code
With ActivePresentation

    .Slides.Range.ColorScheme = .ColorSchemes(3)

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

ColorSchemes Object Members


Application.WindowBeforeDoubleClick Event (PowerPoint)

 Copy code hover
[image]

Application.WindowBeforeDoubleClick Event (PowerPoint)
See also Send feedback

Published: July 16, 2012

Occurs when you double-click the items in the views listed in the following table.

Syntax

expression .WindowBeforeDoubleClick(Sel, Cancel)

expression A variable that represents an Application object.

Parameters

Name | Required/Optional | Data Type | Description
Sel | Required | Selection | The selection below the mouse pointer when the double-click occurs.
Cancel | Required | Boolean | False when the event occurs. If the event procedure sets this argument to True, the default double-click action isn't performed when the procedure is finished.

Remarks

For information about using events with the Application object, see How to: Use Events with the Application Object.

View | Item
Normal or slide view | Shape
Slide sorter view | Slide
Notes page view | Slide image

The default double-click action occurs after this event unless the Cancel argument is set to True.

Example

In slide sorter view, the default double-click event for any slide is to change to slide view. In this example, if the active presentation is displayed in slide sorter view, the default action is preempted by the WindowBeforeDoubleClick event. The event procedure changes the view to normal view and then cancels the change to slide view by setting the Cancel argument to True.

VBA Copy code Copy code
Private Sub App_WindowBeforeDoubleClick (ByVal Sel As Selection, ByVal Cancel As Boolean)

    With Application.ActiveWindow

        If .ViewType = ppViewSlideSorter Then

           .ViewType = ppViewNormal

            Cancel = True

        End If

    End With

End Sub

See also

Concepts

Application Object

Other resources

Application Object Members


TabStops Methods (PowerPoint)

 Copy code hover
[image]

TabStops Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Add | Creates a tab stop and adds it to the TabStops collection.
Item | Returns a single tab stop from the specified TabStops collection.


NamedSlideShows.Item Method (PowerPoint)

 Copy code hover
[image]

NamedSlideShows.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single NamedSlideShow object from the specified NamedSlideShows collection.

Syntax

expression .Item(Index)

expression A variable that represents a NamedSlideShows object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Variant | The name or index number of the single NamedSlideShow object in the collection to be returned.

Return Value

NamedSlideShow

See also

Concepts

NamedSlideShows Object

Other resources

NamedSlideShows Object Members


ThreeDFormat.PresetExtrusionDirection Property (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.PresetExtrusionDirection Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the direction that the extrusion's sweep path takes away from the extruded shape (the front face of the extrusion). Read-only.

Syntax

expression .PresetExtrusionDirection

expression A variable that represents a ThreeDFormat object.

Return Value

MsoPresetExtrusionDirection

Remarks

This property is read-only. To set the value of this property, use the SetExtrusionDirection method.

The value of the PresetExtrusionDirection property can be one of these MsoPresetExtrusionDirection constants.

msoExtrusionBottom

msoExtrusionBottomLeft

msoExtrusionBottomRight

msoExtrusionLeft

msoExtrusionNone

msoExtrusionRight

msoExtrusionTop

msoExtrusionTopLeft

msoExtrusionTopRight

msoPresetExtrusionDirectionMixed

Example

This example changes each extrusion on myDocument that extends toward the upper-left corner of the extrusion's front face to an extrusion that extends toward the lower-right corner of the front face.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

For Each s In myDocument.Shapes

    With s.ThreeD

        If .PresetExtrusionDirection = msoExtrusionTopLeft Then

            .SetExtrusionDirection msoExtrusionBottomRight

        End If

    End With

Next

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


ShapeRange.Id Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.Id Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Long that identifies the shape or range of shapes. Read-only.

Syntax

expression .Id

expression A variable that represents a ShapeRange object.

Return Value

Long

Example

This example adds a new shape to the active presentation, then fills the shape according to the value of the Id property.

VBA Copy code Copy code
Sub ShapeID()

    With ActivePresentation.Slides(1).Shapes.AddShape _

            (Type:=msoShape5pointStar, Left:=100, _

            Top:=100, Width:=100, Height:=100)

        Select Case .Id

            Case 0 To 500

                .Fill.ForeColor.RGB = RGB(Red:=255, Green:=0, Blue:=0)

            Case 500 To 1000

                .Fill.ForeColor.RGB = RGB(Red:=255, Green:=255, Blue:=0)

            Case 1000 To 1500

                .Fill.ForeColor.RGB = RGB(Red:=255, Green:=0, Blue:=255)

            Case 1500 To 2000

                .Fill.ForeColor.RGB = RGB(Red:=0, Green:=255, Blue:=0)

            Case 2000 To 2500

                .Fill.ForeColor.RGB = RGB(Red:=0, Green:=255, Blue:=255)

            Case Else

                .Fill.ForeColor.RGB = RGB(Red:=0, Green:=0, Blue:=255)

        End Select

    End With

End Sub

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


TextRange.Cut Method (PowerPoint)

 Copy code hover
[image]

TextRange.Cut Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the specified object and places it on the Clipboard.

Syntax

expression .Cut

expression A variable that represents a TextRange object.

Example

This example deletes the text in shape one on slide one in the active presentation and places a copy of it on the Clipboard.

VBA Copy code Copy code
ActivePresentation.Slides(1).Shapes(1).TextFrame.TextRange.Cut

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


SlideShowWindow.Presentation Property (PowerPoint)

 Copy code hover
[image]

SlideShowWindow.Presentation Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Presentation object that represents the presentation in which the specified document window or slide show window was created. Read-only.

Syntax

expression .Presentation

expression A variable that represents a SlideShowWindow object.

Return Value

Presentation

Remarks

If the slide that's currently displayed in document window one is from an embedded presentation, Windows(1).View.Slide.Parent returns the embedded presentation, and Windows(1).Presentation returns the presentation in which document window one was created.

If the slide that's currently displayed in slide show window one is from an embedded presentation, SlideShowWindows(1).View.Slide.Parent returns the embedded presentation, and SlideShowWindows(1).Presentation returns the presentation in which the slide show was started.

Example

This example continues the slide numbering for the presentation in window one into the slide numbering for the presentation in window two.

VBA Copy code Copy code
firstPresSlides = Windows(1).Presentation.Slides.Count

Windows(2).Presentation.PageSetup _

    .FirstSlideNumber = firstPresSlides + 1

See also

Concepts

SlideShowWindow Object

Other resources

SlideShowWindow Object Members


Chart.CategoryLabelLevel Property (PowerPoint)

 Copy code hover
[image]

Chart.CategoryLabelLevel Property (PowerPoint)
Send feedback

Returns or sets an XlCategoryLabel constant that specifies the source level of the chart category labels. Read-write.

Version information

Version Added: PowerPoint 2013

Syntax

expression .CategoryLabelLevel

expression A variable that represents a Chart object.

Property value

XLCATEGORYLABELLEVEL


ShapeRange.Delete Method (PowerPoint)

 Copy code hover
[image]

ShapeRange.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the specified ShapeRange object.

Syntax

expression .Delete

expression A variable that represents a ShapeRange object.

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


HiLoLines.Parent Property (PowerPoint)

 Copy code hover
[image]

HiLoLines.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents a HiLoLines object.

See also

Concepts

HiLoLines Object

Other resources

HiLoLines Object Members


Floor.Parent Property (PowerPoint)

 Copy code hover
[image]

Floor.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents a Floor object.

See also

Concepts

Floor Object

Other resources

Floor Object Members


ShapeRange.HasSmartArt Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.HasSmartArt Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns True if the current ShapeRange object has a SmartArt diagram. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .HasSmartArt

expression A variable that represents a ShapeRange object.

Return Value

Boolean

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


TextRange.Count Property (PowerPoint)

 Copy code hover
[image]

TextRange.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a TextRange object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


ResampleMediaTasks.Cancel Method (PowerPoint)

 Copy code hover
[image]

ResampleMediaTasks.Cancel Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Cancels mobilization of the current media asset.

Syntax

expression .Cancel

expression A variable that represents a ResampleMediaTasks object.

Return Value

Nothing

See also

Concepts

ResampleMediaTasks Object

Other resources

ResampleMediaTasks Object Members


CustomLayouts Object (PowerPoint)

 Copy code hover
[image]

CustomLayouts Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a set of custom layouts associated with a presentation design.

Remarks

Use the CustomLayouts property of the slide Master object to return a CustomLayouts collection. Use CustomLayouts(index), where index is the color scheme index number, to return a single CustomLayout object.

Use the Add method to create a new custom layout and add it to the CustomLayouts collection. Use the Paste method to past slides from the Clipboard as a CustomLayout object into the CustomLayouts collection.

Use the CustomLayout property of a Slide or SlideRange object to return a custom layout for a slide or set of slides.

Example

The following example adds a custom layout to the slide master of the active presentation.

VBA Copy code Copy code
Sub AddCustomLayout()

    With ActivePresentation.SlideMaster

        .CustomLayouts.Add (1)

        .CustomLayouts(1).Name = "MyLayout"

    End With

End Sub

The following example displays the name of the custom layout for the first slide of the active presentation.

VBA Copy code Copy code
MsgBox ActivePresentation.Slides(1).CustomLayout.Name

See also

Concepts

PowerPoint Object Model Reference

Other resources

CustomLayouts Object Members


Presentation.SlideShowWindow Property (PowerPoint)

 Copy code hover
[image]

Presentation.SlideShowWindow Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a SlideShowWindow object that represents the slide show window in which the specified presentation is running. Read-only.

Syntax

expression .SlideShowWindow

expression A variable that represents a Presentation object.

Return Value

SlideShowWindow

Remarks

You can use this property in conjunction with the Me keyword and the Parent property to return the slide show window in which an ActiveX control event was fired, as shown in the example.

Example

The following example shows the Click event procedures for buttons named "cmdBack" and "cmdForward". If you add these buttons to the slide master and add these event procedures to them, all slides based on the master (and set to show master background graphics) will have these navigation buttons that will be active during a slide show. The Me keyword returns the Master object that represents the slide master that contains the control. If the control were on an individual slide, the Me keyword in an event procedure for that control would return a Slide object.

VBA Copy code Copy code
Private Sub cmdBack_Click()

    Me.Parent.SlideShowWindow.View.Previous

End Sub

Private Sub cmdForward_Click()

    Me.Parent.SlideShowWindow.View.Next

End Sub

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


SectionProperties.Application Property (PowerPoint)

 Copy code hover
[image]

SectionProperties.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a SectionProperties object.

See also

Concepts

SectionProperties Object

Other resources

SectionProperties Object Members


Slide.SlideID Property (PowerPoint)

 Copy code hover
[image]

Slide.SlideID Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a unique ID number for the specified slide. Read-only.

Syntax

expression .SlideID

expression A variable that represents a Slide object.

Return Value

Long

Remarks

Unlike the SlideIndex property, the SlideID property of a Slide object won't change when you add slides to the presentation or rearrange the slides in the presentation. Therefore, using the FindBySlideID method with the slide's ID number can be a more reliable way to return a specific Slide object from a Slides collection than using the Item method with the slide's index number.

Example

This example demonstrates how to retrieve the unique ID number for a Slide object and then use this number to return that Slide object from the Slides collection.

VBA Copy code Copy code
Set gslides = ActivePresentation.Slides

'Get slide ID

graphSlideID = gslides.Add(2, ppLayoutChart).SlideID

gslides.FindBySlideID(graphSlideID) _

    .SlideShowTransition.EntryEffect = _

    ppEffectCoverLeft      'Use ID to return specific slide

See also

Concepts

Slide Object

Other resources

Slide Object Members


ChartTitle.Application Property (PowerPoint)

 Copy code hover
[image]

ChartTitle.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents a ChartTitle object.

See also

Concepts

ChartTitle Object

Other resources

ChartTitle Object Members


Shapes.SelectAll Method (PowerPoint)

 Copy code hover
[image]

Shapes.SelectAll Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Selects all the shapes in a Shapes collection.

Syntax

expression .SelectAll

expression A variable that represents a Shapes object.

Example

This example selects all the shapes on myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)
myDocument.Shapes.SelectAll

See also

Concepts

Shapes Object

Other resources

Shapes Object Members


TableStyle.Name Property (PowerPoint)

 Copy code hover
[image]

TableStyle.Name Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the name of the table style. Read-only.

Syntax

expression .Name

expression A variable that represents a TableStyle object.

Return Value

String

See also

Concepts

TableStyle Object

Other resources

TableStyle Object Members


RotationEffect.From Property (PowerPoint)

 Copy code hover
[image]

RotationEffect.From Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns a Single that represents the starting angle in degrees, specified relative to the screen (for example, 90 degrees is completely horizontal). Read/write.

Syntax

expression .From

expression A variable that represents a RotationEffect object.

Remarks

Use this property in conjunction with the To property to transition from one rotation angle to another.

The default value is Empty in which case the current position of the object is used.

Do not confuse this property with the FromX or FromY properties of the ScaleEffect and MotionEffect objects, which are only used for scaling or motion effects.

Example

The following example adds a rotation effect and immediately changes its rotation angle.

VBA Copy code Copy code
Sub AddAndChangeRotationEffect()

    Dim effBlinds As Effect

    Dim tlnTiming As TimeLine

    Dim shpRectangle As Shape

    Dim animRotation As AnimationBehavior

    Dim rtnEffect As RotationEffect

    'Adds rectangle and sets effect and animation

    Set shpRectangle = ActivePresentation.Slides(1).Shapes_

        .AddShape(Type:=msoShapeRectangle, Left:=100, _

        Top:=100, Width:=50, Height:=50)

    Set tlnTiming = ActivePresentation.Slides(1).TimeLine

    Set effBlinds = tlnTiming.MainSequence.AddEffect(Shape:=shpRectangle, _

        effectId:=msoAnimEffectBlinds)

    Set animRotation = tlnTiming.MainSequence(1).Behaviors _

        .Add(Type:=msoAnimTypeRotation)

    Set rtnEffect = animRotation.RotationEffect

    'Sets the rotation effect starting and ending positions

    rtnEffect.From = 90

    rtnEffect.To = 270

End Sub

See also

Concepts

RotationEffect Object

Other resources

RotationEffect Object Members


XlChartElementPosition Enumeration (PowerPoint)

 Copy code hover
[image]

XlChartElementPosition Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the position of the chart element.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlChartElementPositionAutomatic | -4105 | Automatically sets the position of the chart element.
xlChartElementPositionCustom | -4114 | Specifies a specific position for the chart element.


Chart.ApplyDataLabels Method (PowerPoint)

 Copy code hover
[image]

Chart.ApplyDataLabels Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Applies data labels to all the series in a chart.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ApplyDataLabels(Type, LegendKey, AutoText, HasLeaderLines, ShowSeriesName, ShowCategoryName, ShowValue, ShowPercentage, ShowBubbleSize, Separator)

expression A variable that represents a Chart object.

Parameters

Name | Required/Optional | Data Type | Description
Type | Optional | XlDataLabelsType | One of the enumeration values that specifies the type of data label to apply.
LegendKey | Optional | Variant | True to show the legend key next to the point. The default is False.
AutoText | Optional | Variant | True if the object automatically generates appropriate text based on content.
HasLeaderLines | Optional | Variant | For the Chart and Series objects, True if the series has leader lines.
ShowSeriesName | Optional | Variant | True to enable the series name for the data label; otherwise, False.
ShowCategoryName | Optional | Variant | True to enable the category name for the data label; otherwise, False.
ShowValue | Optional | Variant | True to enable the value for the data label; otherwise, False.
ShowPercentage | Optional | Variant | True to enable the percentage for the data label; otherwise, False.
ShowBubbleSize | Optional | Variant | True to enable the bubble size for the data label; otherwise, False.
Separator | Optional | Variant | The separator for the data label.

Remarks

The Type parameter can be one of the following XlDataLabelsType constants:

  • xlDataLabelsShowBubbleSizes—The bubble size for the data label.

  • xlDataLabelsShowLabelAndPercent—The percentage of the total, and the category for the point. Available only for pie charts and doughnut charts.

  • xlDataLabelsShowPercent—The percentage of the total. Available only for pie charts and doughnut charts.

  • xlDataLabelsShowLabel—The category for the point.

  • xlDataLabelsShowNone—No data labels.

  • xlDataLabelsShowValue—(Default) The value for the point (assumed if this argument is not specified).

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example applies category labels to the first series of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1). _

            ApplyDataLabels Type:=xlDataLabelsShowLabel

    End If

End With
Note Note

If you use a string for the Separator parameter, you will get a string as the separator. If you use xlDataLabelSeparatorDefault (= 1), you will get the default data label separator, which is either a comma or a newline, depending on the data label.
When a value of 1 is returned, it indicates that the user has not changed the default separator, which is a comma (,). You can also pass a value of 1 to change the separator back to the default separator.
The chart must first be active before you can access the data labels programmatically; otherwise, a run-time error occurs.

See also

Concepts

Chart Object

Other resources

Chart Object Members


Player Properties (PowerPoint)

 Copy code hover
[image]

Player Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
CurrentPosition | Gets or sets a Long that represents the current position of the player in the media. Read/write.
Parent | Returns the parent object for the specified object. Read-only.
State | Returns the current state of the player. Read-only.


Presentation.HasNotesMaster Property (PowerPoint)

 Copy code hover
[image]

Presentation.HasNotesMaster Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Indicates whether the presentation has media that resides on a notes master. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .HasNotesMaster

expression A variable that represents a Presentation object.

Return Value

Boolean

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


FilterEffect Properties (PowerPoint)

 Copy code hover
[image]

FilterEffect Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Parent | Returns the parent object for the specified object.
Reveal | Determines how the embedded objects will be revealed. Read/write.
Subtype | Sets or returns the subtype of the filter effect. Read/write.
Type | Represents the type of animation. Read/write.


Shapes.AddLine Method (PowerPoint)

 Copy code hover
[image]

Shapes.AddLine Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Creates a line. Returns a Shape object that represents the new line.

Syntax

expression .AddLine(BeginX, BeginY, EndX, EndY)

expression A variable that represents a Shapes object.

Parameters

Name | Required/Optional | Data Type | Description
BeginX | Required | Single | The horizontal position, measured in points, of the line's starting point relative to the left edge of the slide.
BeginY | Required | Single | The vertical position, measured in points, of the line's starting point relative to the top edge of the slide.
EndX | Required | Single | The horizontal position, measured in points, of the line's ending point relative to the left edge of the slide.
EndY | Required | Single | The vertical position, measured in points, of the line's ending point relative to the top edge of the slide.

Return Value

Shape

Example

This example adds a blue dashed line to myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddLine(BeginX:=10, BeginY:=10, _

        EndX:=250, EndY:=250).Line

    .DashStyle = msoLineDashDotDot

    .ForeColor.RGB = RGB(50, 0, 128)

End With

See also

Concepts

Shapes Object

Other resources

Shapes Object Members


PpPlaceholderType Enumeration (PowerPoint)

 Copy code hover
[image]

PpPlaceholderType Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the type of placeholder.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppPlaceholderBitmap | 9 | Bitmap
ppPlaceholderBody | 2 | Body
ppPlaceholderCenterTitle | 3 | Center Title
ppPlaceholderChart | 8 | Chart
ppPlaceholderDate | 16 | Date
ppPlaceholderFooter | 15 | Footer
ppPlaceholderHeader | 14 | Header
ppPlaceholderMediaClip | 10 | Media Clip
ppPlaceholderMixed | -2 | Mixed
ppPlaceholderObject | 7 | Object
ppPlaceholderOrgChart | 11 | Organization Chart
ppPlaceholderPicture | 18 | Picture
ppPlaceholderSlideNumber | 13 | Slide Number
ppPlaceholderSubtitle | 4 | Subtitle
ppPlaceholderTable | 12 | Table
ppPlaceholderTitle | 1 | Title
ppPlaceholderVerticalBody | 6 | Vertical Body
ppPlaceholderVerticalObject | 17 | Vertical Object
ppPlaceholderVerticalTitle | 5 | Vertical Title


SeriesLines.Format Property (PowerPoint)

 Copy code hover
[image]

SeriesLines.Format Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Format

expression A variable that represents a SeriesLines object.

See also

Concepts

SeriesLines Object

Other resources

SeriesLines Object Members


PpSlideShowType Enumeration (PowerPoint)

 Copy code hover
[image]

PpSlideShowType Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Constants that specify the type of slide show, passed to and returned by the ShowType property of the SlideShowSettings object.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppShowTypeKiosk | 3 | Kiosk
ppShowTypeSpeaker | 1 | Speaker
ppShowTypeWindow | 2 | Window


Gridlines.Parent Property (PowerPoint)

 Copy code hover
[image]

Gridlines.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents a GridLines object.

See also

Concepts

GridLines Object

Other resources

Gridlines Object Members


CellRange.Parent Property (PowerPoint)

 Copy code hover
[image]

CellRange.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a CellRange object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

CellRange Object

Other resources

CellRange Object Members


XlTickLabelOrientation Enumeration (PowerPoint)

 Copy code hover
[image]

XlTickLabelOrientation Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the text orientation for tick-mark labels.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlTickLabelOrientationAutomatic | -4105 | The text orientation is set by Microsoft Word.
xlTickLabelOrientationDownward | -4170 | The text runs downward.
xlTickLabelOrientationHorizontal | -4128 | The characters run horizontally.
xlTickLabelOrientationUpward | -4171 | The text runs upward.
xlTickLabelOrientationVertical | -4166 | The characters run vertically.


MediaFormat.FadeInDuration Property (PowerPoint)

 Copy code hover
[image]

MediaFormat.FadeInDuration Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Gets or sets the duration of the fade in of the media, in milliseconds. Read/write.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .FadeInDuration

expression An expression that returns a MediaFormat object.

Return Value

Long

See also

Concepts

MediaFormat Object

Other resources

MediaFormat Object Members


DisplayUnitLabel.Application Property (PowerPoint)

 Copy code hover
[image]

DisplayUnitLabel.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents a DisplayUnitLabel object.

See also

Concepts

DisplayUnitLabel Object

Other resources

DisplayUnitLabel Object Members


ThreeDFormat.ContourColor Property (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.ContourColor Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a ColorFormat object that represents the color of the specified ThreeDFormat object's contour. Read-only.

Syntax

expression .ContourColor

expression A variable that represents a ThreeDFormat object.

Return Value

ColorFormat

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


SlideShowSettings.ShowScrollbar Property (PowerPoint)

 Copy code hover
[image]

SlideShowSettings.ShowScrollbar Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether to display the scroll bar during a slide show in browse mode. Read/write.

Syntax

expression .ShowScrollbar

expression A variable that represents a SlideShowSettings object.

Return Value

MsoTriState

Remarks

Use the ShowType property prior to setting the ShowScrollbar property.

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

msoFalse

msoTrue

Example

This example specifies to display the slide show for the active presentation in a window and displays a scrollbar used for browsing through the slides during a slide show.

VBA Copy code Copy code
Sub ShowSlideShowScrollBar()

    With ActivePresentation.SlideShowSettings

        .ShowType = ppShowTypeWindow

        .ShowScrollBar = msoTrue

    End With

End Sub

See also

Concepts

SlideShowSettings Object

Other resources

SlideShowSettings Object Members


NamedSlideShows Object (PowerPoint)

 Copy code hover
[image]

NamedSlideShows Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

A collection of all the NamedSlideShow objects in the presentation. Each NamedSlideShow object represents a custom slide show.

Example

Use the NamedSlideShows property to return the NamedSlideShows collection. Use NamedSlideShows(index), where index is the custom slide show name or index number, to return a single NamedSlideShow object. The following example deletes the custom slide show named "Quick Show."

VBA Copy code Copy code
ActivePresentation.SlideShowSettings _

    .NamedSlideShows("Quick Show").Delete

Use the Add method to create a new slide show and add it to the NamedSlideShows collection. The following example adds to the active presentation the named slide show "Quick Show" that contains slides 2, 7, and 9. The example then runs this custom slide show.

VBA Copy code Copy code
Dim qSlides(1 To 3) As Long

With ActivePresentation

    With .Slides

        qSlides(1) = .Item(2).SlideID

        qSlides(2) = .Item(7).SlideID

        qSlides(3) = .Item(9).SlideID

    End With

    With .SlideShowSettings

        .NamedSlideShows.Add "Quick Show", qSlides

        .RangeType = ppShowNamedSlideShow

        .SlideShowName = "Quick Show"

        .Run

    End With

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

NamedSlideShows Object Members


CellRange.Count Property (PowerPoint)

 Copy code hover
[image]

CellRange.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a CellRange object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

CellRange Object

Other resources

CellRange Object Members


LegendKey.PictureType Property (PowerPoint)

 Copy code hover
[image]

LegendKey.PictureType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the way pictures are displayed on a legend key. Read/write XlChartPictureType.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .PictureType

expression A variable that represents a LegendKey object.

See also

Concepts

LegendKey Object

Other resources

LegendKey Object Members


TextFrame.HorizontalAnchor Property (PowerPoint)

 Copy code hover
[image]

TextFrame.HorizontalAnchor Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the horizontal alignment of text in a text frame. Read/write.

Syntax

expression .HorizontalAnchor

expression A variable that represents a TextFrame object.

Return Value

MsoHorizontalAnchor

Remarks

The value returned by the HorizontalAnchor property can be one of these MsoHorizontalAnchor constants.

msoAnchorNone

msoHorizontalAnchorMixed

msoAnchorCenter

Example

This example sets the alignment of the text in shape one on myDocument to top centered.

VBA Copy code Copy code
Set myDocument = ActivePresentation.SlideMaster

With myDocument.Shapes(1)

    .TextFrame.HorizontalAnchor = msoAnchorCenter

    .TextFrame.VerticalAnchor = msoAnchorTop

End With

See also

Concepts

TextFrame Object

Other resources

TextFrame Object Members


TextStyleLevel.Font Property (PowerPoint)

 Copy code hover
[image]

TextStyleLevel.Font Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Font object that represents character formatting. Read-only.

Syntax

expression .Font

expression A variable that represents a TextStyleLevel object.

Return Value

Font

Example

This example sets the formatting for the text in shape one on slide one in the active presentation.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(1)

    With .TextFrame.TextRange.Font

        .Size = 48

        .Name = "Palatino"

        .Bold = True

        .Color.RGB = RGB(255, 127, 255)

    End With

End With

This example sets the color and font name for bullets in shape two on slide one.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(2)

    With .TextFrame.TextRange.ParagraphFormat.Bullet

        .Visible = True

        With .Font

            .Name = "Palatino"

            .Color.RGB = RGB(0, 0, 255)

        End With

    End With

End With

See also

Concepts

TextStyleLevel Object

Other resources

TextStyleLevel Object Members


Point.MarkerForegroundColorIndex Property (PowerPoint)

 Copy code hover
[image]

Point.MarkerForegroundColorIndex Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the marker foreground color as an index into the current color palette, or as one of the following XlColorIndex constants: xlColorIndexAutomatic or xlColorIndexNone. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .MarkerForegroundColorIndex

expression A variable that represents a Point object.

Remarks

This property applies only to line, scatter, and radar charts.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the marker background and foreground colors for the second point in series one for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.SeriesCollection(1).Points(2)

            ' Set the background color to green.

            .MarkerBackgroundColorIndex = 4

            ' Set the foreground color to red.

            .MarkerForegroundColorIndex = 3

        End With

    End If

End With

See also

Concepts

Point Object

Other resources

Point Object Members


Shape.Select Method (PowerPoint)

 Copy code hover
[image]

Shape.Select Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Selects the specified object.

Syntax

expression .Select(Replace)

expression A variable that represents a Shape object.

Parameters

Name | Required/Optional | Data Type | Description
Replace | Optional | MsoTriState | Specifies whether the selection replaces any previous selection.

Remarks

If you try to make a selection that isn't appropriate for the view, your code will fail. For example, you can select a slide in slide sorter view but not in slide view.

The Replace parameter value can be one of these MsoTriState constants.

Constant | Description
msoFalse | The selection is added to the previous selection.
msoTrue | The default. The selection replaces any previous selection.

Example

This example selects shape one on slide one in the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(1).Shapes(1).Select

See also

Concepts

Shape Object

Other resources

Shape Object Members


Columns Methods (PowerPoint)

 Copy code hover
[image]

Columns Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Add | Adds a new column to an existing table. Returns a Column object that represents the new table column.
Item | Returns a single Column object from the specified Columns collection.


DataLabel.Select Method (PowerPoint)

 Copy code hover
[image]

DataLabel.Select Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Selects the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Select

expression A variable that represents a DataLabel object.

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


Gridlines Object (PowerPoint)

 Copy code hover
[image]

Gridlines Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents major or minor gridlines on a chart axis.

Version Information

Version Added: PowerPoint 2007

Remarks

Gridlines extend the tick marks on a chart axis to make it easier to see the values associated with the data markers. This object is not a collection. There is no object that represents a single gridline; you either enable all gridlines for an axis or disable all of them.

Use the MajorGridlines property to return the GridLines object that represents the major gridlines for the axis. Use the MinorGridlines property to return the GridLines object that represents the minor gridlines. It is possible to return both major and minor gridlines at the same time.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example enables major gridlines for the category axis of the first chart in the active document and then formats the gridlines to be blue dashed lines.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.Axes(xlCategory)

            .HasMajorGridlines = True

            .MajorGridlines.Border.Color = RGB(0, 0, 255)

            .MajorGridlines.Border.LineStyle = xlDash

        End With

    End If

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

Gridlines Object Members


Fonts.Item Method (PowerPoint)

 Copy code hover
[image]

Fonts.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single Font object from the specified Fonts collection.

Syntax

expression .Item(Index)

expression A variable that represents a Fonts object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Variant | The name or index number of the single Font object in the collection to be returned.

Return Value

Font

See also

Concepts

Fonts Object

Other resources

Fonts Object Members


ChartFont.Strikethrough Property (PowerPoint)

 Copy code hover
[image]

ChartFont.Strikethrough Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if the font is struck through with a horizontal line. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .StrikeThrough

expression A variable that represents a ChartFont object.

See also

Concepts

ChartFont Object

Other resources

ChartFont Object Members


LineFormat Object (PowerPoint)

 Copy code hover
[image]

LineFormat Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents line and arrowhead formatting. For a line, the LineFormat object contains formatting information for the line itself; for a shape with a border, this object contains formatting information for the shape's border.

Example

Use the Line property to return a LineFormat object. The following example adds a blue, dashed line to myDocument. There's a short, narrow oval at the line's starting point and a long, wide triangle at its endpoint.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddLine(100, 100, 200, 300).Line

    .DashStyle = msoLineDashDotDot

    .ForeColor.RGB = RGB(50, 0, 128)

    .BeginArrowheadLength = msoArrowheadShort

    .BeginArrowheadStyle = msoArrowheadOval

    .BeginArrowheadWidth = msoArrowheadNarrow

    .EndArrowheadLength = msoArrowheadLong

    .EndArrowheadStyle = msoArrowheadTriangle

    .EndArrowheadWidth = msoArrowheadWide

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

LineFormat Object Members


PictureFormat.Brightness Property (PowerPoint)

 Copy code hover
[image]

PictureFormat.Brightness Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the brightness of the specified picture or OLE object. Read/write.

Syntax

expression .Brightness

expression A variable that represents a PictureFormat object.

Return Value

Single

Remarks

The value for this property must be a number from 0.0 (dimmest) to 1.0 (brightest).

Example

This example sets the brightness for shape one on myDocument. Shape one must be either a picture or an OLE object.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes(1).PictureFormat.Brightness = 0.3

See also

Concepts

PictureFormat Object

Other resources

PictureFormat Object Members


Ruler.TabStops Property (PowerPoint)

 Copy code hover
[image]

Ruler.TabStops Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a TabStops collection that represents the tab stops for the specified text. Read-only.

Syntax

expression .TabStops

expression A variable that represents a Ruler object.

Return Value

TabStops

Example

This example adds a slide with two text columns to the active presentation, sets a left-aligned tab stop for the title on the new slide, aligns the title box to the left, and assigns title text utilizing the tab stop just created.

VBA Copy code Copy code
With Application.ActivePresentation.Slides _

        .Add(2, ppLayoutTwoColumnText).Shapes

    With .Title.TextFrame

        With .Ruler

            .Levels(1).FirstMargin = 0

            .TabStops.Add ppTabStopLeft, 310

        End With

        .TextRange.ParagraphFormat.Alignment = ppAlignLeft

        .TextRange = "first column" + Chr(9) + "second column"

    End With

End With

See also

Concepts

Ruler Object

Other resources

Ruler Object Members


Slide.Name Property (PowerPoint)

 Copy code hover
[image]

Slide.Name Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When a slide is inserted into a presentation, Microsoft PowerPoint automatically assigns it a name in the form Sliden, where n is an integer that represents the order in which the slide was created in the presentation. For example, the first slide inserted into a presentation is automatically named Slide1. If you copy a slide from one presentation to another, the slide loses the name it had in the first presentation and is automatically assigned a new name in the second presentation. A slide range must contain exactly one slide. Read/write String.

Syntax

expression .Name

expression A variable that represents a Slide object.

Return Value

String

Remarks

You can use the object's name in conjunction with the Item method to return a reference to the object if the Item method for the collection that contains the object takes a Variant argument. For example, if the value of the Name property for a shape is Rectangle 2, then .Shapes("Rectangle 2") will return a reference to that shape.

See also

Concepts

Slide Object

Other resources

Slide Object Members


Enumerations (PowerPoint)

 Copy code hover
[image]

Enumerations (PowerPoint)
Send feedback

Published: July 16, 2012

This section contains documentation for the enumerations in the PowerPoint object model.


XlRowCol Enumeration (PowerPoint)

 Copy code hover
[image]

XlRowCol Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies whether the values that correspond to a particular data series are in rows or columns.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlColumns | 2 | The data series is in a row.
xlRows | 1 | The data series is in a column.


Timing Object (PowerPoint)

 Copy code hover
[image]

Timing Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents timing properties for an animation effect.

Remarks

Use the following read/write properties of the Timing object to manipulate animation timing effects.

Use this property | To change this...
Accelerate | Percentage of the duration over which acceleration should take place
AutoReverse | Whether an effect should play forward and then reverse, thereby doubling the duration
Decelerate | Percentage of the duration over which acceleration should take place
Duration | Length of animation (in seconds)
RepeatCount | Number of times to repeat the animation
RepeatDuration | How long should the repeats last (in seconds)
Restart | Restart behavior of an animation node
RewindAtEnd | Whether an objects return to its beginning position after an effect has ended
SmoothStart | Whether an effect accelerates when it starts
SmoothEnd | Whether an effect decelerates when it ends
TriggerDelayTime | Delay time from when the trigger is enabled (in seconds)
TriggerShape | Which shape is associated with the timing effect
TriggerType | How the timing effect is triggered

Example

To return a Timing object, use the Timing property of the AnimationBehavior or Effect object. The following example sets timing duration information for the main animation.

VBA Copy code Copy code
ActiveWindow.Selection.SlideRange(1).TimeLine.MainSequence(1).Timing.Duration = 5

See also

Concepts

PowerPoint Object Model Reference

Other resources

Timing Object Members


Point.Name Property (PowerPoint)

 Copy code hover
[image]

Point.Name Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the object name. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Name

expression A variable that represents a Point object.

Return Value

String

Remarks

This property corresponds to the name of a data point on a chart. The name is represented in the following format: S<series number>P<point number>.

See also

Concepts

Point Object

Other resources

Point Object Members


ScaleEffect.ToX Property (PowerPoint)

 Copy code hover
[image]

ScaleEffect.ToX Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns a Single that represents the ending width of a ScaleEffect object, specified as a percent of the screen width. Read/write.

Syntax

expression .ToX

expression A variable that represents a ScaleEffect object.

Return Value

Single

Remarks

The default value of this property is Empty, in which case the current position of the object is used.

Use this property in conjunction with the FromX property to resize or jump from one position to another.

Do not confuse this property with the To property of the ColorEffect , RotationEffect , or PropertyEffect objects, which is used to set or change colors, rotations, or other properties of an animation behavior, respectively.

Example

The following example adds an animation path and sets the starting and ending horizontal and vertical positions.

VBA Copy code Copy code
Sub AddMotionPath()

    Dim effCustom As Effect

    Dim animMotion As AnimationBehavior

    Dim shpRectangle As Shape

    'Adds shape and sets effect and animation properties

    Set shpRectangle = ActivePresentation.Slides(1).Shapes _

        .AddShape(Type:=msoShapeRectangle, Left:=100, _

        Top:=100, Width:=50, Height:=50)

    Set effCustom = ActivePresentation.Slides(1).TimeLine.MainSequence _

        .AddEffect(Shape:=shpRectangle, effectId:=msoAnimEffectCustom)

    Set animMotion = effCustom.Behaviors.Add(msoAnimTypeMotion)

    'Sets starting and ending horizontal and vertical positions

    With animMotion.MotionEffect

        .FromX = 0

        .FromY = 0

        .ToX = 50

        .ToY = 50

    End With

End Sub

See also

Concepts

ScaleEffect Object

Other resources

ScaleEffect Object Members


ResampleMediaTask.IsEmbedded Property (PowerPoint)

 Copy code hover
[image]

ResampleMediaTask.IsEmbedded Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns whether the sample is embedded. Read-only.

Syntax

expression .IsEmbedded

expression A variable that represents a ResampleMediaTask object.

See also

Concepts

ResampleMediaTask Object

Other resources

ResampleMediaTask Object Members


MediaBookmark Methods (PowerPoint)

 Copy code hover
[image]

MediaBookmark Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Delete | Deletes the bookmark from the collection.


Series.Select Method (PowerPoint)

 Copy code hover
[image]

Series.Select Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Selects the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Select

expression A variable that represents a Series object.

See also

Concepts

Series Object

Other resources

Series Object Members


Presentation.MergeWithBaseline Method (PowerPoint)

 Copy code hover
[image]

Presentation.MergeWithBaseline Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Merges a presentation into another presentation.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .MergeWithBaseline(withPresentation, baselinePresentation)

expression A variable that represents a Presentation object.

Parameters

Name | Required/Optional | Data Type | Description
withPresentation | Required | String | The path that points to the presentation to be merged with the active presentation.
baselinePresentation | Required | String | The path that points to the presentation to be used as baseline in the merge.

Return Value

None

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


Font.Bold Property (PowerPoint)

 Copy code hover
[image]

Font.Bold Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the character format is bold. Read/write.

Syntax

expression .Bold

expression A variable that represents a Font object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The character format is not bold.
msoTriStateMixed | The specified text range contains both bold and nonbold characters.
msoTrue | The character format is bold.

Example

This example sets characters one through five in the title on slide one to bold.

VBA Copy code Copy code
Set myT = Application.ActivePresentation.Slides(1).Shapes.Title

myT.TextFrame.TextRange.Characters(1, 5).Font.Bold = msoTrue

See also

Concepts

Font Object

Other resources

Font Object Members


Research.Parent Property (PowerPoint)

 Copy code hover
[image]

Research.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Object that represents the parent object of the specified Research object. Read-only.

Syntax

expression .Parent

expression An expression that returns a Research object.

Return Value

Object

See also

Concepts

Research Object

Other resources

Research Object Members


Chart.PlotBy Property (PowerPoint)

 Copy code hover
[image]

Chart.PlotBy Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the way columns or rows are used as data series on the chart. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .PlotBy

expression A variable that represents a Chart object.

Remarks

The value of this property can be one of the following XlRowCol constants:

  • xlColumns

  • xlRows

For PivotChart reports, this property is read-only and always returns xlColumns.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example causes the first chart in the active document to plot data by columns.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.PlotBy = xlColumns

    End If

End With

See also

Concepts

Chart Object

Other resources

Chart Object Members


FillFormat.TextureTile Property (PowerPoint)

 Copy code hover
[image]

FillFormat.TextureTile Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets whether the texture fill is tiled or centered. Read/write.

Syntax

expression .TextureTile

expression An expression that returns a FillFormat object.

Return Value

MsoTriState

Remarks

The value returned by the TextureTile property can be one of these MsoTriState constants.

Constant | Description
msoFalse | The texture fill is centered.
msoTrue | The texture fill is tiled.

The setting of the TextureTile property corresponds to the setting of the Tile picture as texture box on the Fill pane of the Format Picture dialog box in the Microsoft PowerPoint user interface (under Drawing Tools, on the Format Tab, in the Shape Styles group, click Format Shape.)

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


Chart.ClearToMatchColorStyle Method (PowerPoint)

 Copy code hover
[image]

Chart.ClearToMatchColorStyle Method (PowerPoint)
Send feedback

Clears all colors on the specified chart that do not follow the color style applied to the chart.

Version information

Version Added: PowerPoint 2013

Syntax

expression .ClearToMatchColorStyle

expression A variable that represents a Chart object.

Return value

VOID

Remarks

Use this method to reset all the chart color formatting to the color style applied to the chart.


ShapeRange.Chart Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.Chart Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the Chart object of the current ShapeRange object. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Chart

expression A variable that represents a ShapeRange object.

Return Value

Chart

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


Column Methods (PowerPoint)

 Copy code hover
[image]

Column Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Delete | Deletes the specified Column object.
Select | Selects the specified object.


DataLabels Properties (PowerPoint)

 Copy code hover
[image]

DataLabels Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
AutoText | True if all objects in the collection automatically generate appropriate text based on context. Read/write Boolean.
Count | Returns the number of objects in the collection. Read-only Long.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
HorizontalAlignment | Returns or sets the horizontal alignment for the specified object. Read/write Variant.
Name | Returns the name of the object. Read-only String.
NumberFormat | Returns or sets the format code for the object. Read/write String.
NumberFormatLinked | True if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). Read/write Boolean.
NumberFormatLocal | Returns or sets the format code for the object as a string in the language of the user. Read/write Variant.
Orientation | Returns or sets the text orientation. Read/write Long.
Parent | Returns the parent for the specified object. Read-only Object.
Position | Returns a value from the XlDataLabelPosition enumeration indicating the position of the data labels in a chart. Read/write.
ReadingOrder | Returns or sets an XlReadingOrder constant that represents the reading order for the specified object. Read/write Long.
Separator | Sets or returns the separator for the data labels on a chart. Read/write Variant.
Shadow | Returns or sets a value that indicates whether the object has a shadow. Read/write Boolean.
ShowBubbleSize | True to show the bubble size for the data labels on a chart. False to hide the bubble size. Read/write Boolean.
ShowCategoryName | True to display the category name for the data labels on a chart. False to hide the name. Read/write Boolean.
ShowLegendKey | True if the data label legend key is visible. Read/write Boolean.
ShowPercentage | True to display the percentage value for the data labels on a chart. False to hide the value. Read/write Boolean.
ShowRange | Set to True to display the Value From Cells range field in all the chart data labels for a specified chart. Set to False to hide that field. Read/write Boolean.
ShowSeriesName | True to show the series name for the data labels on a chart. False to hide the name. Read/write Boolean.
ShowValue | True to display the data label values for a specified chart. False to hide the values. Read/write Boolean.
VerticalAlignment | Returns or sets the vertical alignment of the specified object. Read/write Variant.


Axis.MinorUnitScale Property (PowerPoint)

 Copy code hover
[image]

Axis.MinorUnitScale Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the minor unit scale value for the category axis when the CategoryType property is set to xlTimeScale. Read/write XlTimeUnit.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .MinorUnitScale

expression A variable that represents an Axis object.

Remarks

MinorUnitScale can be one of the following XlTimeUnit constants:

  • xlMonths

  • xlDays

  • xlYears

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the category axis to use a time scale and sets the major and minor units.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.Axes(xlCategory)

            .CategoryType = xlTimeScale

            .MajorUnit = 5

            .MajorUnitScale = xlDays

            .MinorUnit = 1

            .MinorUnitScale = xlDays

        End With

    End If

End With

See also

Concepts

Axis Object

Other resources

Axis Object Members


HeadersFooters.DateAndTime Property (PowerPoint)

 Copy code hover
[image]

HeadersFooters.DateAndTime Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a HeaderFooter object that represents the date and time item that appears in the lower-left corner of a slide or in the upper-right corner of a notes page, handout, or outline. Read-only.

Syntax

expression .DateAndTime

expression A variable that represents a HeadersFooters object.

Return Value

HeaderFooter

Example

This example sets the date and time format for the slide master in the active presentation. This setting will apply to all slides that are based on this master.

VBA Copy code Copy code
Set myPres = Application.ActivePresentation

With myPres.SlideMaster.HeadersFooters.DateAndTime

    .Format = ppDateTimeMdyy

    .UseFormat = True

End With

See also

Concepts

HeadersFooters Object

Other resources

HeadersFooters Object Members


ParagraphFormat Object (PowerPoint)

 Copy code hover
[image]

ParagraphFormat Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the paragraph formatting of a text range.

Example

Use the ParagraphFormat property to return the ParagraphFormat object. The following example left aligns the paragraphs in shape two on slide one in the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(1).Shapes(2).TextFrame.TextRange _

    .ParagraphFormat.Alignment = ppAlignLeft

See also

Concepts

PowerPoint Object Model Reference

Other resources

ParagraphFormat Object Members


Trendline.Type Property (PowerPoint)

 Copy code hover
[image]

Trendline.Type Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the trendline type. Read/write XlTrendlineType.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Type

expression A variable that represents a Trendline object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example changes the trendline type for the first series of the first chart in the active document. If the series has no trendline, this example fails.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).Trendlines(1).Type = xlMovingAvg

    End If

End With

See also

Concepts

Trendline Object

Other resources

Trendline Object Members


Design.Index Property (PowerPoint)

 Copy code hover
[image]

Design.Index Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Long that represents the index number for an animation effect or design. Read-only.

Syntax

expression .Index

expression A variable that represents a Design object.

Return Value

Long

Example

The following example displays the name and index number for all effects in the main animation sequence of the first slide.

VBA Copy code Copy code
Sub EffectInfo()

    Dim effIndex As Effect

    Dim seqMain As Sequence

    Set seqMain = ActivePresentation.Slides(1).TimeLine.MainSequence

    For Each effIndex In seqMain

        With effIndex

            MsgBox "Effect Name: " & .DisplayName & vbLf & _

                "Effect Index: " & .Index

        End With

    Next

End Sub

See also

Concepts

Design Object

Other resources

Design Object Members


ThreeDFormat.BevelTopType Property (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.BevelTopType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or set the top bevel type. Read/write.

Syntax

expression .BevelTopType

expression A variable that represents a ThreeDFormat object.

Return Value

MsoBevelType

Remarks

The BevelTopType property value can be one of the MsoBevelType constants.

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


DataTable.HasBorderOutline Property (PowerPoint)

 Copy code hover
[image]

DataTable.HasBorderOutline Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if the chart data table has outline borders. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .HasBorderOutline

expression A variable that represents a DataTable object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example causes the data table for the first chart in the active document to be displayed with an outline border and no cell borders.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart

            .HasDataTable = True

            With .DataTable

                .HasBorderHorizontal = False

                .HasBorderVertical = False

                .HasBorderOutline = True

            End With

        End With

    End If

End With

See also

Concepts

DataTable Object

Other resources

DataTable Object Members


Shape.ThreeD Property (PowerPoint)

 Copy code hover
[image]

Shape.ThreeD Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a ThreeDFormat object that contains 3-D - effect formatting properties for the specified shape. Read-only.

Syntax

expression .ThreeD

expression A variable that represents a Shape object.

Return Value

ThreeDFormat

Example

This example sets the depth, extrusion color, extrusion direction, and lighting direction for the 3-D effects applied to shape one on myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(1).ThreeD

    .Visible = True

    .Depth = 50

    'RGB value for purple

    .ExtrusionColor.RGB = RGB(255, 100, 255)

    .SetExtrusionDirection msoExtrusionTop

    .PresetLightingDirection = msoLightingLeft

End With

See also

Concepts

Shape Object

Other resources

Shape Object Members


Gridlines Members (PowerPoint)

 Copy code hover
[image]

Gridlines Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents major or minor gridlines on a chart axis.

Methods

Name | Description
Delete | Deletes the object.
Select | Selects the object.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Border | Returns the border of the object. Read-only ChartBorder.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Name | Returns the name of the object. Read-only String.
Parent | Returns the parent for the specified object. Read-only Object.


Chart.Name Property (PowerPoint)

 Copy code hover
[image]

Chart.Name Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Read/write

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Name

expression An expression that returns a Chart object.

See also

Concepts

Chart Object

Other resources

Chart Object Members


ShapeRange.Count Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a ShapeRange object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


TextFrame2.HorizontalAnchor Property (PowerPoint)

 Copy code hover
[image]

TextFrame2.HorizontalAnchor Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the horizontal alignment of text in a text frame. Read/write.

Syntax

expression .HorizontalAnchor

expression An expression that returns a TextFrame2 object.

Return Value

MsoHorizontalanchor

Remarks

The value of the HorizontalAnchor property can be one of these MsoHorizontalAnchor constants.

msoAnchorNone

msoHorizontalAnchorMixed

msoAnchorCenter

Example

The following example shows how to set the alignment for shape one on slide one to top center.

VBA Copy code Copy code
Public Sub HorizontalAnchor_Example()

    With ActivePresentation.Slides(1).Shapes(1)

        .TextFrame2.HorizontalAnchor = msoAnchorCenter

        .TextFrame2.VerticalAnchor = msoAnchorTop

    End With

End Sub

See also

Concepts

TextFrame2 Object

Other resources

TextFrame2 Object Members


FileConverter Properties (PowerPoint)

 Copy code hover
[image]

FileConverter Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the Microsoft PowerPoint application.
CanOpen | True if the specified file converter is designed to open files. Read-only Boolean.
CanSave | True if the specified file converter is designed to save files. Read-only Boolean.
ClassName | Returns a unique name that identifies the file converter. Read-only String.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Extensions | Returns the file name extensions associated with the specified FileConverter object. Read-only String.
FormatName | Returns the name of the specified file converter. Read-only String.
Name | Returns the name of the specified object. Read-only String.
OpenFormat | Returns the file format of the specified file converter. Read-only Long.
Parent | Returns an Object that represents the parent object of the specified FileConverter object.
Path | Returns the disk or Web path to the specified object. Read-only String.
SaveFormat | Returns the file format of the specified document or file converter. Read-only Long.


View.Slide Property (PowerPoint)

 Copy code hover
[image]

View.Slide Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a Slide object that represents the slide that's currently displayed in the specified document window view. Read/write.

Syntax

expression .Slide

expression A variable that represents a View object.

Remarks

If the currently displayed slide is from an embedded presentation, you can use the Parent property of the Slide object returned by the Slide property to return the embedded presentation that contains the slide. (The Presentation property of the SlideShowWindow object or DocumentWindow object returns the presentation from which the window was created, not the embedded presentation.)

Example

This example places on the Clipboard a copy of the slide that's currently displayed in slide show window one.

VBA Copy code Copy code
SlideShowWindows(1).View.Slide.Copy

This example displays the name of the presentation currently running in slide show window one.

VBA Copy code Copy code
MsgBox SlideShowWindows(1).View.Slide.Parent.Name

See also

Concepts

View Object

Other resources

View Object Members


LegendKey.PictureUnit2 Property (PowerPoint)

 Copy code hover
[image]

LegendKey.PictureUnit2 Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the unit for each picture on the chart if the PictureType property is set to xlStackScale; otherwise, this property is ignored. Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .PictureUnit2

expression A variable that represents a LegendKey object.

See also

Concepts

LegendKey Object

Other resources

LegendKey Object Members


CategoryCollection Object (PowerPoint)

 Copy code hover
[image]

CategoryCollection Object (PowerPoint)
Send feedback

Represents the collection of visible chart categories in the presentation.

Version information

Version Added: PowerPoint 2013

Remarks

Categories are visible if they have not been filtered out of a chart.


Axis.MinorUnitIsAuto Property (PowerPoint)

 Copy code hover
[image]

Axis.MinorUnitIsAuto Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if Microsoft Word calculates minor units for the value axis. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .MinorUnitIsAuto

expression A variable that represents an Axis object.

Remarks

Setting the MinorUnit property sets this property to False.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example automatically calculates major and minor units for the value axis of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.Axes(xlValue)

            .MajorUnitIsAuto = True

            .MinorUnitIsAuto = True

        End With

    End If

End With

See also

Concepts

Axis Object

Other resources

Axis Object Members


TextFrame.Application Property (PowerPoint)

 Copy code hover
[image]

TextFrame.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a TextFrame object.

Return Value

Object

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

TextFrame Object

Other resources

TextFrame Object Members


ShadowFormat.Obscured Property (PowerPoint)

 Copy code hover
[image]

ShadowFormat.Obscured Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the shadow of the specified shape appears filled in and is obscured by the shape. Read/write.

Syntax

expression .Obscured

expression A variable that represents an ShadowFormat object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The shadow has no fill and the outline of the shadow is visible through the shape if the shape has no fill.
msoTrue | The shadow of the specified shape appears filled in and is obscured by the shape, even if the shape has no fill.

Example

This example sets the horizontal and vertical offsets of the shadow for shape three on myDocument. The shadow is offset 5 points to the right of the shape and 3 points above it. If the shape doesn't already have a shadow, this example adds one to it. The shadow will be filled in and obscured by the shape, even if the shape has no fill.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(3).Shadow

    .Visible = True

    .OffsetX = 5

    .OffsetY = -3

    .Obscured = msoTrue

End With

See also

Concepts

ShadowFormat Object

Other resources

ShadowFormat Object Members


TextFrame2.ThreeD Property (PowerPoint)

 Copy code hover
[image]

TextFrame2.ThreeD Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a ThreeDFormat object that represents the three-dimensional formatting of the parent shape. Read-only.

Syntax

expression .ThreeD

expression An expression that returns a TextFrame2 object.

Return Value

ThreeDFormat

See also

Concepts

TextFrame2 Object

Other resources

TextFrame2 Object Members


Chart.Export Method (PowerPoint)

 Copy code hover
[image]

Chart.Export Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Exports the chart in a graphic format.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Export(FileName, FilterName, Interactive)

expression A variable that represents a Chart object.

Parameters

Name | Required/Optional | Data Type | Description
FileName | Required | String | The name of the exported file.
FilterName | Optional | Variant | The language-independent name of the graphic filter as it appears in the registry.
Interactive | Optional | Variant | True to display the dialog box that contains the filter-specific options. False to indicate that Word should use the default values for the filter. The default is False.

Return Value

A Boolean value that indicates whether the export was successful.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example exports the first chart in the active document as a GIF file.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.Export _

            FileName:="current_sales.gif", FilterName:="GIF"

    End If

End With

See also

Concepts

Chart Object

Other resources

Chart Object Members


TextRange.Characters Method (PowerPoint)

 Copy code hover
[image]

TextRange.Characters Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a TextRange object that represents the specified subset of text characters. For information about counting or looping through the characters in a text range, see the TextRange object.

Syntax

expression .Characters(Start, Length)

expression A variable that represents a TextRange object.

Parameters

Name | Required/Optional | Data Type | Description
Start | Optional | Long | The first character in the returned range.
Length | Optional | Long | The number of characters to be returned.

Return Value

TextRange

Remarks

If both Start and Length are omitted, the returned range starts with the first character and ends with the last paragraph in the specified range.

If Start is specified but Length is omitted, the returned range contains one character.

If Length is specified but Start is omitted, the returned range starts with the first character in the specified range.

If Start is greater than the number of characters in the specified text, the returned range starts with the last character in the specified range.

If Length is greater than the number of characters from the specified starting character to the end of the text, the returned range contains all those characters.

Example

This example sets the text for shape two on slide one in the active presentation and then makes the second character a subscript character with a 20-percent offset.

Copy code Copy code
Dim charRange As TextRange

With Application.ActivePresentation.Slides(1).Shapes(2)

    Set charRange = .TextFrame.TextRange.InsertBefore("H2O")

    charRange.Characters(2).Font.BaselineOffset = -0.2

End With

This example formats every subscript character in shape two on slide one as bold.

Copy code Copy code
With Application.ActivePresentation.Slides(1).Shapes(2) _

    .TextFrame.TextRange

    For i = 1 To .Characters.Count

        With .Characters(i).Font

            If .Subscript Then .Bold = True

        End With

    Next

End With

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


CustomLayout Members (PowerPoint)

 Copy code hover
[image]

CustomLayout Members (PowerPoint)
Send feedback

Published: July 12, 2012

Represents a custom layout associated with a presentation design. The CustomLayout object is a member of the CustomLayouts collection.

Methods

Name | Description
Copy | Copies the specified object to the Clipboard.
Cut | Deletes the specified object and places it on the Clipboard.
Delete | Deletes the specified object.
Duplicate | Creates a duplicate of the specified custom layout, adds the new custom layout to the CustomLayouts collection immediately after the original custom layout, and returns a CustomLayout object that represents the duplicate layout.
MoveTo | Moves the specified CustomLayout object to a different position in the CustomLayouts collection.
Select | Selects the specified CustomLayout object.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object. Read-only.
Background | Returns a ShapeRange object that represents the slide background. Read-only.
CustomerData | Returns a CustomerData object.
Design | Returns a Design object that represents the design template associated with the specified custom layout.
DisplayMasterShapes | Determines whether the specified custom layout displays background objects on the slide master. Read/write.
FollowMasterBackground | Determines whether the specified custom layout follows the slide master background. Read/write.
Guides | Returns the Guides collection associated with a custom layout. Read-only.
HeadersFooters | Returns a HeadersFooters collection that represents the header, footer, date and time, and slide number associated with the specified custom layout.
Height | Returns the height of the specified object, in points. Read-only.
Hyperlinks | Returns a Hyperlinks collection that represents all hyperlinks on the slide associated with the specified custom layout. Read-only.
Index | Returns the index position of the specified custom layout in the CustomLayouts collection. Read-only.
MatchingName | Represents the internal name of the specified custom layout. Read/write.
Name | Represents the display name of the specified custom layout. Read/write.
Parent | Returns a reference to the slide master object that is the parent of the specified CustomLayout object. Read-only.
Preserved | Determines whether the specified custom layout is preserved from changes. Read/write.
Shapes | Returns a Shapes collection representing all the layout elements included in the specified custom layout. Read-only.
SlideShowTransition | Returns a SlideShowTransition object that represents the special effects for the specified custom layout. Read-only.
ThemeColorScheme | Returns a ThemeColorScheme object that represents the color scheme of the theme associated with the specified custom layout. Read-only.
TimeLine | Returns a TimeLine object that represents the animation timeline for the slide associated with the specified custom layout. Read-only.
Width | Returns the width of the specified custom layout, in points. Read-only.


PrintOptions Object (PowerPoint)

 Copy code hover
[image]

PrintOptions Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Contains print options for a presentation.

Note Note

Specifying the optional arguments From, To, Copies, and Collate for the PrintOut method sets the corresponding properties of the PrintOptions object.

Example

Use the PrintOptions property to return the PrintOptions object. The following example prints two uncollated color copies of all the slides (whether visible or hidden) in the active presentation. The example also scales each slide to fit the printed page and frames each slide with a thin border.

VBA Copy code Copy code
With ActivePresentation
    With .PrintOptions
        .NumberOfCopies = 2
        .Collate = False
        .PrintColorType = ppPrintColor
        .PrintHiddenSlides = True
        .FitToPage = True
        .FrameSlides = True
        .OutputType = ppPrintOutputSlides
    End With
    .PrintOut
End With

Use the RangeType property to specify whether to print the entire presentation or only a specified part of it. If you want to print only certain slides, set the RangeType property to ppPrintSlideRange, and use the Ranges property to specify which pages to print. The following example prints slides 1, 4, 5, and 6 in the active presentation

VBA Copy code Copy code
With ActivePresentation
    With .PrintOptions
        .RangeType = ppPrintSlideRange
        With .Ranges
            .Add 1, 1
            .Add 4, 6
        End With
    End With
    .PrintOut
End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

PrintOptions Object Members


Tags.Parent Property (PowerPoint)

 Copy code hover
[image]

Tags.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a Tags object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

Tags Object

Other resources

Tags Object Members


AnimationPoint.Time Property (PowerPoint)

 Copy code hover
[image]

AnimationPoint.Time Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns the time at a given animation point. Read/write.

Syntax

expression .Time

expression A variable that represents a SlideShowTransition object.

Return Value

Single

Remarks

The value of the Time property can be any floating-point value between 0 and 1, representing a percentage of the entire timeline from 0% to 100%. For example, a value of 0.2 would correspond to a point in time at 20% of the entire timeline duration from left to right.

Example

This example inserts three fill color animation points in the main sequence animation timeline on the first slide.

VBA Copy code Copy code
Sub BuildTimeLine()

    Dim shpFirst As Shape

    Dim effMain As Effect

    Dim tmlMain As TimeLine

    Dim aniBhvr As AnimationBehavior

    Dim aniPoint As AnimationPoint

    Set shpFirst = ActivePresentation.Slides(1).Shapes(1)

    Set tmlMain = ActivePresentation.Slides(1).TimeLine

    Set effMain = tmlMain.MainSequence.AddEffect(Shape:=shpFirst, _

        EffectId:=msoAnimEffectBlinds)

    Set aniBhvr = tmlMain.MainSequence(1).Behaviors.Add _

        (Type:=msoAnimTypeProperty)

    With aniBhvr.PropertyEffect

        .Property = msoAnimShapeFillColor

        Set aniPoint = .Points.Add

        aniPoint.Time = 0.2

        aniPoint.Value = RGB(0, 0, 0)

        Set aniPoint = .Points.Add

        aniPoint.Time = 0.5

        aniPoint.Value = RGB(0, 255, 0)

        Set aniPoint = .Points.Add

        aniPoint.Time = 1

        aniPoint.Value = RGB(0, 255, 255)

    End With

End Sub

See also

Concepts

AnimationPoint Object

Other resources

AnimationPoint Object Members


PictureFormat.Contrast Property (PowerPoint)

 Copy code hover
[image]

PictureFormat.Contrast Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets the contrast for the specified picture or OLE object.

Syntax

expression .Contrast

expression A variable that represents a PictureFormat object.

Return Value

Single

Remarks

The value for this property must be a number from 0.0 (the least contrast) to 1.0 (the greatest contrast). Read/write.

Example

This example sets the contrast for shape one on myDocument. Shape one must be either a picture or an OLE object.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes(1).PictureFormat.Contrast = 0.8

See also

Concepts

PictureFormat Object

Other resources

PictureFormat Object Members


SlideShowWindows.Count Property (PowerPoint)

 Copy code hover
[image]

SlideShowWindows.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a SlideShowWindows object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

SlideShowWindows Object

Other resources

SlideShowWindows Object Members


Research.Query Method (PowerPoint)

 Copy code hover
[image]

Research.Query Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Specifies a research query.

Syntax

expression .Query(ServiceID, QueryString, QueryLanguage, UseSelection, RequeryContextXML, NewQueryContextXML, LaunchQuery)

expression An expression that returns a Research object.

Parameters

Name | Required/Optional | Data Type | Description
ServiceID | Required | String | Specifies a GUID that identifies the research service.
QueryString | Optional | Variant | Specifies the query string.
QueryLanguage | Optional | Variant | Specifies the query language of the query string.
UseSelection | Optional | Boolean | True to use the current selection as the query string. This overrides the QueryString parameter if set. Default value is False.
RequeryContextXML | Optional | Variant | Requery context information. This allows the caller to add additional information that the service may need. This is an XML string that is placed directly under the RequeryContext element in the query.
NewQueryContextXML | Optional | Variant | New query context information. This allows the caller to add additional information that the service may need. This is an XML string that is placed directly under the NewQueryContext element in the query.
LaunchQuery | Optional | Boolean | True launches the query. False displays the the Research task pane scoped to search the specified research service.

See also

Concepts

Research Object

Other resources

Research Object Members


Application.Run Method (PowerPoint)

 Copy code hover
[image]

Application.Run Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Runs a Visual Basic procedure.

Syntax

expression .Run(MacroName, safeArrayOfParams)

expression A variable that represents an Application object.

Parameters

Name | Required/Optional | Data Type | Description
MacroName | Required | String | The name of the procedure to be run. The string can contain the following: a loaded presentation or add-in file name followed by an exclamation point (!), a valid module name followed by a period (.), and the procedure name. For example, the following is a valid MacroName value: "MyPres.ppt!Module1.Test."
safeArrayOfParams() | Required | Variant | The argument to be passed to the procedure. You cannot specify an object for this argument, and you cannot use named arguments with this method. Arguments must be passed by position.

Return Value

Variant

Example

In this example, the Main procedure defines an array and then runs the macro TestPass, passing the array as an argument.

VBA Copy code Copy code
Sub Main()

    Dim x(1 To 2)

    x(1) = "hi"

    x(2) = 7

    Application.Run "TestPass", x

End Sub

Sub TestPass(x)

    MsgBox x(1)

    MsgBox x(2)

End Sub

See also

Concepts

Application Object

Other resources

Application Object Members


PublishObject.FileName Property (PowerPoint)

 Copy code hover
[image]

PublishObject.FileName Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the path and file name of the Web presentation created when all or part of the active presentation is published. Read/write.

Syntax

expression .FileName

expression A variable that represents a PublishObject object.

Return Value

String

Remarks

The FileName property generates an error if a folder in the specified path does not exist.

Example

This example publishes slides three through five of the active presentation to HTML. It names the published presentation Mallard.htm and saves it in the Test folder.

VBA Copy code Copy code
With ActivePresentation.PublishObjects(1)

    .FileName = "C:\Test\Mallard.htm"

    .SourceType = ppPublishSlideRange

    .RangeStart = 3

    .RangeEnd = 5

    .Publish

End With

See also

Concepts

PublishObject Object

Other resources

PublishObject Object Members


XlDisplayUnit Enumeration (PowerPoint)

 Copy code hover
[image]

XlDisplayUnit Enumeration (PowerPoint)
Send feedback

Published: July 12, 2012

Specifies the display unit label for an axis.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlHundredMillions | -8 | Hundreds of millions.
xlHundreds | -2 | Hundreds.
xlHundredThousands | -5 | Hundreds of thousands.
xlMillionMillions | -10 | Millions of millions.
xlMillions | -6 | Millions.
xlTenMillions | -7 | Tens of millions.
xlTenThousands | -4 | Tens of thousands.
xlThousandMillions | -9 | Thousands of millions.
xlThousands | -3 | Thousands.


Application.ProtectedViewWindows Property (PowerPoint)

 Copy code hover
[image]

Application.ProtectedViewWindows Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a ProtectedViewWindows collection that represents all the Protected View windows that are open in the application. Read-only

Version Information

Version Added: PowerPoint 2010

Syntax

expression .ProtectedViewWindows

expression A variable that represents an Application object.

See also

Concepts

Application Object

Other resources

Application Object Members


CommandEffect Properties (PowerPoint)

 Copy code hover
[image]

CommandEffect Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
bookmark | Sets or returns the bookmark of the specified object. Read/write.
Command | Represents the command to be executed for the command effect. Read/write.
Parent | Returns the parent object for the specified object.
Type | Represents the type of animation. Read/write.


Fonts.Parent Property (PowerPoint)

 Copy code hover
[image]

Fonts.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a Fonts object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

Fonts Object

Other resources

Fonts Object Members


Guide Object (PowerPoint)

 Copy code hover
[image]

Guide Object (PowerPoint)
Send feedback

Represents a drawing guide in the presentation or custom layout.

Version information

Version Added: PowerPoint 2013


Master Object (PowerPoint)

 Copy code hover
[image]

Master Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a slide master, title master, handout master, notes master, or design master.

Example

To return a Master object, use the Master property of the Slide object or SlideRange collection, or use the HandoutMaster , NotesMaster , SlideMaster , or TitleMaster property of the Presentation object. Note that some of these properties are also available from the Design object as well. The following example sets the background fill for the slide master for the active presentation.

VBA Copy code Copy code
ActivePresentation.SlideMaster.Background.Fill _

    .PresetGradient msoGradientHorizontal, 1, msoGradientBrass

To add a title master or design to a presentation and return a Master object that represents the new title master or design, use the AddTitleMaster method. The following example adds a title master to the active presentation and places the title placeholder 10 points from the top of the master.

VBA Copy code Copy code
ActivePresentation.AddTitleMaster.Shapes.Title.Top = 10

See also

Concepts

PowerPoint Object Model Reference

Other resources

Master Object Members


AnimationBehaviors.Item Method (PowerPoint)

 Copy code hover
[image]

AnimationBehaviors.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single AnimationBehavior object from the specified AnimationBehaviors collection.

Syntax

expression .Item(Index)

expression A variable that represents an AnimationBehaviors object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Long | The index number of the single AnimationBehavior object in the collection to be returned.

Return Value

AnimationBehavior

See also

Concepts

AnimationBehaviors Object

Other resources

AnimationBehaviors Object Members


Trendline.Application Property (PowerPoint)

 Copy code hover
[image]

Trendline.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents a Trendline object.

See also

Concepts

Trendline Object

Other resources

Trendline Object Members


Shapes.Application Property (PowerPoint)

 Copy code hover
[image]

Shapes.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a Shapes object.

Return Value

Object

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

Shapes Object

Other resources

Shapes Object Members


FilterEffect.Parent Property (PowerPoint)

 Copy code hover
[image]

FilterEffect.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a FilterEffect object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

FilterEffect Object

Other resources

FilterEffect Object Members


ChartFont.Parent Property (PowerPoint)

 Copy code hover
[image]

ChartFont.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents a ChartFont object.

See also

Concepts

ChartFont Object

Other resources

ChartFont Object Members


ShapeNode.Creator Property (PowerPoint)

 Copy code hover
[image]

ShapeNode.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.

Syntax

expression .Creator

expression A variable that represents a ShapeNode object.

Return Value

Long

Remarks

The Creator property is designed to be used in Microsoft Office applications for the Macintosh.

Example

This example displays a message about the creator of myObject.

VBA Copy code Copy code
Set myObject = Application.ActivePresentation.Slides(1).Shapes(1)

If myObject.Creator = &h50575054 Then

    MsgBox "This is a PowerPoint object"

Else

    MsgBox "This is not a PowerPoint object"

End If

See also

Concepts

ShapeNode Object

Other resources

ShapeNode Object Members


How to: Display Custom Dialog Boxes

 Copy code hover
[image]

How to: Display Custom Dialog Boxes
Send feedback

To test your dialog box in the Visual Basic Editor, click Run Sub/UserForm on the Run menu in the Visual Basic Editor.

To display a dialog box from Visual Basic, use the Show method. The following example displays the dialog box named UserForm1.

VBA Copy code Copy code
Private Sub GetUserName()
    UserForm1.Show
End Sub


AnimationPoint Members (PowerPoint)

 Copy code hover
[image]

AnimationPoint Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents an individual animation point for an animation behavior. The AnimationPoint object is a member of the AnimationPoints collection. The AnimationPoints collection contains all the animation points for an animation behavior.

Methods

Name | Description
Delete | Deletes the specified AnimationPoint object.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Formula | Returns or sets a String that represents a formula to use for calculating an animation. Read/write.
Parent | Returns the parent object for the specified object.
Time | Sets or returns the time at a given animation point. Read/write.
Value | Sets or returns the value of a property for an animation point. Read/write.


Series.FormulaR1C1 Property (PowerPoint)

 Copy code hover
[image]

Series.FormulaR1C1 Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the formula for the object, using R1C1-style notation in the language of the macro. Read/write String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .FormulaR1C1

expression A variable that represents a Series object.

Remarks

If the cell contains a constant, this property returns the constant. If the cell is empty, the property returns an empty string. If the cell contains a formula, the property returns the formula as a string, in the same format in which it would be displayed in the formula bar (including the equal sign).

If you set the value or formula of a cell to a date, Microsoft Word verifies whether that cell is already formatted with one of the date or time number formats. If not, the number format is changed to the default short date number format.

If the range is a one- or two-dimensional range, you can set the formula to a Visual Basic array of the same dimensions. Similarly, you can put the formula into a Visual Basic array.

Setting the formula of a multiple-cell range fills all cells in the range with the formula.

See also

Concepts

Series Object

Other resources

Series Object Members


ResampleMediaTask.AudioCompressionType Property (PowerPoint)

 Copy code hover
[image]

ResampleMediaTask.AudioCompressionType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the audio compression type. Read-only.

Syntax

expression .AudioCompressionType

expression A variable that represents a ResampleMediaTask object.

Return Value

String

See also

Concepts

ResampleMediaTask Object

Other resources

ResampleMediaTask Object Members


Player Members (PowerPoint)

 Copy code hover
[image]

Player Members (PowerPoint)
Send feedback

Published: July 16, 2012

Allows access to playback controls for the associated shape in the current window.

Methods

Name | Description
GoToNextBookmark | Goes to the next bookmark.
GoToPreviousBookmark | Goes to the previous bookmark.
Pause | Pauses the media.
Play | Begins playback for the specified media.
Stop | Stops the media playing in the specified object.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
CurrentPosition | Gets or sets a Long that represents the current position of the player in the media. Read/write.
Parent | Returns the parent object for the specified object. Read-only.
State | Returns the current state of the player. Read-only.


Presentation.CanCheckIn Method (PowerPoint)

 Copy code hover
[image]

Presentation.CanCheckIn Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns True if Microsoft PowerPoint can check in a specified presentation to a server.

Syntax

expression .CanCheckIn

expression A variable that represents a Presentation object.

Return Value

Boolean

Remarks

To take advantage of the collaboration features built into PowerPoint, you must store presentations on a Microsoft SharePoint Portal Server.

Example

This example checks the server to see if the specified presentation can be checked in and, if it can be, closes the presentation and checks it back into server.

VBA Copy code Copy code
Sub CheckInPresentation(strPresentation As String)

    If Presentations(strPresentation).CanCheckIn = True Then

        Presentations(strPresentation).CheckIn

        MsgBox strPresentation & " has been checked in."

    Else

        MsgBox strPresentation & " cannot be checked in " & _

        "at this time.  Please try again later."

    End If

End Sub

To call the subroutine above, use the following subroutine and replace the "http://servername/workspace/report.ppt" file name with an actual file located on a server mentioned in the Remarks section above.

VBA Copy code Copy code
Sub CheckPPTIn()

    Call CheckInPresentation(strPresentation:= _

        "http://servername/workspace/report.ppt")

End Sub

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


SlideShowWindows Methods (PowerPoint)

 Copy code hover
[image]

SlideShowWindows Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Item | Returns a single SlideShowWindow object from the specified SlideShowWindows collection.


FreeformBuilder.Creator Property (PowerPoint)

 Copy code hover
[image]

FreeformBuilder.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.

Syntax

expression .Creator

expression A variable that represents a FreeformBuilder object.

Return Value

Long

Remarks

The Creator property is designed to be used in Microsoft Office applications for the Macintosh.

Example

This example displays a message about the creator of myObject.

VBA Copy code Copy code
Set myObject = Application.ActivePresentation.Slides(1).Shapes(1)

If myObject.Creator = &h50575054 Then

    MsgBox "This is a PowerPoint object"

Else

    MsgBox "This is not a PowerPoint object"

End If

See also

Concepts

FreeformBuilder Object

Other resources

FreeformBuilder Object Members


ExtraColors.Clear Method (PowerPoint)

 Copy code hover
[image]

ExtraColors.Clear Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Clears the extra colors in a presentation.

Syntax

expression .Clear

expression A variable that represents an ExtraColors object.

See also

Concepts

ExtraColors Object

Other resources

ExtraColors Object Members


PlaySettings.RewindMovie Property (PowerPoint)

 Copy code hover
[image]

PlaySettings.RewindMovie Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the first frame of the specified movie is automatically redisplayed as soon as the movie has finished playing. Read/write.

Syntax

expression .RewindMovie

expression A variable that represents a PlaySettings object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The first frame of the specified movie is not automatically redisplayed as soon as the movie has finished playing.
msoTrue | The first frame of the specified movie is automatically redisplayed as soon as the movie has finished playing.

Example

This example specifies that the first frame of the movie represented by shape three on slide one in the active presentation will be automatically redisplayed when the movie has finished playing. Shape three must be a movie object.

VBA Copy code Copy code
Set OLEobj = ActivePresentation.Slides(1).Shapes(3)

OLEobj.AnimationSettings.PlaySettings.RewindMovie = msoTrue

See also

Concepts

PlaySettings Object

Other resources

PlaySettings Object Members


ShapeRange.Line Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.Line Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a LineFormat object that contains line formatting properties for the specified shape. (For a line, the LineFormat object represents the line itself; for a shape with a border, the LineFormat object represents the border.) Read-only.

Syntax

expression .Line

expression A variable that represents a ShapeRange object.

Return Value

LineFormat

Example

This example adds a blue dashed line to myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddLine(10, 10, 250, 250).Line

    .DashStyle = msoLineDashDotDot

    .ForeColor.RGB = RGB(50, 0, 128)

End With

This example adds a cross to the first slide and then sets its border to be 8 points thick and red.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddShape(msoShapeCross, 10, 10, 50, 70).Line

    .Weight = 8

    .ForeColor.RGB = RGB(255, 0, 0)

End With

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


SectionProperties.Parent Property (PowerPoint)

 Copy code hover
[image]

SectionProperties.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object. Read-only.

Syntax

expression .Parent

expression A variable that represents a SectionProperties object.

See also

Concepts

SectionProperties Object

Other resources

SectionProperties Object Members


PropertyEffect Properties (PowerPoint)

 Copy code hover
[image]

PropertyEffect Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
From | Sets or returns a Variant that represents the starting value of an object's property. Read/write.
Parent | Returns the parent object for the specified object.
Points | Returns an AnimationPoints object that represents a point in an animation.
Property | Sets or returns an MsoAnimProperty constant that represents an animation property. Read/write.
To | Sets or returns a Variant that represents the ending value of an object's property. Read/write.


Comment.Left Property (PowerPoint)

 Copy code hover
[image]

Comment.Left Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Single that represents the distance in points from the left edge of the comment to the left edge of the slide. Read-only.

Syntax

expression .Left

expression A variable that represents a Comment object.

See also

Concepts

Comment Object

Other resources

Comment Object Members


AnimationBehavior.Additive Property (PowerPoint)

 Copy code hover
[image]

AnimationBehavior.Additive Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns whether the current animation behavior is combined with other running animations. Read/write.

Syntax

expression .Additive

expression A variable that represents an AnimationBehavior object.

Return Value

MsoAnimAdditive

Remarks

The value of the Additive property can be one of these MsoAnimAdditive constants.

Constant | Description
msoAnimAdditiveAddBase | Does not combine current animation with other animations. The default.
msoAnimAdditiveAddSum | Combines the current animation with other running animations.

Combining animation behaviors is particularly useful for rotation effects. For example, if the current animation changes rotation and another animation is also changing rotation, if this property is set to msoAnimAdditiveAddSum, Microsoft PowerPoint adds together the rotations from both the animations.

Example

The following example allows the current animation behavior to be added to another animation behavior.

VBA Copy code Copy code
Sub SetAdditive()

    Dim animBehavior As AnimationBehavior

    Set animBehavior = ActiveWindow.Selection.SlideRange(1) _

        .TimeLine.MainSequence(1).Behaviors(1)

    animBehavior.Additive = msoAnimAdditiveAddSum

End Sub

See also

Concepts

AnimationBehavior Object

Other resources

AnimationBehavior Object Members


FillFormat.TwoColorGradient Method (PowerPoint)

 Copy code hover
[image]

FillFormat.TwoColorGradient Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets the specified fill to a two-color gradient.

Syntax

expression .TwoColorGradient(Style, Variant)

expression A variable that represents a FillFormat object.

Parameters

Name | Required/Optional | Data Type | Description
Style | Required | MsoGradientStyle | The gradient style.
Variant | Required | Long | The gradient variant.

Remarks

The Style parameter value can be one of these MsoGradientStyle constants.

msoGradientDiagonalDown

msoGradientDiagonalUp

msoGradientFromCenter

msoGradientFromCorner

msoGradientFromTitle

msoGradientHorizontal

msoGradientMixed

msoGradientVertical

The Variant parameter value can be from 1 to 4, corresponding to the four variants on the Gradient sub-tab on the Shape Fill tab. If Style is msoGradientFromTitle or msoGradientFromCenter, this argument can be either 1 or 2.

Example

This example adds a rectangle with a two-color gradient fill to myDocument and sets the background and foreground color for the fill.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddShape(Type:=msoShapeRectangle, Left:=0, _

        Top:=0, Width:=40, Height:=80).Fill

    .ForeColor.RGB = RGB(Red:=128, Green:=0, Blue:=0)

    .BackColor.RGB = RGB(Red:=0, Green:=170, Blue:=170)

    .TwoColorGradient Style:=msoGradientHorizontal, Variant:=1

End With

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


SeriesCollection.Add Method (PowerPoint)

 Copy code hover
[image]

SeriesCollection.Add Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Adds one or more new series to the collection.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Add(Source, Rowcol, SeriesLabels, CategoryLabels, Replace)

expression A variable that represents a SeriesCollection object.

Parameters

Name | Required/Optional | Data Type | Description
Source | Required | Variant | The new data as a string representation of a range contained in the Workbook property of the ChartData object for the chart.
Rowcol | Optional | XlRowCol | One of the enumeration values that specifies whether the new values are in the rows or columns of the specified range.
SeriesLabels | Optional | Variant | True if the first row or column contains the name of the data series. False if the first row or column contains the first data point of the series. If this argument is omitted, Microsoft Word attempts to determine the location of the series name from the contents of the first row or column.
CategoryLabels | Optional | Variant | True if the first row or column contains the name of the category labels. False if the first row or column contains the first data point of the series. If this argument is omitted, Word attempts to determine the location of the category label from the contents of the first row or column.
Replace | Optional | Variant | If CategoryLabels is True and Replace is True, the specified categories replace the categories that currently exist for the series. If Replace is False, the existing categories will not be replaced. The default is False.

Return Value

A Series object that represents the new series.

Remarks

This method does not actually return a Series object as stated in the Object Browser.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example creates a new series for the first chart in the active document. The data source for the new series is range B1:B10 on the workbook associated with the chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection.Add _

            Source:="Sheet1!B1:B10"

    End If

End With

See also

Concepts

SeriesCollection Object

Other resources

SeriesCollection Object Members


SlideShowView.PointerColor Property (PowerPoint)

 Copy code hover
[image]

SlideShowView.PointerColor Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a ColorFormat object that represents the pointer color for the specified presentation during one slide show. Read-only.

Syntax

expression .PointerColor

expression A variable that represents a SlideShowView object.

Return Value

ColorFormat

Remarks

As soon as the slide show is finished, the color reverts to the default color for the presentation.

To change the pointer to a pen, set the PointerType property to ppSlideShowPointerPen.

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


TextStyleLevel Members (PowerPoint)

 Copy code hover
[image]

TextStyleLevel Members (PowerPoint)
Send feedback

Published: July 12, 2012

Contains character and paragraph formatting information for an outline level.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Font | Returns a Font object that represents character formatting. Read-only.
ParagraphFormat | Returns a ParagraphFormat object that represents paragraph formatting for the specified text. Read-only.
Parent | Returns the parent object for the specified object.


ShadowFormat.IncrementOffsetX Method (PowerPoint)

 Copy code hover
[image]

ShadowFormat.IncrementOffsetX Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Changes the horizontal offset of the shadow by the specified number of points.

Syntax

expression .IncrementOffsetX(Increment)

expression A variable that represents an ShadowFormat object.

Parameters

Name | Required/Optional | Data Type | Description
Increment | Required | Single | Specifies how far the shadow offset is to be moved horizontally, in points. A positive value moves the shadow to the right; a negative value moves it to the left.

Remarks

Use the OffsetX property to set the absolute horizontal shadow offset.

Example

This example moves the shadow for shape three on myDocument to the left by 3 points.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes(3).Shadow.IncrementOffsetX -3

See also

Concepts

ShadowFormat Object

Other resources

ShadowFormat Object Members


Slide.ApplyThemeColorScheme Method (PowerPoint)

 Copy code hover
[image]

Slide.ApplyThemeColorScheme Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Applies a color scheme to the specified slide.

Syntax

expression .ApplyThemeColorScheme(themeColorSchemeName)

expression A variable that represents a Slide object.

Parameters

Name | Required/Optional | Data Type | Description
themeColorSchemeName | Required | String | The path and name of the color scheme file to apply to the slide.

See also

Concepts

Slide Object

Other resources

Slide Object Members


ShapeRange.ConnectorFormat Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.ConnectorFormat Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a ConnectorFormat object that contains connector formatting properties. Applies to Shape or ShapeRange objects that represent connectors. Read-only.

Syntax

expression .ConnectorFormat

expression A variable that represents a ShapeRange object.

Return Value

ConnectorFormat

Example

This example adds two rectangles to myDocument, attaches them with a connector, automatically reroutes the connector along the shortest path, and then detaches the connector from the rectangles.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

Set s = myDocument.Shapes

Set firstRect = s.AddShape(msoShapeRectangle, 100, 50, 200, 100)

Set secondRect = s.AddShape(msoShapeRectangle, 300, 300, 200, 100)

With s.AddConnector(msoConnectorCurve, 0, 0, 0, 0).ConnectorFormat

    .BeginConnect firstRect, 1

    .EndConnect secondRect, 1

    .Parent.RerouteConnections

    .BeginDisconnect

    .EndDisconnect

End With

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


Designs Members (PowerPoint)

 Copy code hover
[image]

Designs Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a collection of slide design templates.

Methods

Name | Description
Add | Returns a Design object that represents a new slide design.
Clone | Creates a copy of a Design object.
Item | Returns a single Design object from the specified Designs collection.
Load | Returns a Design object that represents a design loaded into the master list of the specified presentation.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


Table.Cell Method (PowerPoint)

 Copy code hover
[image]

Table.Cell Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Cell object that represents a cell in a table.

Syntax

expression .Cell(Row, Column)

expression A variable that represents a Table object.

Parameters

Name | Required/Optional | Data Type | Description
Row | Required | Long | The number of the row in the table to return. Can be an integer between 1 and the number of rows in the table.
Column | Required | Long | The number of the column in the table to return. Can be an integer between 1 and the number of columns in the table.

Return Value

Cell

Example

This example creates a 3x3 table on a new slide in a new presentation and inserts text into the first cell of the table.

VBA Copy code Copy code
With Presentations.Add
    With .Slides.AddSlide(1, ppLayoutBlank)
        .Shapes.AddTable(3, 3).Select
        .Shapes(1).Table.Cell(1, 1).Shape.TextFrame _
            .TextRange.Text = "Cell 1"
    End With
End With

This example sets the thickness of the bottom border of the cell in row 2, column 1 to two points.

VBA Copy code Copy code
ActivePresentation.Slides(2).Shapes(5).Table _
    .Cell(2, 1).Borders(ppBorderBottom).Weight = 2

See also

Concepts

Table Object

Other resources

Table Object Members


DataTable.ShowLegendKey Property (PowerPoint)

 Copy code hover
[image]

DataTable.ShowLegendKey Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if the data label legend key is visible. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ShowLegendKey

expression A variable that represents a DataTable object.

See also

Concepts

DataTable Object

Other resources

DataTable Object Members


ChartCharacters.Parent Property (PowerPoint)

 Copy code hover
[image]

ChartCharacters.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents a ChartCharacters object.

See also

Concepts

ChartCharacters Object

Other resources

ChartCharacters Object Members


ShapeNode Object (PowerPoint)

 Copy code hover
[image]

ShapeNode Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the geometry and the geometry-editing properties of the nodes in a user-defined freeform.

Remarks

Nodes include the vertices between the segments of the freeform and the control points for curved segments. The ShapeNode object is a member of the ShapeNodes collection. The ShapeNodes collection contains all the nodes in a freeform.

Example

Use Nodes(index), where index is the node index number, to return a single ShapeNode object. If node one in shape three on myDocument is a corner point, the following example makes it a smooth point. For this example to work, shape three must be a freeform.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(3)

    If .Nodes(1).EditingType = msoEditingCorner Then

        .Nodes.SetEditingType 1, msoEditingSmooth

    End If

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

ShapeNode Object Members


CustomLayout.Delete Method (PowerPoint)

 Copy code hover
[image]

CustomLayout.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the specified object.

Syntax

expression .Delete

expression A variable that represents a CustomLayout object.

See also

Concepts

CustomLayout Object

Other resources

CustomLayout Object Members


FillFormat.GradientVariant Property (PowerPoint)

 Copy code hover
[image]

FillFormat.GradientVariant Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the gradient variant for the specified fill as an integer value from 1 to 4 for most gradient fills. Read-only.

Syntax

expression .GradientVariant

expression A variable that represents a FillFormat object.

Return Value

Long

Remarks

If the gradient style is msoGradientFromTitle or msoGradientFromCenter, this property returns either 1 or 2.

The values for this property correspond to the gradient variants (numbered from left to right and from top to bottom) on the Gradient subtab in the Shape Fill tab. Long.

This property is read-only. Use the OneColorGradient, PresetGradient, or TwoColorGradient method to set the gradient variant for the fill.

Example

This example adds a rectangle to myDocument and sets its fill gradient variant to match that of the shape named "rect1." For the example to work, rect1 must have a gradient fill.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    gradVar1 = .Item("rect1").Fill.GradientVariant

    With .AddShape(msoShapeRectangle, 0, 0, 40, 80).Fill

        .ForeColor.RGB = RGB(128, 0, 0)

        .OneColorGradient msoGradientHorizontal, gradVar1, 1

    End With

End With

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


SlideShowTransition.Parent Property (PowerPoint)

 Copy code hover
[image]

SlideShowTransition.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a SlideShowTransition object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

SlideShowTransition Object

Other resources

SlideShowTransition Object Members


Point Properties (PowerPoint)

 Copy code hover
[image]

Point Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
ApplyPictToEnd | True if a picture is applied to the end of the point or all points in the series. Read/write Boolean.
ApplyPictToFront | True if a picture is applied to the front of the point or all points in the series. Read/write Boolean.
ApplyPictToSides | True if a picture is applied to the sides of the point or all points in the series. Read/write Boolean.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
DataLabel | Returns the data label associated with the point. Read-only DataLabel.
Explosion | Returns or sets the explosion value for a pie-chart or doughnut-chart slice. Read/write Long.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Has3DEffect | True if a point has a three-dimensional appearance. Read/write Boolean.
HasDataLabel | True if the point has a data label. Read/write Boolean.
Height | Returns the height, in points, of the object. Read-only.
InvertIfNegative | True if Microsoft Word inverts the pattern in the object when it corresponds to a negative number. Read/write Variant.
Left | Returns a value that represents the distance, in points, from the left edge of the object to the left edge of the chart area. Read-only.
MarkerBackgroundColor | Sets the marker background color as an RGB value or returns the corresponding color index value. Read/write Long.
MarkerBackgroundColorIndex | Returns or sets the marker background color as an index into the current color palette, or as one of the following XlColorIndex constants: xlColorIndexAutomatic or xlColorIndexNone. Read/write Long.
MarkerForegroundColor | Sets the marker foreground color as an RGB value or returns the corresponding color index value. Read/write Long.
MarkerForegroundColorIndex | Returns or sets the marker foreground color as an index into the current color palette, or as one of the following XlColorIndex constants: xlColorIndexAutomatic or xlColorIndexNone. Read/write Long.
MarkerSize | Returns or sets the data-marker size, in points. Read/write Long.
MarkerStyle | Returns or sets the marker style for a point or series in a line chart, scatter chart, or radar chart. Read/write XlMarkerStyle.
Name | Returns the object name. Read-only.
Parent | Returns the parent for the specified object. Read-only Object.
PictureType | Returns or sets a value that specifies how pictures are displayed on a column or bar picture chart. Read/write XlChartPictureType.
PictureUnit2 | Returns or sets the unit for each picture on the chart if the PictureType property is set to xlStackScale (if not, this property is ignored). Read/write Double.
SecondaryPlot | True if the point is in the secondary section of either a pie-of-pie chart or a bar-of-pie chart. Read/write Boolean.
Shadow | Returns or sets a value that indicates whether the object has a shadow. Read/write Boolean.
Top | Returns a value that represents the distance, in points, from the top edge of the object to the top edge of the chart area. Read-only.
Width | Returns the width, in points, of the object. Read-only.


Guide.Position Property (PowerPoint)

 Copy code hover
[image]

Guide.Position Property (PowerPoint)
Send feedback

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

Version information

Version Added: PowerPoint 2013

Syntax

expression .Position

expression A variable that represents a Guide object.

Property value

FLOAT


ChartArea.Copy Method (PowerPoint)

 Copy code hover
[image]

ChartArea.Copy Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Copies the object to the Clipboard.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Copy

expression A variable that represents a ChartArea object.

See also

Concepts

ChartArea Object

Other resources

ChartArea Object Members


ChartGroup.Parent Property (PowerPoint)

 Copy code hover
[image]

ChartGroup.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents a ChartGroup object.

See also

Concepts

ChartGroup Object

Other resources

ChartGroup Object Members


Placeholders.Application Property (PowerPoint)

 Copy code hover
[image]

Placeholders.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a Placeholders object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

Placeholders Object

Other resources

Placeholders Object Members


ActionSetting.Action Property (PowerPoint)

 Copy code hover
[image]

ActionSetting.Action Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the type of action that will occur when the specified shape is clicked or the mouse pointer is positioned over the shape during a slide show. Read/write.

Syntax

expression .Action

expression A variable that represents an ActionSetting object.

Return Value

Long

Remarks

The Action property value can be one of the following PpActionType constants.

ppActionEndShow

ppActionFirstSlide

ppActionHyperlink

ppActionLastSlide

ppActionLastSlideViewed

ppActionMixed

ppActionNamedSlideShow

ppActionNextSlide

ppActionNone

ppActionOLEVerb

ppActionPlay

ppActionPreviousSlide

ppActionRunMacro

ppActionRunProgram

You can use the Action property in conjunction with other properties of the ActionSetting object, as shown in the following table.

If you set the Action property to this value | Use this property | To do this
ppActionHyperlink | Hyperlink | Set properties for the hyperlink that will be followed in response to a mouse action on the shape during a slide show.
ppActionRunProgram | Run | Return or set the name of the program to run in response to a mouse action on the shape during a slide show.
ppActionRunMacro | Run | Return or set the name of the macro to run in response to a mouse action on the shape during a slide show.
ppActionOLEVerb | ActionVerb | Set the OLE verb that will be invoked in response to a mouse action on the shape during a slide show.
ppActionNamedSlideShow | SlideShowName | Set the name of the custom slide show that will run in response to a mouse action on the shape during a slide show.

Example

This example sets shape three (an OLE object) on slide one in the active presentation to be played when the mouse passes over it during a slide show.

VBA Copy code Copy code
With ActivePresentation.Slides(1) _

    .Shapes(3).ActionSettings(ppMouseOver)

        .ActionVerb = "Play"

        .Action = ppActionOLEVerb

End With

See also

Concepts

ActionSetting Object

Other resources

ActionSetting Object Members


Application.VBE Property (PowerPoint)

 Copy code hover
[image]

Application.VBE Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a VBE object that represents the Visual Basic Editor. Read-only.

Syntax

expression .VBE

expression A variable that represents a Application object.

Return Value

VBE

Example

This example sets the name of the active project in the Visual Basic Editor.

VBA Copy code Copy code
Application.VBE.ActiveVBProject.Name = "TestProject"

See also

Concepts

Application Object

Other resources

Application Object Members


Hyperlinks Object (PowerPoint)

 Copy code hover
[image]

Hyperlinks Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

A collection of all the Hyperlink objects on a slide or master.

Example

Use the Hyperlinks property to return the Hyperlinks collection. The following example updates all hyperlinks on slide one in the active presentation that have the specified address.

VBA Copy code Copy code
For Each hl In ActivePresentation.Slides(1).Hyperlinks

    If hl.Address = "c:\current work\sales.ppt" Then

        hl.Address = "c:\new\newsales.ppt"

    End If

Next

Use the Hyperlink property to create a hyperlink and add it to the Hyperlinks collection. The following example sets a hyperlink that will be followed when the user clicks shape three on slide one in the active presentation during a slide show and adds the new hyperlink to the collection. Note that if shape three already has a mouse-click hyperlink defined, the following example will delete this hyperlink from the collection when it adds the new one, so the number of items in the Hyperlinks collection won't change.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(3) _

        .ActionSettings(ppMouseClick)

    .Action = ppActionHyperlink

    .Hyperlink.Address = "http://www.microsoft.com"

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

Hyperlinks Object Members


TextRange.RotatedBounds Method (PowerPoint)

 Copy code hover
[image]

TextRange.RotatedBounds Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the coordinates of the vertices of the text bounding box for the specified text range.

Syntax

expression .RotatedBounds(X1, Y1, X2, Y2, X3, Y3, X4, Y4)

expression A variable that represents a TextRange object.

Parameters

Name | Required/Optional | Data Type | Description
X1, Y1 | Required | Single | Returns the position (in points) of the first vertex of the bounding box for the text within the specified text range.
X2, Y2 | Required | Single | Returns the position (in points) of the second vertex of the bounding box for the text within the specified text range.
X3, Y3 | Required | Single | Returns the position (in points) of the third vertex of the bounding box for the text within the specified text range.
X4, Y4 | Required | Single | Returns the position (in points) of the fourth vertex of the bounding box for the text within the specified text range.

Example

This example uses the values returned by the arguments of the RotatedBounds method to draw a freeform that has the dimensions of the text bounding box for the third word in the text range in shape one on slide one in the active presentation.

VBA Copy code Copy code
Dim x1 As Single, y1 As Single

Dim x2 As Single, y2 As Single

Dim x3 As Single, y3 As Single

Dim x4 As Single, y4 As Single

Dim myDocument As Slide

Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes(1).TextFrame.TextRange.Words(3).RotatedBounds _

    x1, y1, x2, y2, x3, y3, x4, y4

With myDocument.Shapes.BuildFreeform(msoEditingCorner, x1, y1)

    .AddNodes msoSegmentLine, msoEditingAuto, x2, y2

    .AddNodes msoSegmentLine, msoEditingAuto, x3, y3

    .AddNodes msoSegmentLine, msoEditingAuto, x4, y4

    .AddNodes msoSegmentLine, msoEditingAuto, x1, y1

    .ConvertToShape.ZOrder msoSendToBack

End With

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


TextStyleLevels Properties (PowerPoint)

 Copy code hover
[image]

TextStyleLevels Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


Row Members (PowerPoint)

 Copy code hover
[image]

Row Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a row in a table. The Row object is a member of the Rows collection. The Rows collection includes all the rows in the specified table.

Methods

Name | Description
Delete | Deletes the specified Row object.
Select | Selects the specified object.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Cells | Returns a CellRange collection that represents the cells in a table column or row. Read-only.
Height | Returns or sets the height of the specified object, in points. Read/write.
Parent | Returns the parent object for the specified object.


ChartArea Properties (PowerPoint)

 Copy code hover
[image]

ChartArea Properties (PowerPoint)
Send feedback

Published: July 12, 2012

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Height | Returns or sets the height, in points, of the object. Read/write Double.
Left | Returns or sets the distance, in points, from the left edge of the object to the left edge of the chart area. Read/write Double.
Name | Returns the name of the object. Read-only String.
Parent | Returns the parent for the specified object. Read-only Object.
Shadow | Returns or sets a value that determines whether the object has a shadow. Read/write Boolean.
Top | Returns or sets the distance, in points, from the top edge of the object to the top of row 1 (on a worksheet) or the top of the chart area (on a chart). Read/write Double.
Width | Returns or sets the width, in points, of the object. Read/write Double.


XlDisplayBlanksAs Enumeration (PowerPoint)

 Copy code hover
[image]

XlDisplayBlanksAs Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies how blank cells are plotted on a chart.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlInterpolated | 3 | Values are interpolated into the chart.
xlNotPlotted | 1 | Blank cells are not plotted.
xlZero | 2 | Blanks are plotted as zero.


Rows.Item Method (PowerPoint)

 Copy code hover
[image]

Rows.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single Row object from the specified Rows collection.

Syntax

expression .Item(Index)

expression A variable that represents a Rows object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Long | The index number of the single Row object in the collection to be returned.

Return Value

Row

See also

Concepts

Rows Object

Other resources

Rows Object Members


Table.FirstCol Property (PowerPoint)

 Copy code hover
[image]

Table.FirstCol Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether to display special formatting for the first column of the specified table. Read/write.

Syntax

expression .FirstCol

expression A variable that represents a Table object.

Return Value

Boolean

See also

Concepts

Table Object

Other resources

Table Object Members


Chart.ShowAxisFieldButtons Property (PowerPoint)

 Copy code hover
[image]

Chart.ShowAxisFieldButtons Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a value that indicates whether to display axis field buttons on a PivotChart. Read/write

Syntax

expression .ShowAxisFieldButtons

expression A variable that represents a Chart object.

Return Value

Boolean

Remarks

This member is part of the shared chart object model infrastructure between Microsoft Word, Microsoft Excel, and Microsoft PowerPoint and is not meant to be called directly from your code. Reading or setting this property causes a run-time error. In PowerPoint 2013, you cannot create a PivotChart, and copying or pasting a valid PivotChart from Microsoft Excel to a Microsoft PowerPoint presentation will convert the PivotChart to a Chart.

See also

Concepts

Chart Object

Other resources

Chart Object Members


Series.Creator Property (PowerPoint)

 Copy code hover
[image]

Series.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents a Series object.

See also

Concepts

Series Object

Other resources

Series Object Members


Design.Parent Property (PowerPoint)

 Copy code hover
[image]

Design.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a Design object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

Design Object

Other resources

Design Object Members


AxisTitle.Top Property (PowerPoint)

 Copy code hover
[image]

AxisTitle.Top Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the distance, in points, from the top edge of the object to the top of row 1 (on a worksheet) or the top of the chart area (on a chart). Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Top

expression A variable that represents an AxisTitle object.

See also

Concepts

AxisTitle Object

Other resources

AxisTitle Object Members


Sequence Object (PowerPoint)

 Copy code hover
[image]

Sequence Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a collection of Effect objects for a slide's interactive animation sequences. The Sequence collection is a member of the Sequences collection.

Example

Use the MainSequence property of the TimeLine object to return a Sequence object.

Use the AddEffect method to add a new Sequence object. This example adds a shape and an animation sequence to the first shape on the first slide in the active presentation.

VBA Copy code Copy code
Sub NewEffect()

    Dim effNew As Effect

    Dim shpFirst As Shape

    Set shpFirst = ActivePresentation.Slides(1).Shapes(1)

    Set effNew = ActivePresentation.Slides(1).TimeLine.MainSequence.AddEffect _

        (Shape:=shpFirst, effectId:=msoAnimEffectBlinds)

End Sub

See also

Concepts

PowerPoint Object Model Reference

Other resources

Sequence Object Members


SeriesCollection.NewSeries Method (PowerPoint)

 Copy code hover
[image]

SeriesCollection.NewSeries Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Creates a new series.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .NewSeries

expression A variable that represents a SeriesCollection object.

Return Value

A Series object that represents the new series.

Remarks

This method is not available for PivotChart charts.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example adds a new series to the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        Set ns = .Chart.SeriesCollection.NewSeries

    End If

End With

See also

Concepts

SeriesCollection Object

Other resources

SeriesCollection Object Members


Point.SecondaryPlot Property (PowerPoint)

 Copy code hover
[image]

Point.SecondaryPlot Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if the point is in the secondary section of either a pie-of-pie chart or a bar-of-pie chart. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .SecondaryPlot

expression A variable that represents a Point object.

Remarks

This property applies only to points on pie-of-pie charts or bar-of-pie charts.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example moves point four to the secondary section of the chart. You must run this example on either a pie-of-pie chart or a bar-of-pie chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.SeriesCollection(1)

            .Points(4).SecondaryPlot = True

        End With

    End If

End With

See also

Concepts

Point Object

Other resources

Point Object Members


PageSetup.Application Property (PowerPoint)

 Copy code hover
[image]

PageSetup.Application Property (PowerPoint)
See also Send feedback

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a PageSetup object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

PageSetup Object

Other resources

PageSetup Object Members


ColorScheme.Delete Method (PowerPoint)

 Copy code hover
[image]

ColorScheme.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the specified ColorScheme object.

Syntax

expression .Delete

expression A variable that represents a ColorScheme object.

See also

Concepts

ColorScheme Object

Other resources

ColorScheme Object Members


Font.Shadow Property (PowerPoint)

 Copy code hover
[image]

Font.Shadow Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Determines whether the specified text has a shadow. Read/write.

Syntax

expression .Shadow

expression A variable that represents a Font object.

Remarks

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

Constant | Description
msoFalse | The specified text doesn't have a shadow.
msoTriStateMixed | Some of the specified text has a shadow and some doesn't.
msoTrue | The specified text has a shadow.

Example

This example adds a shadow to the title text on slide one in the active presentation.

VBA Copy code Copy code
Application.ActivePresentation.Slides(1).Shapes.Title _

    .TextFrame.TextRange.Font.Shadow = True

See also

Concepts

Font Object

Other resources

Font Object Members


GroupShapes Members (PowerPoint)

 Copy code hover
[image]

GroupShapes Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents the individual shapes within a grouped shape. Each shape is represented by a Shape object. Using the Item method with this object, you can work with single shapes within a group without having to ungroup them.

Methods

Name | Description
Item | Returns a single Shape object from the specified GroupShapes collection.
Range | Returns a ShapeRange object.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
Parent | Returns the parent object for the specified object.


SlideShowTransition Members (PowerPoint)

 Copy code hover
[image]

SlideShowTransition Members (PowerPoint)
Send feedback

Published: July 16, 2012

Contains information about how the specified slide advances during a slide show.

Properties

Name | Description
AdvanceOnClick | Determines whether the specified slide advances when it is clicked during a slide show. Read/write.
AdvanceOnTime | Determines whether the specified slide advances automatically after a specified amount of time has elapsed. Read/write.
AdvanceTime | Returns or sets the amount of time, in seconds, after which the specified slide transition will occur. Read/write.
Application | Returns an Application object that represents the creator of the specified object.
Duration | Returns or sets the length of an animation in seconds. Read/write.
EntryEffect | Returns or sets the special effect applied to the specified slide transition. Read/write.
Hidden | Determines whether the specified slide is hidden during a slide show. Read/write.
LoopSoundUntilNext | Specifies whether the sound that's been set for the specified slide transition loops until the next sound starts. Read/write.
Parent | Returns the parent object for the specified object.
SoundEffect | Returns a SoundEffect object that represents the sound to be played during the transition to the specified slide. Read-only.
Speed | Represents the speed of the transition to the specified slide. Read/write.


ChartTitle.Characters Property (PowerPoint)

 Copy code hover
[image]

ChartTitle.Characters Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a ChartCharacters object that represents a range of characters within the object text. You can use the ChartCharacters object to format characters within a text string.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Characters(Start, Length)

expression A variable that represents a ChartTitle object.

Parameters

Name | Required/Optional | Data Type | Description
Start | Optional | Variant | The first character to be returned. If this argument is either 1 or omitted, this property returns a range of characters starting with the first character.
Length | Optional | Variant | The number of characters to be returned. If this argument is omitted, this property returns the remainder of the string (everything after the Start character).

Remarks

The ChartCharacters object is not a collection.

See also

Concepts

ChartTitle Object

Other resources

ChartTitle Object Members


Axis Object (PowerPoint)

 Copy code hover
[image]

Axis Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a single axis in a chart.

Version Information

Version Added: PowerPoint 2007

Remarks

The Axis object is a member of the Axes collection.

Use Axes(Type, AxisGroup) where Type is the axis type and AxisGroup is the axis group to return a single Axis object. Type can be one of the following XlAxisType constants: xlCategory, xlSeries, or xlValue. AxisGroup can be one of the following XlAxisGroup constants: xlPrimary or xlSecondary. For more information, see the Axes method.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the category axis title text for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.Axes(xlCategory)

            .HasTitle = True

            .AxisTitle.Caption = "1994"

        End With

    End If

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

Axis Object Members


SlideShowTransition.Hidden Property (PowerPoint)

 Copy code hover
[image]

SlideShowTransition.Hidden Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the specified slide is hidden during a slide show. Read/write.

Syntax

expression .Hidden

expression A variable that represents a SlideShowTransition object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified slide is not hidden during a slide show.
msoTrue | The specified slide is hidden during a slide show.

Example

This example makes slide two in the active presentation a hidden slide.

VBA Copy code Copy code
ActivePresentation.Slides(2).SlideShowTransition.Hidden = msoTrue

See also

Concepts

SlideShowTransition Object

Other resources

SlideShowTransition Object Members


ChartData.IsLinked Property (PowerPoint)

 Copy code hover
[image]

ChartData.IsLinked Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if the data for the chart is linked to an external Microsoft Excel workbook. Read-only Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .IsLinked

expression A variable that represents a ChartData object.

Remarks

Using the BreakLink method to remove the link to an Excel workbook sets this property to False.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example verifies whether the data for the first chart in the active document is linked to an external Excel workbook. If the data for the chart is linked, the example then uses the BreakLink method to remove the link. If the data for the chart is not linked, the example uses the Activate method to display the embedded data for the chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.ChartData

            If .IsLinked Then

                .BreakLink

            Else

                .Activate

            End If

        End With

    End If

End With

See also

Concepts

ChartData Object

Other resources

ChartData Object Members


PrintOptions.PrintHiddenSlides Property (PowerPoint)

 Copy code hover
[image]

PrintOptions.PrintHiddenSlides Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether hidden slides in the specified presentation will be printed. Read/write.

Syntax

expression .PrintHiddenSlides

expression A variable that represents a PrintOptions object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The hidden slides in the specified presentation will not be printed.
msoTrue | The hidden slides in the specified presentation will be printed.

Example

This example prints all slides, whether visible or hidden, in the active presentation.

VBA Copy code Copy code
With ActivePresentation

    .PrintOptions.PrintHiddenSlides = msoTrue

    .PrintOut

End With

See also

Concepts

PrintOptions Object

Other resources

PrintOptions Object Members


ChartTitle.Formula Property (PowerPoint)

 Copy code hover
[image]

ChartTitle.Formula Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the object's formula in A1-style notation. Read/write.

Syntax

expression .Formula

expression A variable that represents a ChartTitle object.

See also

Concepts

ChartTitle Object

Other resources

ChartTitle Object Members


ShadowFormat.Type Property (PowerPoint)

 Copy code hover
[image]

ShadowFormat.Type Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the type of shadow. Read/write.

Syntax

expression .Type

expression A variable that represents a ShadowFormat object.

Return Value

MsoShadowType

Remarks

The value of the Type property can be one of these MsoShadowType constants.

msoShadow1

msoShadow10

msoShadow11

msoShadow12

msoShadow13

msoShadow14

msoShadow15

msoShadow16

msoShadow17

msoShadow18

msoShadow19

msoShadow2

msoShadow20

msoShadow3

msoShadow4

msoShadow5

msoShadow6

msoShadow7

msoShadow8

msoShadow9

msoShadowMixed

See also

Concepts

ShadowFormat Object

Other resources

ShadowFormat Object Members


ShapeRange.Visible Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.Visible Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the visibility of the specified object or the formatting applied to the specified object. Read/write.

Syntax

expression .Visible

expression A variable that represents a ShapeRange object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified object or object formatting is not visible.
msoTrue | The specified object or object formatting is visible.

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


PublishObject.HTMLVersion Property (PowerPoint)

 Copy code hover
[image]

PublishObject.HTMLVersion Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets the version of HTML for a published presentation. Read/write.

Syntax

expression .HTMLVersion

expression A variable that represents a PublishObject object.

Return Value

PpHTMLVersion

Remarks

The value returned by the HTMLVersion property can be one of these PpHTMLVersion constants. The default is ppHTMLv4.

ppHTMLAutodetect

ppHTMLDual

ppHTMLv3

ppHTMLv4

Example

This example publishes slides three through five of the active presentation in HTML version 3.0. It names the published presentation Mallard.htm.

VBA Copy code Copy code
With ActivePresentation.PublishObjects(1)

    .FileName = "C:\Test\Mallard.htm"

    .SourceType = ppPublishSlideRange

    .RangeStart = 3

    .RangeEnd = 5

    .HTMLVersion = ppHTMLv3

    .Publish

End With

See also

Concepts

PublishObject Object

Other resources

PublishObject Object Members


ThreeDFormat.IncrementRotationX Method (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.IncrementRotationX Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Changes the rotation of the specified shape around the x-axis by the specified number of degrees.

Syntax

expression .IncrementRotationX(Increment)

expression A variable that represents an ThreeDFormat object.

Parameters

Name | Required/Optional | Data Type | Description
Increment | Required | Single | Specifies how much (in degrees) the rotation of the shape around the x-axis is to be changed. Can be a value from - 90 through 90. A positive value tilts the shape up; a negative value tilts it down.

Remarks

Use the RotationX property to set the absolute rotation of the shape around the x-axis.

You cannot adjust the rotation around the x-axis of the specified shape past the upper or lower limit for the RotationX property (90 degrees to - 90 degrees). For example, if the RotationX property is initially set to 80 and you specify 40 for the Increment argument, the resulting rotation will be 90 (the upper limit for the RotationX property) instead of 120.

To change the rotation of a shape around the y-axis, use the IncrementRotationY method. To change the rotation around the z-axis, use the IncrementRotation method.

Example

This example tilts shape one on myDocument up 10 degrees. Shape one must be an extruded shape for you to see the effect of this code.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes(1).ThreeD.IncrementRotationX 10

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


PrintRange.End Property (PowerPoint)

 Copy code hover
[image]

PrintRange.End Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of the last slide in the specified print range. Read-only.

Syntax

expression .End

expression A variable that represents an PrintRange object.

Return Value

Long

Example

This example displays a message that indicates the starting and ending slide numbers for print range one in the active presentation.

VBA Copy code Copy code
With ActivePresentation.PrintOptions.Ranges

    If .Count > 0 Then

        With .Item(1)

            MsgBox "Print range 1 starts on slide " & .Start & _

                " and ends on slide " & .End

        End With

    End If

End With

See also

Concepts

PrintRange Object

Other resources

PrintRange Object Members


Hyperlink.AddToFavorites Method (PowerPoint)

 Copy code hover
[image]

Hyperlink.AddToFavorites Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Adds a shortcut that represents the specified hyperlink's target document to the Favorites folder in the Windows folder.

Syntax

expression .AddToFavorites

expression A variable that represents a Hyperlink object.

Remarks

The shortcut name is the display name of the document, if that's available; otherwise, the shortcut name is as calculated in HLINK.DLL.

See also

Concepts

Hyperlink Object

Other resources

Hyperlink Object Members


DataLabel.Position Property (PowerPoint)

 Copy code hover
[image]

DataLabel.Position Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the position of the data label. Read/write XlDataLabelPosition.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Position

expression A variable that represents a DataLabel object.

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


UpBars.Application Property (PowerPoint)

 Copy code hover
[image]

UpBars.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents an UpBars object.

See also

Concepts

UpBars Object

Other resources

UpBars Object Members


Broadcast.AttendeeUrl Property (PowerPoint)

 Copy code hover
[image]

Broadcast.AttendeeUrl Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Provides the attendee URL that the presenter must share with remote attendees. Read-only.

Syntax

expression .AttendeeUrl

expression A variable that represents a Broadcast object.

See also

Concepts

Broadcast Object

Other resources

Broadcast Object Members


AnimationBehaviors Object (PowerPoint)

 Copy code hover
[image]

AnimationBehaviors Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a collection of AnimationBehavior objects.

Example

Use the Add method to add an animation behavior. The following example adds a five-second animated rotation behavior to the main animation sequence on the first slide.

VBA Copy code Copy code
Sub AnimationObject()

    Dim timeMain As TimeLine

    'Reference the main animation timeline

    Set timeMain = ActivePresentation.Slides(1).TimeLine

    'Add a five-second animated rotation behavior

    'as the first animation in the main animation sequence

    timeMain.MainSequence(1).Behaviors.Add Type:=msoAnimTypeRotation, Index:=1

End Sub

See also

Concepts

PowerPoint Object Model Reference

Other resources

AnimationBehaviors Object Members


PlaceholderFormat.Parent Property (PowerPoint)

 Copy code hover
[image]

PlaceholderFormat.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a PlaceholderFormat object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

PlaceholderFormat Object

Other resources

PlaceholderFormat Object Members


BulletFormat Properties (PowerPoint)

 Copy code hover
[image]

BulletFormat Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Character | Returns or sets the Unicode character value that is used for bullets in the specified text. Read/write.
Font | Returns a Font object that represents character formatting. Read-only.
Number | Returns the bullet number of a paragraph when the Type property of the BulletFormat object is set to ppBulletNumbered. Read-only.
Parent | Returns the parent object for the specified object.
RelativeSize | Returns or sets the bullet size relative to the size of the first text character in the paragraph. Read/write.
StartValue | Returns or sets the beginning value of a bulleted list when the Type property of the BulletFormat object is set to ppBulletNumbered. Read/write.
Style | Returns or sets the bullet style. Read/write.
Type | Represents the type of bullet. Read/write.
UseTextColor | Determines whether the specified bullets are set to the color of the first text character in the paragraph. Read/write.
UseTextFont | Determines whether the specified bullets are set to the font of the first text character in the paragraph. Read/write.


DataTable Methods (PowerPoint)

 Copy code hover
[image]

DataTable Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Delete | Deletes the object.
Select | Selects the object.


MediaFormat.SampleWidth Property (PowerPoint)

 Copy code hover
[image]

MediaFormat.SampleWidth Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the resolution width of the media sample. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .SampleWidth

expression An expression that returns a MediaFormat object.

Return Value

Long

See also

Concepts

MediaFormat Object

Other resources

MediaFormat Object Members


Application.PresentationPrint Event (PowerPoint)

 Copy code hover
[image]

Application.PresentationPrint Event (PowerPoint)
See also Send feedback

Published: July 16, 2012

Occurs before a presentation is printed.

Syntax

expression .PresentationPrint(Pres)

expression A variable that represents an Application object.

Parameters

Name | Required/Optional | Data Type | Description
Pres | Required | Presentation | The presentation to be printed.

Remarks

For information about using events with the Application object, see How to: Use Events with the Application Object.

Example

This example sets the PrintHiddenSlides property to True so that every time the active presentation is printed, the hidden slides are printed as well.

VBA Copy code Copy code
Private Sub App_PresentationPrint(ByVal Pres As Presentation)

    Pres.PrintOptions.PrintHiddenSlides = True

End Sub

See also

Concepts

Application Object

Other resources

Application Object Members


TabStops.Item Method (PowerPoint)

 Copy code hover
[image]

TabStops.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single tab stop from the specified TabStops collection.

Syntax

expression .Item(Index)

expression A variable that represents a TabStops object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Long | The index number of the single TabStop object in the collection to be returned.

Return Value

TabStop

See also

Concepts

TabStops Object

Other resources

TabStops Object Members


Shape.Copy Method (PowerPoint)

 Copy code hover
[image]

Shape.Copy Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Copies the specified object to the Clipboard.

Syntax

expression .Copy

expression A variable that represents a Shape object.

Remarks

Use the Paste method to paste the contents of the Clipboard.

Example

This example copies shapes one and two on slide one in the active presentation to the Clipboard and then pastes the copies onto slide two.

VBA Copy code Copy code
With ActivePresentation

    .Slides(1).Shapes.Range(Array(1, 2)).Copy

    .Slides(2).Shapes.Paste

End With

See also

Concepts

Shape Object

Other resources

Shape Object Members


TextRange.ParagraphFormat Property (PowerPoint)

 Copy code hover
[image]

TextRange.ParagraphFormat Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a ParagraphFormat object that represents paragraph formatting for the specified text. Read-only.

Syntax

expression .ParagraphFormat

expression A variable that represents a TextRange object.

Return Value

ParagraphFormat

Example

This example sets the line spacing before, within, and after each paragraph in shape two on slide one in the active presentation.

VBA Copy code Copy code
With Application.ActivePresentation.Slides(2).Shapes(2)

    With .TextFrame.TextRange.ParagraphFormat

        .LineRuleWithin = msoTrue

        .SpaceWithin = 1.4

        .LineRuleBefore = msoTrue

        .SpaceBefore = 0.25

        .LineRuleAfter = msoTrue

        .SpaceAfter = 0.75

    End With

End With

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


AnimationPoints.Count Property (PowerPoint)

 Copy code hover
[image]

AnimationPoints.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents an AnimationPoints object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

AnimationPoints Object

Other resources

AnimationPoints Object Members


ColorScheme Properties (PowerPoint)

 Copy code hover
[image]

ColorScheme Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


PrintOptions.ActivePrinter Property (PowerPoint)

 Copy code hover
[image]

PrintOptions.ActivePrinter Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the name of the active printer. Read-only.

Syntax

expression .ActivePrinter

expression A variable that represents a PrintOptions object.

Return Value

String

Remarks

This example displays the name of the active printer.

Example

This example displays the name of the active printer.

VBA Copy code Copy code
Public Sub ActivePrinter_Example()

    Debug.Print ActivePresentation.PrintOptions.ActivePrinter

End Sub

See also

Concepts

PrintOptions Object

Other resources

PrintOptions Object Members


ParagraphFormat.TextDirection Property (PowerPoint)

 Copy code hover
[image]

ParagraphFormat.TextDirection Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the text direction for the specified paragraph. Read/write.

Syntax

expression .TextDirection

expression A variable that represents a ParagraphFormat object.

Return Value

PpDirection

Remarks

The default value depends on the language support you have selected or installed.

The value of the TextDirection property can be one of these PpDirection constants.

ppDirectionLeftToRight

ppDirectionMixed

ppDirectionRightToLeft

Example

This example displays the text direction for the paragraphs in shape two on slide one in the active presentation.

VBA Copy code Copy code
MsgBox ActivePresentation.Slides(1).Shapes(2).TextFrame.TextRange _

    .ParagraphFormat.TextDirection

See also

Concepts

ParagraphFormat Object

Other resources

ParagraphFormat Object Members


TextEffectFormat.Alignment Property (PowerPoint)

 Copy code hover
[image]

TextEffectFormat.Alignment Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the alignment for the specified WordArt. Read/write.

Syntax

expression .Alignment

expression A variable that represents a TextEffectFormat object.

Remarks

The value of the Alignment property can be one of these MsoTextEffectAlignment constants.

msoTextEffectAlignmentCentered

msoTextEffectAlignmentLeft

msoTextEffectAlignmentMixed

msoTextEffectAlignmentRight

msoTextEffectAlignmentStretchJustify

msoTextEffectAlignmentWordJustify

msoTextEffectAlignmentLetterJustify

Example

This example adds a WordArt object to the first slide in the active presentation and then right-aligns the WordArt.

VBA Copy code Copy code
Set mySh = Application.ActivePresentation.Slides(1).Shapes

Set myTE = mySh.AddTextEffect(PresetTextEffect:=msoTextEffect1, _

    Text:="Test Text", FontName:="Palatino", FontSize:=54, _

    FontBold:=True, FontItalic:=False, Left:=100, Top:=50)

myTE.TextEffect.Alignment = msoTextEffectAlignmentRight

See also

Concepts

TextEffectFormat Object

Other resources

TextEffectFormat Object Members


SlideRange.MoveTo Method (PowerPoint)

 Copy code hover
[image]

SlideRange.MoveTo Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Moves the specified object to a specific location within the same collection, renumbering all other items in the collection appropriately.

Syntax

expression .MoveTo(toPos)

expression A variable that represents a SlideRange object.

Parameters

Name | Required/Optional | Data Type | Description
toPos | Required | Long | The index position to which to move the animation effect.

Example

This example moves an animation effect to the second in the animation effects collection for the specified shape.

VBA Copy code Copy code
Sub MoveEffect()

    Dim sldFirst as Slide

    Dim shpFirst As Shape

    Dim effAdd As Effect

    Set sldFirst = ActivePresentation.Slides(1)

    Set shpFirst = sldFirst.Shapes(1)

    Set effAdd = sldFirst.TimeLine.MainSequence.AddEffect _

        (Shape:=shpFirst, effectId:=msoAnimEffectBlinds)

    effAdd.MoveTo toPos:=2

End Sub

This example moves the second slide in the active presentation to the first slide.

VBA Copy code Copy code
Sub MoveSlideToNewLocation()

    ActivePresentation.Slides(2).MoveTo toPos:=1

End Sub

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


Guides Members (PowerPoint)

 Copy code hover
[image]

Guides Members (PowerPoint)
Send feedback

A collection of Guide objects in a presentation or custom layout.

Methods

Name | Description
Add | Adds a new drawing guide to the presentation, slide master, or custom layout.
Item | Returns a Guide object from the collection.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent for the specified object. Read-only Object.


Axis.MajorUnitScale Property (PowerPoint)

 Copy code hover
[image]

Axis.MajorUnitScale Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the major unit scale value for the category axis when the CategoryType property is set to xlTimeScale. Read/write XlTimeUnit.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .MajorUnitScale

expression A variable that represents an Axis object.

Remarks

MajorUnitScale can be one of the following XlTimeUnit constants:

  • xlMonths

  • xlDays

  • xlYears

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the category axis on the first chart in the active document to use a time scale and sets the major and minor units.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.Axes(xlCategory)

            .CategoryType = xlTimeScale

            .MajorUnit = 5

            .MajorUnitScale = xlDays

            .MinorUnit = 1

            .MinorUnitScale = xlDays

        End With

    End If

End With

See also

Concepts

Axis Object

Other resources

Axis Object Members


SlideRange.PrintSteps Property (PowerPoint)

 Copy code hover
[image]

SlideRange.PrintSteps Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of slides you'd need to print to simulate the builds on the specified slide, slide master, or range of slides. Read-only.

Syntax

expression .PrintSteps

expression A variable that represents a SlideRange object.

Return Value

Long

Example

This example sets a variable to the number of slides you'd need to print to simulate the builds on slide one in the active presentation and then displays the value of the variable.

VBA Copy code Copy code
steps1 = ActivePresentation.Slides(1).PrintSteps

MsgBox steps1

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


TextFrame2.PathFormat Property (PowerPoint)

 Copy code hover
[image]

TextFrame2.PathFormat Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the path type for the specified text frame. Read/write.

Syntax

expression .PathFormat

expression An expression that returns a TextFrame2 object.

Return Value

MsoPathType

Remarks

The value of the PathFormat property can be one of these MsoPathType constants. The value msoPathTypeMixed cannot be set. Setting the value msoPathTypeNone removes any existing path.

msoPathType1

msoPathType2

msoPathType3

msoPathType4

msoPathTypeMixed

msoPathTypeNone

See also

Concepts

TextFrame2 Object

Other resources

TextFrame2 Object Members


Presentation.ApplyTemplate2 Method (PowerPoint)

 Copy code hover
[image]

Presentation.ApplyTemplate2 Method (PowerPoint)
Send feedback

Applies a design template and theme variant to the presentation.

Version information

Version Added: PowerPoint 2013

Syntax

expression .ApplyTemplate2(FileName,Variant)

expression A variable that represents a Presentation object.

Parameters

Name | Required/Optional | Data type | Description
FileName | Required | String | Specifies the name of the design template.
Variant | Required | String | Specifies the name of the variant to apply.
FileName | Required | STRING |
Variant | Required | STRING |

Return value

VOID

Example

This example opens a theme file, gets the ID of the third variant in the theme, and applies it to the presentation.

VBA Copy code Copy code
Sub ChangeThemeVariant()

    Dim name As String
    Dim path As String
    Dim variantID As String

    ' Get the name of the active theme family.
    name = ActivePresentation.TemplateName

    ' You need access to the Theme Family in order to access the variants.
    path = "C:\Program Files (x86)\Microsoft Office\Document Themes 15\" & _
        ActivePresentation.TemplateName & ".thmx"

    ' Get the variant ID of the third Variant
    ' and apply that variant to the presentation.
    variantID = PowerPoint.Application.OpenThemeFile(path).ThemeVariants(3).Id
    ActivePresentation.ApplyTemplate2 path, variantID

End Sub


Trendline Members (PowerPoint)

 Copy code hover
[image]

Trendline Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a trendline in a chart.

Methods

Name | Description
ClearFormats | Clears the formatting of the object.
Delete | Deletes the object.
Select | Selects the object.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Backward2 | Returns or sets the number of periods (or units on a scatter chart) that the trendline extends backward. Read/write Double.
Border | Returns the border of the object. Read-only ChartBorder.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
DataLabel | Returns the data label that is associated with the trendline. Read-only DataLabel.
DisplayEquation | True if the equation for the trendline is displayed on the chart (in the same data label as the R-squared value). Read/write Boolean.
DisplayRSquared | True if the R-squared value of the trendline is displayed on the chart (in the same data label as the equation). Read/write Boolean.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Forward2 | Returns or sets the number of periods (or units on a scatter chart) that the trendline extends forward. Read/write Double.
Index | Returns the index number of the object within the collection of similar objects. Read-only Long.
Intercept | Returns or sets the point where the trendline crosses the value axis. Read/write Double.
InterceptIsAuto | True if the point where the trendline crosses the value axis is automatically determined by the regression. Read/write Boolean.
Name | Returns or sets name of the object. Read/write String.
NameIsAuto | True if Microsoft Word automatically determines the name of the trendline. Read/write Boolean.
Order | Returns or sets the trendline order (an integer greater than 1) when the trendline type is xlPolynomial. Read/write Long.
Parent | Returns the parent for the specified object. Read-only Object.
Period | Returns or sets the period for the moving-average trendline. Read/write Long.
Type | Returns or sets the trendline type. Read/write XlTrendlineType.


ProtectedViewWindow.Top Property (PowerPoint)

 Copy code hover
[image]

ProtectedViewWindow.Top Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the distance in points from the top edge of the specified window to the top edge of the application window's client area. Read/write.

Syntax

expression .Top

expression A variable that represents a ProtectedViewWindow object.

Remarks

Setting this property to a very large positive or negative value may position the window completely off the desktop.

See also

Concepts

ProtectedViewWindow Object

Other resources

ProtectedViewWindow Object Members


Presentations.Open2007 Method (PowerPoint)

 Copy code hover
[image]

Presentations.Open2007 Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Opens the specified presentation and provides the option to repair the presentation file. Returns a Presentation object that represents the opened presentation.

Syntax

expression .Open2007(FileName, ReadOnly, Untitled, WithWindow, OpenAndRepair)

expression A variable that represents a Presentations object.

Parameters

Name | Required/Optional | Data Type | Description
FileName | Required | String | The name of the file to open.
ReadOnly | Optional | MsoTriState | Specifies whether the file is opened with read/write or read-only status.
Untitled | Optional | MsoTriState | Specifies whether the file has a title.
WithWindow | Optional | MsoTriState | Specifies whether the file is visible.
OpenAndRepair | Optional | MsoTriState | Specifies whether to repair the file before it is opened to prevent corruption.

Return Value

Presentation

Remarks

With the proper file converters installed, Microsoft Office PowerPoint 2003 and earlier versions open files with the following MS-DOS filename extensions: .ch3, .cht, .doc, .htm, .html, .mcw, .pot, .ppa, .pps, .ppt, .pre, .rtf, .sh3, .shw, .txt, .wk1, .wk3, .wk4, .wpd, .wpf, .wps, and .xls. Microsoft PowerPoint 2013 also opens files with the following filename extensions: .docm, .docx, .mhtml, .potm, .potx, .ppam, .pptm, .pptx, .ppsm, .ppsx, .thmx, .xlsm, and .xlsx.

The ReadOnly parameter value can be one of these MsoTriState constants.

Constant | Description
msoFalse | The default. Opens the file with read/write status.
msoTrue | Opens the file with read-only status.

The Untitled parameter value can be one of these MsoTriState constants.

Constant | Description
msoFalse | The default. The file name automatically becomes the title of the opened presentation.
msoTrue | Opens the file without a title. This is equivalent to creating a copy of the file.

The WithWindow parameter value can be one of these MsoTriState constants.

Constant | Description
msoFalse | Hides the opened presentation.
msoTrue | The default. Opens the file in a visible window.

The OpenAndRepair parameter value can be one of these MsoTriState constants.

Constant | Description
msoFalse | Opens the specified presentation without repair.
msoTrue | The default. Opens the specified file and repairs it.

Example

This example opens a presentation with read-only status and repairs it.

VBA Copy code Copy code
Presentations.Open2007 FileName:="C:\My Documents\pres1.ppt", ReadOnly:=msoTrue, OpenAndRepair:=msoTrue

See also

Concepts

Presentations Object

Other resources

Presentations Object Members


Coauthoring.Application Property (PowerPoint)

 Copy code hover
[image]

Coauthoring.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a Coauthoring object.

See also

Concepts

Coauthoring Object

Other resources

Coauthoring Object Members


MsoAnimAccumulate Enumeration (PowerPoint)

 Copy code hover
[image]

MsoAnimAccumulate Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies whether animation behaviors accumulate.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
msoAnimAccumulateAlways | 2 | Accumulates with other animation behaviors.
msoAnimAccumulateNone | 1 | Does not accumulate.


Borders Members (PowerPoint)

 Copy code hover
[image]

Borders Members (PowerPoint)
Send feedback

Published: July 16, 2012

A collection of LineFormat objects that represent the borders and diagonal lines of a cell or range of cells in a table.

Methods

Name | Description
Item | Returns a LineFormat object for the specified border from the Borders collection.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


ResampleMediaTask.VideoFrameRate Property (PowerPoint)

 Copy code hover
[image]

ResampleMediaTask.VideoFrameRate Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the video frame rate per second of the sample. Read-only.

Syntax

expression .VideoFrameRate

expression A variable that represents a ResampleMediaTask object.

See also

Concepts

ResampleMediaTask Object

Other resources

ResampleMediaTask Object Members


TextRange.Replace Method (PowerPoint)

 Copy code hover
[image]

TextRange.Replace Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Finds specific text in a text range, replaces the found text with a specified string, and returns a TextRange object that represents the first occurrence of the found text. Returns Nothing if no match is found.

Syntax

expression .Replace(FindWhat, ReplaceWhat, After, MatchCase, WholeWords)

expression A variable that represents a TextRange object.

Parameters

Name | Required/Optional | Data Type | Description
FindWhat | Required | String | The text to search for.
ReplaceWhat | Required | String | The text you want to replace the found text with.
After | Optional | Integer | The position of the character (in the specified text range) after which you want to search for the next occurrence of FindWhat. For example, if you want to search from the fifth character of the text range, specify 4 for After. If this argument is omitted, the first character of the text range is used as the starting point for the search.
MatchCase | Optional | MsoTriState | Determines whether a distinction is made on the basis of case.
WholeWords | Optional | MsoTriState | Determines whether only whole words are found.

Return Value

TextRange

Remarks

The MatchCase parameter value can be one of these MsoTriState constants.

Constant | Description
msoFalse | The default. Does not distinguish between uppercase and lowercase characters.
msoTrue | Distinguish between uppercase and lowercase characters.

The WholeWords parameter value can be one of these MsoTriState constants.

Constant | Description
msoFalse | The default. Does not find only entire words.
msoTrue | Finds only entire words.

Example

This example replaces every whole-word occurrence of "like" in all of the shapes in the active presentation with "NOT LIKE".

VBA Copy code Copy code
Sub ReplaceText()

    Dim oSld As Slide

    Dim oShp As Shape

    Dim oTxtRng As TextRange

    Dim oTmpRng As TextRange

    Set oSld = Application.ActivePresentation.Slides(1)

    For Each oShp In oSld.Shapes

        Set oTxtRng = oShp.TextFrame.TextRange

        Set oTmpRng = oTxtRng.Replace(FindWhat:="like", _

            Replacewhat:="NOT LIKE", WholeWords:=True)

        Do While Not oTmpRng Is Nothing

            Set oTxtRng = oTxtRng.Characters(oTmpRng.Start + oTmpRng.Length, _

                oTxtRng.Length)

            Set oTmpRng = oTxtRng.Replace(FindWhat:="like", _

                Replacewhat:="NOT LIKE", WholeWords:=True)

        Loop

    Next oShp

End Sub

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


XlRgbColor Enumeration (PowerPoint)

 Copy code hover
[image]

XlRgbColor Enumeration (PowerPoint)
Send feedback

Published: July 12, 2012

Specifies the RGB color.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlAliceBlue | 16775408 | Alice Blue
xlAntiqueWhite | 14150650 | Antique White
xlAqua | 16776960 | Aqua
xlAquamarine | 13959039 | Aquamarine
xlAzure | 16777200 | Azure
xlBeige | 14480885 | Beige
xlBisque | 12903679 | Bisque
xlBlack | 0 | Black
xlBlanchedAlmond | 13495295 | Blanched Almond
xlBlue | 16711680 | Blue
xlBlueViolet | 14822282 | Blue Violet
xlBrown | 2763429 | Brown
xlBurlyWood | 8894686 | Burly Wood
xlCadetBlue | 10526303 | Cadet Blue
xlChartreuse | 65407 | Chartreuse
xlCoral | 5275647 | Coral
xlCornflowerBlue | 15570276 | Cornflower Blue
xlCornsilk | 14481663 | Cornsilk
xlCrimson | 3937500 | Crimson
xlDarkBlue | 9109504 | Dark Blue
xlDarkCyan | 9145088 | Dark Cyan
xlDarkGoldenrod | 755384 | Dark Goldenrod
xlDarkGray | 11119017 | Dark Gray
xlDarkGreen | 25600 | Dark Green
xlDarkGrey | 11119017 | Dark Grey
xlDarkKhaki | 7059389 | Dark Khaki
xlDarkMagenta | 9109643 | Dark Magenta
xlDarkOliveGreen | 3107669 | Dark Olive Green
xlDarkOrange | 36095 | Dark Orange
xlDarkOrchid | 13382297 | Dark Orchid
xlDarkRed | 139 | Dark Red
xlDarkSalmon | 8034025 | Dark Salmon
xlDarkSeaGreen | 9419919 | Dark Sea Green
xlDarkSlateBlue | 9125192 | Dark Slate Blue
xlDarkSlateGray | 5197615 | Dark Slate Gray
xlDarkSlateGrey | 5197615 | Dark Slate Grey
xlDarkTurquoise | 13749760 | Dark Turquoise
xlDarkViolet | 13828244 | Dark Violet
xlDeepPink | 9639167 | Deep Pink
xlDeepSkyBlue | 16760576 | Deep Sky Blue
xlDimGray | 6908265 | Dim Gray
xlDimGrey | 6908265 | Dim Grey
xlDodgerBlue | 16748574 | Dodger Blue
xlFireBrick | 2237106 | Fire Brick
xlFloralWhite | 15792895 | Floral White
xlForestGreen | 2263842 | Forest Green
xlFuchsia | 16711935 | Fuchsia
xlGainsboro | 14474460 | Gainsboro
xlGhostWhite | 16775416 | Ghost White
xlGold | 55295 | Gold
xlGoldenrod | 2139610 | Goldenrod
xlGray | 8421504 | Gray
xlGreen | 32768 | Green
xlGreenYellow | 3145645 | Green Yellow
xlGrey | 8421504 | Grey
xlHoneydew | 15794160 | Honeydew
xlHotPink | 11823615 | Hot Pink
xlIndianRed | 6053069 | Indian Red
xlIndigo | 8519755 | Indigo
xlIvory | 15794175 | Ivory
xlKhaki | 9234160 | Khaki
xlLavender | 16443110 | Lavender
xlLavenderBlush | 16118015 | Lavender Blush
xlLawnGreen | 64636 | Lawn Green
xlLemonChiffon | 13499135 | Lemon Chiffon
xlLightBlue | 15128749 | Light Blue
xlLightCoral | 8421616 | Light Coral
xlLightCyan | 9145088 | Light Cyan
xlLightGoldenrodYellow | 13826810 | LightGoldenrodYellow
xlLightGray | 13882323 | Light Gray
xlLightGreen | 9498256 | Light Green
xlLightGrey | 13882323 | Light Grey
xlLightPink | 12695295 | Light Pink
xlLightSalmon | 8036607 | Light Salmon
xlLightSeaGreen | 11186720 | Light Sea Green
xlLightSkyBlue | 16436871 | Light Sky Blue
xlLightSlateGray | 10061943 | Light Slate Gray
xlLightSlateGrey | 10061943 | Light Slate Grey
xlLightSteelBlue | 14599344 | Light Steel Blue
xlLightYellow | 14745599 | Light Yellow
xlLime | 65280 | Lime
xlLimeGreen | 3329330 | Lime Green
xlLinen | 15134970 | Linen
xlMaroon | 128 | Maroon
xlMediumAquamarine | 11206502 | Medium Aquamarine
xlMediumBlue | 13434880 | Medium Blue
xlMediumOrchid | 13850042 | Medium Orchid
xlMediumPurple | 14381203 | Medium Purple
xlMediumSeaGreen | 7451452 | Medium Sea Green
xlMediumSlateBlue | 15624315 | Medium Slate Blue
xlMediumSpringGreen | 10156544 | Medium Spring Green
xlMediumTurquoise | 13422920 | Medium Turquoise
xlMediumVioletRed | 8721863 | Medium Violet Red
xlMidnightBlue | 7346457 | Midnight Blue
xlMintCream | 16449525 | Mint Cream
xlMistyRose | 14804223 | Misty Rose
xlMoccasin | 11920639 | Moccasin
xlNavajoWhite | 11394815 | Navajo White
xlNavy | 8388608 | Navy
xlNavyBlue | 8388608 | Navy Blue
xlOldLace | 15136253 | Old Lace
xlOlive | 32896 | Olive
xlOliveDrab | 2330219 | Olive Drab
xlOrange | 42495 | Orange
xlOrangeRed | 17919 | Orange Red
xlOrchid | 14053594 | Orchid
xlPaleGoldenrod | 7071982 | Pale Goldenrod
xlPaleGreen | 10025880 | Pale Green
xlPaleTurquoise | 15658671 | Pale Turquoise
xlPaleVioletRed | 9662683 | Pale Violet Red
xlPapayaWhip | 14020607 | Papaya Whip
xlPeachPuff | 12180223 | Peach Puff
xlPeru | 4163021 | Peru
xlPink | 13353215 | Pink
xlPlum | 14524637 | Plum
xlPowderBlue | 15130800 | Powder Blue
xlPurple | 8388736 | Purple
xlRed | 255 | Red
xlRosyBrown | 9408444 | Rosy Brown
xlRoyalBlue | 14772545 | Royal Blue
xlSalmon | 7504122 | Salmon
xlSandyBrown | 6333684 | Sandy Brown
xlSeaGreen | 5737262 | Sea Green
xlSeashell | 15660543 | Seashell
xlSienna | 2970272 | Sienna
xlSilver | 12632256 | Silver
xlSkyBlue | 15453831 | Sky Blue
xlSlateBlue | 13458026 | Slate Blue
xlSlateGray | 9470064 | Slate Gray
xlSlateGrey | 9470064 | Slate Grey
xlSnow | 16448255 | Snow
xlSpringGreen | 8388352 | Spring Green
xlSteelBlue | 11829830 | Steel Blue
xlTan | 9221330 | Tan
xlTeal | 8421376 | Teal
xlThistle | 14204888 | Thistle
xlTomato | 4678655 | Tomato
xlTurquoise | 13688896 | Turquoise
xlViolet | 15631086 | Violet
xlWheat | 11788021 | Wheat
xlWhite | 16777215 | White
xlWhiteSmoke | 16119285 | White Smoke
xlYellow | 65535 | Yellow
xlYellowGreen | 3329434 | Yellow Green


ChartFormat.Fill Property (PowerPoint)

 Copy code hover
[image]

ChartFormat.Fill Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a FillFormat object for the parent chart element that contains fill formatting properties for the chart element. Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Fill

expression A variable that represents a ChartFormat object.

See also

Concepts

ChartFormat Object

Other resources

ChartFormat Object Members


SlideRange.Tags Property (PowerPoint)

 Copy code hover
[image]

SlideRange.Tags Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Tags object that represents the tags for the specified object. Read-only.

Syntax

expression .Tags

expression A variable that represents a SlideRange object.

Return Value

Tags

Example

Note Note

Tag values are added and stored in uppercase text. You should perform tests on tag values using uppercase text, as shown in the second example.

This example adds a tag named "REGION" and a tag named "PRIORITY" to slide one in the active presentation.

VBA Copy code Copy code
With Application.ActivePresentation.Slides(1).Tags

    .Add "Region", "East"     'Adds "Region" tag with value "East"

    .Add "Priority", "Low"    'Adds "Priority" tag with value "Low"

End With

This example searches through the tags for each slide in the active presentation. If there's a tag named "PRIORITY," a message box displays the tag value. If the object doesn't have a tag named "PRIORITY," the example adds this tag with the value "Unknown."

VBA Copy code Copy code
For Each s In Application.ActivePresentation.Slides

    With s.Tags

        found = False

        For i = 1 To .Count

          If .Name(i) = "PRIORITY" Then

              found = True

              slNum = .Parent.SlideIndex

              MsgBox "Slide " & slNum & " Priority: " & .Value(i)

          End If

        Next

        If Not found Then

          slNum = .Parent.SlideIndex

          .Add "Priority", "Unknown"

          MsgBox "Slide " & slNum & " Priority tag added: Unknown"

        End If

    End With

Next

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


Shapes.AddCurve Method (PowerPoint)

 Copy code hover
[image]

Shapes.AddCurve Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Creates a Bézier curve. Returns a Shape object that represents the new curve.

Syntax

expression .AddCurve(SafeArrayOfPoints)

expression A variable that represents a Shapes object.

Parameters

Name | Required/Optional | Data Type | Description
SafeArrayOfPoints | Required | Variant | An array of coordinate pairs that specifies the vertices and control points of the curve. The first point you specify is the starting vertex, and the next two points are control points for the first Bézier segment. Then, for each additional segment of the curve, you specify a vertex and two control points. The last point you specify is the ending vertex for the curve. Note that you must always specify 3n + 1 points, where n is the number of segments in the curve.

Return Value

Shape

Example

The following example adds a two-segment Bézier curve to myDocument.

VBA Copy code Copy code
Dim pts(1 To 7, 1 To 2) As Single

pts(1, 1) = 0

pts(1, 2) = 0

pts(2, 1) = 72

pts(2, 2) = 72

pts(3, 1) = 100

pts(3, 2) = 40

pts(4, 1) = 20

pts(4, 2) = 50

pts(5, 1) = 90

pts(5, 2) = 120

pts(6, 1) = 60

pts(6, 2) = 30

pts(7, 1) = 150

pts(7, 2) = 90

Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes.AddCurve SafeArrayOfPoints:=pts

See also

Concepts

Shapes Object

Other resources

Shapes Object Members


Application.ActivePrinter Property (PowerPoint)

 Copy code hover
[image]

Application.ActivePrinter Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the name of the active printer. Read-only.

Syntax

expression .ActivePrinter

expression A variable that represents an Application object.

Return Value

String

Remarks

This example displays the name of the active printer.

Example

This example displays the name of the active printer.

VBA Copy code Copy code
MsgBox "The name of the active printer is " & Application.ActivePrinter

See also

Concepts

Application Object

Other resources

Application Object Members


SetEffect.To Property (PowerPoint)

 Copy code hover
[image]

SetEffect.To Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Sets or returns a Variant that represents the value or ending value of the SetEffect object's Type property. Read/write.

Syntax

expression .To

expression A variable that represents a SetEffect object.

Remarks

Do not confuse this property with the ToX or ToY properties of the ScaleEffect and MotionEffect objects, which are only used for scaling or motion effects.

See also

Concepts

SetEffect Object

Other resources

SetEffect Object Members


DataLabel.NumberFormatLocal Property (PowerPoint)

 Copy code hover
[image]

DataLabel.NumberFormatLocal Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the format code for the object as a string in the language of the user. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .NumberFormatLocal

expression A variable that represents a DataLabel object.

Remarks

The Format function uses different format code strings than do the NumberFormat and NumberFormatLocal properties.

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


TextFrame2.AutoSize Property (PowerPoint)

 Copy code hover
[image]

TextFrame2.AutoSize Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a value that indicates whether the size of the specified shape is changed automatically to fit text within its boundaries. Read/write.

Syntax

expression .AutoSize

expression An expression that returns a TextFrame2 object.

Return Value

MsoAutoSize

Remarks

The value of the AutoSize property can be one of the following MsoAutoSize constants.

msoAutoSizeMixed

msoAutoSizeNone

msoAutoSizeShapeToFitText

msoAutoSizeTextToFitShape

Example

The following example shows how to adjust the size of the title text on slide one to fit the text frame that contains it.

VBA Copy code Copy code
Public Sub AutoSize_Example()

    Dim pptSlide As Slide

    Set pptSlide = ActivePresentation.Slides(1)

    With pptSlide.Shapes(1)

        If .TextFrame2.TextRange.Characters.Count < 50 Then

            .TextFrame2.AutoSize = msoAutoSizeTextToFitShape

        End If

    End With

End Sub

See also

Concepts

TextFrame2 Object

Other resources

TextFrame2 Object Members


Table.FirstRow Property (PowerPoint)

 Copy code hover
[image]

Table.FirstRow Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determinew whether to display special formatting for the first row of the specified table. Read/write.

Syntax

expression .FirstRow

expression A variable that represents a Table object.

Return Value

Boolean

See also

Concepts

Table Object

Other resources

Table Object Members


LinkFormat.Parent Property (PowerPoint)

 Copy code hover
[image]

LinkFormat.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a LinkFormat object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

LinkFormat Object

Other resources

LinkFormat Object Members


Point.ApplyDataLabels Method (PowerPoint)

 Copy code hover
[image]

Point.ApplyDataLabels Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Applies data labels to a point.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ApplyDataLabels(Type, LegendKey, AutoText, HasLeaderLines, ShowSeriesName, ShowCategoryName, ShowValue, ShowPercentage, ShowBubbleSize, Separator)

expression A variable that represents a Point object.

Parameters

Name | Required/Optional | Data Type | Description
Type | Optional | XlDataLabelsType | The type of data label to apply.
LegendKey | Optional | Variant | True to show the legend key next to the point. The default is False.
AutoText | Optional | Variant | True if the object automatically generates appropriate text based on content.
HasLeaderLines | Optional | Variant | For the Chart and Series objects, True if the series has leader lines.
ShowSeriesName | Optional | Variant | True to enable the series name for the data label; otherwise, False.
ShowCategoryName | Optional | Variant | True to enable the category name for the data label; otherwise, False.
ShowValue | Optional | Variant | True to enable the value for the data label; otherwise, False.
ShowPercentage | Optional | Variant | True to enable the percentage for the data label; otherwise, False.
ShowBubbleSize | Optional | Variant | True to enable the bubble size for the data label; otherwise, False.
Separator | Optional | Variant | The separator for the data label.

Remarks

The Type parameter can be one of the following XlDataLabelsType constants:

  • xlDataLabelsShowLabelAndPercent—The percentage of the total, and the category for the point. Available only for pie charts and doughnut charts.

  • xlDataLabelsShowPercent—The percentage of the total. Available only for pie charts and doughnut charts.

  • xlDataLabelsShowLabel—The category for the point.

  • xlDataLabelsShowNone—No data labels.

  • xlDataLabelsShowValue—(Default) The value for the point (assumed if this argument is not specified).

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example applies category labels to series one of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1). _

            ApplyDataLabels Type:=xlDataLabelsShowLabel

    End If

End With

See also

Concepts

Point Object

Other resources

Point Object Members


Slides.FindBySlideID Method (PowerPoint)

 Copy code hover
[image]

Slides.FindBySlideID Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Slide object that represents the slide with the specified slide ID number. Each slide is automatically assigned a unique slide ID number when it is created. Use the SlideID property to return a slide's ID number.

Syntax

expression .FindBySlideID(SlideID)

expression A variable that represents a Slides object.

Parameters

Name | Required/Optional | Data Type | Description
SlideID | Required | Long | Specifies the ID number of the slide you want to return. Microsoft PowerPoint assigns this number when the slide is created.

Return Value

Slide

Remarks

Unlike the SlideIndex property, the SlideID property of a Slide object won't change when you add slides to the presentation or rearrange the slides in the presentation. Therefore, using the FindBySlideID method with the slide ID number can be a more reliable way to return a specific Slide object from a Slides collection than using the Item method with the slide's index number.

Example

This example demonstrates how to retrieve the unique ID number for a Slide object and then use this number to return that Slide object from the Slides collection.

VBA Copy code Copy code
Set gslides = ActivePresentation.Slides

'Get slide ID

graphSlideID = gslides.Add(2, ppLayoutChart).SlideID

gslides.FindBySlideID(graphSlideID) _

    .SlideShowTransition.EntryEffect = _

    ppEffectCoverLeft      'Use ID to return specific slide

See also

Concepts

Slides Object

Other resources

Slides Object Members


ChartArea.Left Property (PowerPoint)

 Copy code hover
[image]

ChartArea.Left Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the distance, in points, from the left edge of the object to the left edge of the chart area. Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Left

expression A variable that represents a ChartArea object.

See also

Concepts

ChartArea Object

Other resources

ChartArea Object Members


SeriesLines.Delete Method (PowerPoint)

 Copy code hover
[image]

SeriesLines.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Delete

expression A variable that represents a SeriesLines object.

See also

Concepts

SeriesLines Object

Other resources

SeriesLines Object Members


Chart.ShowAllFieldButtons Property (PowerPoint)

 Copy code hover
[image]

Chart.ShowAllFieldButtons Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a value that indicates whether to display all field buttons on a PivotChart. Read/write.

Syntax

expression .ShowAllFieldButtons

expression A variable that represents a Chart object.

Return Value

Boolean

Remarks

This member is part of the shared chart object model infrastructure between Microsoft Word, Microsoft Excel, and Microsoft PowerPoint and is not meant to be called directly from your code. Reading or setting this property causes a run-time error. In PowerPoint 2013, you cannot create a PivotChart, and copying or pasting a valid PivotChart from Microsoft Excel to a Microsoft PowerPoint presentation will convert the PivotChart to a Chart.

See also

Concepts

Chart Object

Other resources

Chart Object Members


TextFrame2.HasText Property (PowerPoint)

 Copy code hover
[image]

TextFrame2.HasText Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Indicates whether the shape that contains the specified text frame has text associated with it. Read-only.

Syntax

expression .HasText

expression An expression that returns a TextFrame2 object.

Return Value

MsoTriState

Remarks

The value of the HasText property can be one of the following MsoTriState constants.

Constant | Description
msoFalse | The specified text frame does not have text.
msoTrue | The specified text frame has text.

Example

The followin example tests whether shape two on slide one contains text, and if it does, resizes the shape to fit the text.

VBA Copy code Copy code
Public Sub HasText_Example()

    Dim pptSlide As Slide

    Set pptSlide = ActivePresentation.Slides(1)

    With pptSlide.Shapes(2).TextFrame

        If .HasText Then .AutoSize = ppAutoSizeShapeToFitText

    End With

End Sub

See also

Concepts

TextFrame2 Object

Other resources

TextFrame2 Object Members


Presentation.TemplateName Property (PowerPoint)

 Copy code hover
[image]

Presentation.TemplateName Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the name of the design template associated with the specified presentation. Read-only.

Syntax

expression .TemplateName

expression A variable that represents a Presentation object.

Return Value

String

Remarks

The returned string includes the MS-DOS file name extension (for file types that are registered) but doesn't include the full path.

Example

The following example applies the design template Professional.pot to the presentation Pres1.ppt if it is not already applied to it.

VBA Copy code Copy code
With Presentations("Pres1.ppt")

    If .TemplateName <> "Professional.pot" Then

        .ApplyTemplate "c:\program files\microsoft office" & _

            "\templates\presentation designs\Professional.pot"

    End If

End With

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


Hyperlink Methods (PowerPoint)

 Copy code hover
[image]

Hyperlink Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
AddToFavorites | Adds a shortcut that represents the specified hyperlink's target document to the Favorites folder in the Windows folder.
CreateNewDocument | Creates a new Web presentation associated with the specified hyperlink.
Delete | Deletes the specified Hyperlink object.
Follow | Displays the HTML document associated with the specified hyperlink in a new Web browser window.


FileConverter.FormatName Property (PowerPoint)

 Copy code hover
[image]

FileConverter.FormatName Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the name of the specified file converter. Read-only String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .FormatName

expression A variable that represents a FileConverter object.

Remarks

The format names appear in the Save as type box in the Save As dialog box.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

This example displays the format name of the first converter in the FileConverters collection.

VBA Copy code Copy code
MsgBox FileConverters(1).FormatName

This example uses the AvailableConv() array to store the names of all the available file converters.

VBA Copy code Copy code
Dim intTemp As Integer

Dim fcLoop As FileConverter

Dim AvailableConv As Variant

ReDim AvailableConv(FileConverters.Count - 1)

intTemp = 0

For Each fcLoop In FileConverters

    AvailableConv(intTemp) = fcLoop.FormatName

    intTemp = intTemp + 1

Next fcLoop

See also

Concepts

FileConverter Object

Other resources

FileConverter Object Members


Walls.Name Property (PowerPoint)

 Copy code hover
[image]

Walls.Name Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the name of the object. Read-only String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Name

expression A variable that represents a Walls object.

See also

Concepts

Walls Object

Other resources

Walls Object Members


PrintOptions.RangeType Property (PowerPoint)

 Copy code hover
[image]

PrintOptions.RangeType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the type of print range for the presentation. Read/write.

Syntax

expression .RangeType

expression A variable that represents a PrintOptions object.

Remarks

The value of the RangeType property can be one of these PpSlideShowRangeType constants.

ppShowAll

ppShowNamedSlideShow

ppShowSlideRange

To print the slides ranges you've defined in the PrintRanges collection, you must first set the RangeType property to ppPrintSlideRange. Setting RangeType to anything other than ppPrintSlideRange means that the ranges you've defined in the PrintRanges collection won't be applied. However, this doesn't affect the contents of the PrintRanges collection in any way. That is, if you define some print ranges, set the RangeType property to a value other than ppPrintSlideRange, and then later set RangeType back to ppPrintSlideRange, the print ranges you defined before will remain unchanged.

Specifying a value for the To and From arguments of the PrintOut method sets the value of this property.

Example

This example prints the current slide the active presentation.

VBA Copy code Copy code
With ActivePresentation

    .PrintOptions.RangeType = ppPrintCurrent

    .PrintOut

End With

See also

Concepts

PrintOptions Object

Other resources

PrintOptions Object Members


SeriesLines.Creator Property (PowerPoint)

 Copy code hover
[image]

SeriesLines.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents a SeriesLines object.

See also

Concepts

SeriesLines Object

Other resources

SeriesLines Object Members


OLEFormat Members (PowerPoint)

 Copy code hover
[image]

OLEFormat Members (PowerPoint)
Send feedback

Published: July 16, 2012

Contains properties and methods that apply to OLE objects.

Methods

Name | Description
Activate | Activates the specified object.
DoVerb | Requests that an OLE object perform one of its verbs.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
FollowColors | Returns or sets the extent to which the colors in the specified object follow the slide's color scheme. Read/write.
Object | Returns the object that represents the specified OLE object's top-level interface. Read-only.
ObjectVerbs | Returns a ObjectVerbs collection that contains all the OLE verbs for the specified OLE object. Read-only.
Parent | Returns the parent object for the specified object.
ProgID | Returns the programmatic identifier (ProgID) for the specified OLE object. Read-only.


ProtectedViewWindows Object (PowerPoint)

 Copy code hover
[image]

ProtectedViewWindows Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a collection of ProtectedViewWindow objects.

Version Information

Version Added: PowerPoint 2010

See also

Concepts

PowerPoint Object Model Reference

Other resources

ProtectedViewWindows Object Members


Comment.DateTime Property (PowerPoint)

 Copy code hover
[image]

Comment.DateTime Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the date and time a comment was created.

Syntax

expression .DateTime

expression A variable that represents a Comment object.

Return Value

Date

Remarks

Don't confuse this property with the DateAndTime property, which applies to the headers and footers of a slide.

Example

The following example provides information about all the comments for a given slide.

VBA Copy code Copy code
Sub ListComments()

    Dim cmtExisting As Comment

    Dim strAuthorInfo As String

    For Each cmtExisting In ActivePresentation.Slides(1).Comments

        With cmtExisting

            strAuthorInfo = strAuthorInfo & .Author & "'s comment #" & _

                .AuthorIndex & " (" & .Text & ") was created on " & _

                .DateTime & vbCrLf

        End With

    Next

    If strAuthorInfo <> "" Then

        MsgBox strAuthorInfo

    Else

        MsgBox "There are no comments on this slide."

    End If

End Sub

See also

Concepts

Comment Object

Other resources

Comment Object Members


PpActionType Enumeration (PowerPoint)

 Copy code hover
[image]

PpActionType Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the type of action that will occur when the specified shape is clicked or the mouse pointer is positioned over the shape during a slide show.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppActionEndShow | 6 | Slide show ends.
ppActionFirstSlide | 3 | Returns to the first slide.
ppActionHyperlink | 7 | Hyperlink.
ppActionLastSlide | 4 | Moves to the last slide.
ppActionLastSlideViewed | 5 | Moves to the last slide viewed.
ppActionMixed | -2 | Performs a mixed action.
ppActionNamedSlideShow | 10 | Runs the slideshow.
ppActionNextSlide | 1 | Moves to the next slide.
ppActionNone | 0 | No action is performed.
ppActionOLEVerb | 11 | OLE Verb.
ppActionPlay | 12 | Begins the slideshow.
ppActionPreviousSlide | 2 | Moves to the previous slide.
ppActionRunMacro | 8 | Runs a macro.
ppActionRunProgram | 9 | Runs a program.


TickLabels Properties (PowerPoint)

 Copy code hover
[image]

TickLabels Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Alignment | Returns or sets the alignment for the specified phonetic text or tick label. Read/write Long.
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Depth | Returns the number of levels of category tick labels. Read-only Long.
Font | Returns the font of the specified object. Read-only ChartFont.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
MultiLevel | Returns or sets a value that indicates whether an axis is multilevel. Read/write Boolean.
Name | Returns the name of the object. Read-only String.
NumberFormat | Returns or sets the format code for the object. Read/write String.
NumberFormatLinked | True if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). Read/write Boolean.
NumberFormatLocal | Returns or sets the format code for the object as a string in the language of the user. Read/write Variant.
Offset | Returns or sets the distance between the levels of labels, and the distance between the first level and the axis line. Read/write Long.
Orientation | Returns or sets the text orientation. Read/write Long.
Parent | Returns the parent for the specified object. Read-only Object.
ReadingOrder | Returns or sets an XlReadingOrder constant that represents the reading order for the specified object. Read/write Long.


Trendline.Select Method (PowerPoint)

 Copy code hover
[image]

Trendline.Select Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Selects the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Select

expression A variable that represents a Trendline object.

See also

Concepts

Trendline Object

Other resources

Trendline Object Members


TextRange.Application Property (PowerPoint)

 Copy code hover
[image]

TextRange.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a TextRange object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


Series.Points Method (PowerPoint)

 Copy code hover
[image]

Series.Points Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a collection of all the points in the series.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Points(Index)

expression A variable that represents a Series object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Optional | Variant | The name or number of the point.

Return Value

A Points object that represents all the points in the series.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example applies a data label to point one in series one of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).Points(1).ApplyDataLabels

    End If

End With

See also

Concepts

Series Object

Other resources

Series Object Members


SlideShowSettings Properties (PowerPoint)

 Copy code hover
[image]

SlideShowSettings Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
AdvanceMode | Returns or sets a value that indicates how the slide show advances. Read/write.
Application | Returns an Application object that represents the creator of the specified object.
EndingSlide | Returns or sets the last slide to be displayed in the specified slide show. Read/write.
LoopUntilStopped | Determines whether specified slide show loops continuously until the user presses ESC. Read/write.
NamedSlideShows | Returns a NamedSlideShows collection that represents all the named slide shows (custom slide shows) in the specified presentation. Read-only.
Parent | Returns the parent object for the specified object.
PointerColor | Returns the pointer color for the specified presentation as a ColorFormat object. Read-only.
RangeType | Returns or sets the type of slide show to run. Read/write.
ShowMediaControls | Allows access to the media controls in the SlideShowSettings object. Read/write.
ShowPresenterView | Returns the presenter view of the SlideShowSettings object. Read/write.
ShowScrollbar | Determines whether to display the scroll bar during a slide show in browse mode. Read/write.
ShowType | Returns or sets the show type for the specified slide show. Read/write.
ShowWithAnimation | Determines whether the specified slide show displays shapes with assigned animation settings. Read/write.
ShowWithNarration | Determines whether the specified slide show is shown with narration. Read/write.
SlideShowName | Returns or sets the name of the custom slide show to run in response to a mouse action on the shape during a slide show. Read/write.
StartingSlide | Returns or sets the first slide to be displayed in the specified slide show. Read/write.


Chart.ApplyChartTemplate Method (PowerPoint)

 Copy code hover
[image]

Chart.ApplyChartTemplate Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Applies a standard or custom chart type to a chart.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ApplyChartTemplate(FileName)

expression A variable that represents a Chart object.

Parameters

Name | Required/Optional | Data Type | Description
FileName | Required | String | The file name for a chart template.

Remarks

This method does not support taking constants for native or combination charts.

See also

Concepts

Chart Object

Other resources

Chart Object Members


Legend.Height Property (PowerPoint)

 Copy code hover
[image]

Legend.Height Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the height, in points, of the object. Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Height

expression A variable that represents a Legend object.

See also

Concepts

Legend Object

Other resources

Legend Object Members


Presentation.Broadcast Property (PowerPoint)

 Copy code hover
[image]

Presentation.Broadcast Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the Broadcast object of the current Presentation object. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Broadcast

expression A variable that represents a Presentation object.

Return Value

Broadcast

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


SlideRange.Duplicate Method (PowerPoint)

 Copy code hover
[image]

SlideRange.Duplicate Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Creates a duplicate of the specified SlideRange object, adds the new range of slides to the Slides collection immediately after the slide range specified originally, and then returns a SlideRange object that represents the duplicate slides.

Syntax

expression .Duplicate

expression A variable that represents a SlideRange object.

Return Value

SlideRange

Example

This example creates a duplicate of slide one in the active presentation and then sets the background shading and the title text of the new slide. The new slide will be slide two in the presentation.

VBA Copy code Copy code
Set newSlide = ActivePresentation.Slides(1).Duplicate

With newSlide

    .Background.Fill.PresetGradient msoGradientVertical, _

        1, msoGradientGold

    .Shapes.Title.TextFrame.TextRange _

        .Text = "Second Quarter Earnings"

End With

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


PpIndentControl Enumeration (PowerPoint)

 Copy code hover
[image]

PpIndentControl Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Not used in Microsoft PowerPoint 2013.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppIndentControlMixed | -2 | Mixed control.
ppIndentKeepAttr | 2 | Keep attribute.
ppIndentReplaceAttr | 1 | Replace attribute.


ShadowFormat.OffsetX Property (PowerPoint)

 Copy code hover
[image]

ShadowFormat.OffsetX Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the horizontal offset of the shadow from the specified shape, in points. Read/write.

Syntax

expression .OffsetX

expression A variable that represents an ShadowFormat object.

Return Value

Single

Remarks

A positive value offsets the shadow to the right of the shape; a negative value offsets it to the left.

If you want to nudge a shadow horizontally or vertically from its current position without having to specify an absolute position, use the IncrementOffsetX method or the IncrementOffsetY method.

Example

This example sets the horizontal and vertical offsets of the shadow for shape three on myDocument. The shadow is offset 5 points to the right of the shape and 3 points above it. If the shape doesn't already have a shadow, this example adds one to it.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(3).Shadow

    .Visible = True

    .OffsetX = 5

    .OffsetY = -3

End With

See also

Concepts

ShadowFormat Object

Other resources

ShadowFormat Object Members


Adjustments.Item Property (PowerPoint)

 Copy code hover
[image]

Adjustments.Item Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the adjustment value specified by the Index argument. Read/write.

Syntax

expression .Item(Index)

expression A variable that represents an Adjustments object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Long | The index number of the adjustment.

Return Value

Single

Remarks

For linear adjustments, an adjustment value of 0.0 generally corresponds to the left or top edge of the shape, and a value of 1.0 generally corresponds to the right or bottom edge of the shape. However, adjustments can pass beyond shape boundaries for some shapes. For radial adjustments, an adjustment value of 1.0 corresponds to the width of the shape. For angular adjustments, the adjustment value is specified in degrees. The Item property applies only to shapes that have adjustments.

AutoShapes, connectors, and WordArt objects can have up to eight adjustments.

Example

This example adds two crosses to myDocument and then sets the value for adjustment one (the only one on this type of AutoShape) on each cross.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    .AddShape(msoShapeCross, 10, 10, 100, 100) _

        .Adjustments.Item(1) = 0.4

    .AddShape(msoShapeCross, 150, 10, 100, 100) _

        .Adjustments.Item(1) = 0.2

End With

This example has the same result as the previous example even though it doesn't explicitly use the Item property.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    .AddShape(msoShapeCross, 10, 10, 100, 100) _

        .Adjustments(1) = 0.4

    .AddShape(msoShapeCross, 150, 10, 100, 100) _

        .Adjustments(1) = 0.2

End With

See also

Concepts

Adjustments Object

Other resources

Adjustments Object Members


ResampleMediaTasks Properties (PowerPoint)

 Copy code hover
[image]

ResampleMediaTasks Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Count | Returns the number of objects in the specified collection. Read-only.
PercentComplete | Returns the percentage of completion of the sample. Read-only.


ShapeRange.IncrementTop Method (PowerPoint)

 Copy code hover
[image]

ShapeRange.IncrementTop Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Moves the specified shape range vertically by the specified number of points.

Syntax

expression .IncrementTop(Increment)

expression A variable that represents a ShapeRange object.

Parameters

Name | Required/Optional | Data Type | Description
Increment | Required | Single | Specifies how far the shape range is to be moved vertically, in points. A positive value moves the shape range down; a negative value moves it up.

Example

This example duplicates shape one on myDocument, sets the fill for the duplicate, moves it 70 points to the right and 50 points up, and rotates it 30 degrees clockwise.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(1).Duplicate

    .Fill.PresetTextured msoTextureGranite

    .IncrementLeft 70

    .IncrementTop -50

    .IncrementRotation 30

End With

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


Presentation.PasswordEncryptionProvider Property (PowerPoint)

 Copy code hover
[image]

Presentation.PasswordEncryptionProvider Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the name of the algorithm encryption provider that Microsoft PowerPoint uses when it encrypts documents with passwords. Read-only.

Syntax

expression .PasswordEncryptionProvider

expression A variable that represents a Presentation object.

Return Value

String

Remarks

Use the SetPasswordEncryptionOptions method to specify the algorithm PowerPoint uses for encrypting documents with passwords.

Example

This example sets the password encryption options if the password encryption algorithm in use is not the Microsoft RSA SChannel Cryptographic Provider.

VBA Copy code Copy code
Sub PasswordSettings()

    With ActivePresentation

        If .PasswordEncryptionProvider <> "Microsoft RSA SChannel Cryptographic Provider" Then

            .SetPasswordEncryptionOptions _

                PasswordEncryptionProvider:="Microsoft RSA SChannel Cryptographic Provider", _

                PasswordEncryptionAlgorithm:="RC4", _

                PasswordEncryptionKeyLength:=56, _

                PasswordEncryptionFileProperties:=True

        End If

    End With

End Sub

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


NamedSlideShows Properties (PowerPoint)

 Copy code hover
[image]

NamedSlideShows Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


Application.ActivePresentation Property (PowerPoint)

 Copy code hover
[image]

Application.ActivePresentation Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Presentation object that represents the presentation open in the active window. Read-only.

Syntax

expression .ActivePresentation

expression A variable that represents an Application object.

Return Value

Presentation

Remarks

If an embedded presentation is in-place active, the ActivePresentation property returns the embedded presentation.

Example

This example saves the loaded presentation to the application folder in a file named "TestFile."

VBA Copy code Copy code
MyPath = Application.Path & "\TestFile"

Application.ActivePresentation.SaveAs MyPath

See also

Concepts

Application Object

Other resources

Application Object Members


Shape.VerticalFlip Property (PowerPoint)

 Copy code hover
[image]

Shape.VerticalFlip Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the specified shape is flipped around the vertical axis. Read-only.

Syntax

expression .VerticalFlip

expression A variable that represents a Shape object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified shape is not flipped around the vertical axis.
msoTrue | The specified shape is flipped around the vertical axis.

Example

This example restores each shape on myDocument to its original state if it is been flipped horizontally or vertically.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

For Each s In myDocument.Shapes

    If s.HorizontalFlip Then s.Flip msoFlipHorizontal

    If s.VerticalFlip Then s.Flip msoFlipVertical

Next

See also

Concepts

Shape Object

Other resources

Shape Object Members


CustomLayouts.Application Property (PowerPoint)

 Copy code hover
[image]

CustomLayouts.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object. Read-only.

Syntax

expression .Application

expression A variable that represents a CustomLayouts object.

Return Value

Application

See also

Concepts

CustomLayouts Object

Other resources

CustomLayouts Object Members


UpBars.Select Method (PowerPoint)

 Copy code hover
[image]

UpBars.Select Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Selects the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Select

expression A variable that represents an UpBars object.

See also

Concepts

UpBars Object

Other resources

UpBars Object Members


MediaFormat Properties (PowerPoint)

 Copy code hover
[image]

MediaFormat Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
AudioCompressionType | Returns the audio compression format. Read-only.
AudioSamplingRate | Returns the audio sampling rate per second for the media. Read-only.
EndPoint | Gets or sets the time of the end point of the trim region of the media. Read/write.
FadeInDuration | Gets or sets the duration of the fade in of the media, in milliseconds. Read/write.
FadeOutDuration | Gets or sets the duration of the fadeout of the media, in milliseconds. Read/write.
IsEmbedded | Returns whether the media file is embedded. Read-only.
IsLinked | Returns whether the media file is linked. Read-only.
Length | Returns the total length of the media in time units. Read-only.
MediaBookmarks | Returns a MediaBookmarks collection that represents the media bookmarks associated with the specified object. Read-only.
Muted | Returns whether audio playback of the media is muted. Read/write
Parent | Returns the parent object for the specified object. Read-only.
ResamplingStatus | Returns the resampling task status. Read-only.
SampleHeight | Returns the resolution height of the sample media. Read-only.
SampleWidth | Returns the resolution width of the media sample. Read-only.
StartPoint | Gets or sets the start point of the trim region. Read/write.
VideoCompressionType | Returns a String that represents the video compression format of the media. Read-only.
VideoFrameRate | Returns the video frame rate per second of the media. Read-only.
Volume | Gets or sets the volume of the media. Read/write.


TextFrame.MarginRight Property (PowerPoint)

 Copy code hover
[image]

TextFrame.MarginRight Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the distance (in points) between the right edge of the text frame and the right edge of the inscribed rectangle of the shape that contains the text. Read/write.

Syntax

expression .MarginRight

expression A variable that represents a TextFrame object.

Return Value

Single

Example

This example adds a rectangle to myDocument, adds text to the rectangle, and then sets the margins for the text frame.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddShape(msoShapeRectangle, _

        0, 0, 250, 140).TextFrame

    .TextRange.Text = "Here is some test text"

    .MarginBottom = 0

    .MarginLeft = 10

    .MarginRight = 5

    .MarginTop = 20

End With

See also

Concepts

TextFrame Object

Other resources

TextFrame Object Members


Columns.Item Method (PowerPoint)

 Copy code hover
[image]

Columns.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single Column object from the specified Columns collection.

Syntax

expression .Item(Index)

expression A variable that represents a Columns object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Long | The index number of the single Column object in the collection to be returned.

Return Value

Column

See also

Concepts

Columns Object

Other resources

Columns Object Members


DisplayUnitLabel.Select Method (PowerPoint)

 Copy code hover
[image]

DisplayUnitLabel.Select Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Selects the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Select

expression A variable that represents a DisplayUnitLabel object.

See also

Concepts

DisplayUnitLabel Object

Other resources

DisplayUnitLabel Object Members


ChartCharacters.Application Property (PowerPoint)

 Copy code hover
[image]

ChartCharacters.Application Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents a ChartCharacters object.

See also

Concepts

ChartCharacters Object

Other resources

ChartCharacters Object Members


DisplayUnitLabel.Characters Property (PowerPoint)

 Copy code hover
[image]

DisplayUnitLabel.Characters Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a ChartCharacters object that represents a range of characters within the object text. You can use the ChartCharacters object to format characters within a text string.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Characters(Start, Length)

expression A variable that represents a DisplayUnitLabel object.

Parameters

Name | Required/Optional | Data Type | Description
Start | Optional | Variant | The first character to be returned. If this argument is either 1 or omitted, this property returns a range of characters starting with the first character.
Length | Optional | Variant | The number of characters to be returned. If this argument is omitted, this property returns the remainder of the string (everything after the Start character).

Remarks

The ChartCharacters object is not a collection.

See also

Concepts

DisplayUnitLabel Object

Other resources

DisplayUnitLabel Object Members


Shape.Glow Property (PowerPoint)

 Copy code hover
[image]

Shape.Glow Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the glow format for the specified shape. Read-only.

Syntax

expression .Glow

expression A variable that represents a Shape object.

Return Value

MsoGlowType

See also

Concepts

Shape Object

Other resources

Shape Object Members


Theme Members (PowerPoint)

 Copy code hover
[image]

Theme Members (PowerPoint)
Send feedback

Represents a theme (a collection of colors, fonts, and effects).

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Parent | Returns the parent for the specified object. Read-only Object.
ThemeVariants | Returns a ThemeVariants collection that represents the variations in the theme.


Table.HorizBanding Property (PowerPoint)

 Copy code hover
[image]

Table.HorizBanding Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether to display banded rows, in which even rows are formatted differently from odd rows. Read/write.

Syntax

expression .HorizBanding

expression A variable that represents a Table object.

Return Value

Boolean

See also

Concepts

Table Object

Other resources

Table Object Members


PageSetup.Parent Property (PowerPoint)

 Copy code hover
[image]

PageSetup.Parent Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a PageSetup object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

PageSetup Object

Other resources

PageSetup Object Members


SlideShowView.PointerType Property (PowerPoint)

 Copy code hover
[image]

SlideShowView.PointerType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the type of pointer used in the slide show. Read/write.

Syntax

expression .PointerType

expression A variable that represents a SlideShowView object.

Return Value

PpSlideShowPointerType

Remarks

The value of the PointerType property can be one of these PpSlideShowPointerType constants.

ppSlideShowPointerAlwaysHidden

ppSlideShowPointerArrow

ppSlideShowPointerAutoArrow

ppSlideShowPointerNone

ppSlideShowPointerPen

Example

This example runs a slide show of the active presentation, changes the pointer to a pen, and sets the pen color for this slide show to red.

VBA Copy code Copy code
Set currView = ActivePresentation.SlideShowSettings.Run.View

With currView

    .PointerColor.RGB = RGB(255, 0, 0)

    .PointerType = ppSlideShowPointerPen

End With

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


ChartFormat.Parent Property (PowerPoint)

 Copy code hover
[image]

ChartFormat.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents a ChartFormat object.

See also

Concepts

ChartFormat Object

Other resources

ChartFormat Object Members


SlideRange.CustomLayout Property (PowerPoint)

 Copy code hover
[image]

SlideRange.CustomLayout Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a CustomLayout object that represents the custom layout associated with the specified range of slides. Read-only.

Syntax

expression .CustomLayout

expression A variable that represents a SlideRange object.

Return Value

CustomLayout

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


TextStyle Object (PowerPoint)

 Copy code hover
[image]

TextStyle Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents one of three text styles: title text, body text, or default text. Each text style contains a TextFrame object that describes how text is placed within the text bounding box, a Ruler object that contains tab stops and outline indent formatting information, and a TextStyleLevels collection that contains outline text formatting information. The TextStyle object is a member of the TextStyles collection.

Example

Use TextStyles(index), where index is either ppBodyStyle, ppDefaultStyle, or ppTitleStyle, to return a single TextStyle object. The following example sets the font name and font size for level-one body text on all the slides in the active presentation.

VBA Copy code Copy code
With ActivePresentation.SlideMaster _

        .TextStyles(ppBodyStyle).Levels(1)

    With .Font

        .Name = "Arial"

        .Size = 36

    End With

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

TextStyle Object Members


LeaderLines Methods (PowerPoint)

 Copy code hover
[image]

LeaderLines Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Delete | Deletes the object.
Select | Selects the object.


Series.MarkerSize Property (PowerPoint)

 Copy code hover
[image]

Series.MarkerSize Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the data-marker size, in points. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .MarkerSize

expression A variable that represents a Series object.

Remarks

This property can have a value from 2 through 72.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the data-marker size for all data markers on series one for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).MarkerSize = 10

    End If

End With

See also

Concepts

Series Object

Other resources

Series Object Members


Point.Creator Property (PowerPoint)

 Copy code hover
[image]

Point.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents a Point object.

See also

Concepts

Point Object

Other resources

Point Object Members


Slides.Application Property (PowerPoint)

 Copy code hover
[image]

Slides.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a Slides object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

Slides Object

Other resources

Slides Object Members


ShadowFormat Properties (PowerPoint)

 Copy code hover
[image]

ShadowFormat Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Blur | Returns or sets the blur radius of the specified shadow, in points. Read/write.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
ForeColor | Returns or sets a ColorFormat object that represents the foreground color for the fill, line, or shadow. Read/write.
Obscured | Determines whether the shadow of the specified shape appears filled in and is obscured by the shape. Read/write.
OffsetX | Returns or sets the horizontal offset of the shadow from the specified shape, in points. Read/write.
OffsetY | Returns or sets the vertical offset of the shadow from the specified shape, in points. Read/write.
Parent | Returns the parent object for the specified object.
RotateWithShape | Returns or sets whether the specified shadow rotates when the shape it is associated with rotates. Read/write.
Size | Returns or sets the size of the specified shadow as a percentage of the shape size, from 0 to 200. Read/write.
Style | Returns or sets the shadow style. Read/write.
Transparency | Returns or sets the degree of transparency of the specified fill, shadow, or line as a value between 0.0 (opaque) and 1.0 (clear). Read/write.
Type | Represents the type of shadow. Read/write.
Visible | Returns or sets the visibility of the specified object or the formatting applied to the specified object. Read/write.


PpBulletType Enumeration (PowerPoint)

 Copy code hover
[image]

PpBulletType Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the type of bullet.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppBulletMixed | -2 | Mixed bullets
ppBulletNone | 0 | No bullets
ppBulletNumbered | 2 | Numbered bullets
ppBulletPicture | 3 | Bullets with an image
ppBulletUnnumbered | 1 | Unnumbered bullets


ShapeRange.RerouteConnections Method (PowerPoint)

 Copy code hover
[image]

ShapeRange.RerouteConnections Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Reroutes connectors so that they take the shortest possible path between the shapes they connect. To do this, the RerouteConnections method may detach the ends of a connector and reattach them to different connecting sites on the connected shapes.

Syntax

expression .RerouteConnections

expression A variable that represents a ShapeRange object.

Remarks

This method reroutes all connectors attached to the specified shape; if the specified shape is a connector, it is rerouted.

If this method is applied to a connector, only that connector will be rerouted. If this method is applied to a connected shape, all connectors to that shape will be rerouted.

Example

This example adds two rectangles to myDocument, connects them with a curved connector, and then reroutes the connector so that it takes the shortest possible path between the two rectangles. Note that the RerouteConnections method adjusts the size and position of the connector and determines which connecting sites it attaches to, so the values you initially specify for the ConnectionSite arguments used with the BeginConnect and EndConnect methods are irrelevant.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

Set s = myDocument.Shapes

Set firstRect = s.AddShape(msoShapeRectangle, 100, 50, 200, 100)

Set secondRect = s.AddShape(msoShapeRectangle, 300, 300, 200, 100)

Set newConnector = s _

    .AddConnector(msoConnectorCurve, 0, 0, 100, 100)

With newConnector.ConnectorFormat

    .BeginConnect firstRect, 1

    .EndConnect secondRect, 1

End With

newConnector.RerouteConnections

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


Shapes.Title Property (PowerPoint)

 Copy code hover
[image]

Shapes.Title Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Shape object that represents the slide title. Read-only.

Syntax

expression .Title

expression A variable that represents a Shapes object.

Return Value

Shape

Remarks

You can also use the Item method of the Shapes or Placeholders collection to return the slide title.

Example

This example sets the title text on myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes.Title.TextFrame.TextRange.Text = "Welcome!"

See also

Concepts

Shapes Object

Other resources

Shapes Object Members


SlideShowSettings.ShowPresenterView Property (PowerPoint)

 Copy code hover
[image]

SlideShowSettings.ShowPresenterView Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the presenter view of the SlideShowSettings object. Read/write.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .ShowPresenterView

expression A variable that represents a SlideShowSettings object.

See also

Concepts

SlideShowSettings Object

Other resources

SlideShowSettings Object Members


TabStops Members (PowerPoint)

 Copy code hover
[image]

TabStops Members (PowerPoint)
Send feedback

Published: July 16, 2012

A collection of all the TabStop objects on one ruler.

Methods

Name | Description
Add | Creates a tab stop and adds it to the TabStops collection.
Item | Returns a single tab stop from the specified TabStops collection.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
DefaultSpacing | Returns or sets the default tab-stop spacing for the specified text, in points. Read/write.
Parent | Returns the parent object for the specified object.


PrintRange Object (PowerPoint)

 Copy code hover
[image]

PrintRange Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a single range of consecutive slides or pages to be printed.

Remarks

The PrintRange object is a member of the PrintRanges collection. The PrintRanges collection contains all the print ranges that have been defined for the specified presentation.

You can set print ranges in the PrintRanges collection independent of the RangeType setting; these ranges are retained as long as the presentation they're contained in is loaded. The ranges in the PrintRanges collection are applied when the RangeType property is set to ppPrintSlideRange.

Example

Use Ranges(index), where index is the print range index number, to return a single PrintRange object. The following example displays a message that indicates the starting and ending slide numbers for print range one in the active presentation.

VBA Copy code Copy code
With ActivePresentation.PrintOptions.Ranges

    If .Count > 0 Then

        With .Item(1)

            MsgBox "Print range 1 starts on slide " & .Start & _

                " and ends on slide " & .End

        End With

    End If

End With

Use the Add method to create a PrintRange object and add it to the PrintRanges collection. The following example defines three print ranges that represent slide 1, slides 3 through 5, and slides 8 and 9 in the active presentation and then prints the slides in these ranges.

VBA Copy code Copy code
With ActivePresentation.PrintOptions

    .RangeType = ppPrintSlideRange

    With .Ranges

        .ClearAll

        .Add 1, 1

        .Add 3, 5

        .Add 8, 9

    End With

End With

ActivePresentation.PrintOut

See also

Concepts

PowerPoint Object Model Reference

Other resources

PrintRange Object Members


Application.NewPresentation Event (PowerPoint)

 Copy code hover
[image]

Application.NewPresentation Event (PowerPoint)
See also Send feedback

Published: July 16, 2012

Occurs after a presentation is created, as it is added to the Presentations collection.

Syntax

expression .NewPresentation(Pres)

expression An expression that returns a Application object.

Parameters

Name | Required/Optional | Data Type | Description
Pres | Required | Presentation | The new presentation.

Remarks

If your Visual Studio solution includes the Microsoft.Office.Interop.PowerPoint reference, this event maps to the following types:

  • Microsoft.Office.Interop.PowerPoint.EApplication_NewPresentationEventHandler (the NewPresentation delegate.)

  • Microsoft.Office.Interop.PowerPoint.EApplication_Event.NewPresentation (the NewPresentation event.)

Example

This example uses the RGB function to set the slide master background color for the new presentation to salmon pink and then applies the third color scheme to the new presentation.

VBA Copy code Copy code
Private Sub App_NewPresentation(ByVal Pres As Presentation)
    With Pres
        Set CS3 = .ColorSchemes(3)
        CS3.Colors(ppBackground).RGB = RGB(240, 115, 100)
        .SlideMaster.ColorScheme = CS3
    End With
End Sub

See also

Concepts

Application Object

Other resources

Application Object Members


Comment.ProviderID Property (PowerPoint)

 Copy code hover
[image]

Comment.ProviderID Property (PowerPoint)
Send feedback

Returns a String that represents ID of the service providing contact information. Read-only.

Version information

Version Added: PowerPoint 2013

Syntax

expression .ProviderID

expression A variable that represents a Comment object.

Property value

STRING


Application.Activate Method (PowerPoint)

 Copy code hover
[image]

Application.Activate Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Activates the specified object.

Syntax

expression .Activate

expression A variable that represents an Application object.

See also

Concepts

Application Object

Other resources

Application Object Members


PlaySettings.PlayOnEntry Property (PowerPoint)

 Copy code hover
[image]

PlaySettings.PlayOnEntry Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the specified movie or sound is played automatically when it is animated. Read/write.

Syntax

expression .PlayOnEntry

expression A variable that represents a PlaySettings object.

Return Value

MsoTriState

Remarks

Setting this property to msoTrue sets the Animate property of the AnimationSettings object to msoTrue. Setting the Animate property to msoFalse automatically sets the PlayOnEntry property to msoFalse.

Use the ActionVerb property to set the verb that will be invoked when the media clip is animated.

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

Constant | Description
msoFalse | The specified movie or sound is not played automatically when it is animated.
msoTrue | The specified movie or sound is played automatically when it is animated.

Example

This example specifies that shape three on slide one in the active presentation will be played automatically when it is animated. Shape three must be a sound or movie object.

VBA Copy code Copy code
Set OLEobj = ActivePresentation.Slides(1).Shapes(3)

OLEobj.AnimationSettings.PlaySettings.PlayOnEntry = msoTrue

See also

Concepts

PlaySettings Object

Other resources

PlaySettings Object Members


FileConverter.Creator Property (PowerPoint)

 Copy code hover
[image]

FileConverter.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression Required. A variable that represents a FileConverter object.

See also

Concepts

FileConverter Object

Other resources

FileConverter Object Members


Chart.SeriesNameLevel Property (PowerPoint)

 Copy code hover
[image]

Chart.SeriesNameLevel Property (PowerPoint)
Send feedback

Returns or sets an XlSeriesNameLevel constant that specifies the source level of the series names. Read-write.

Version information

Version Added: PowerPoint 2013

Syntax

expression .SeriesNameLevel

expression A variable that represents a Chart object.

Property value

XLSERIESNAMELEVEL


ProtectedViewWindow.Parent Property (PowerPoint)

 Copy code hover
[image]

ProtectedViewWindow.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object. Read-only.

Syntax

expression .Parent

expression A variable that represents a ProtectedViewWindow object.

See also

Concepts

ProtectedViewWindow Object

Other resources

ProtectedViewWindow Object Members


SlideShowSettings.RangeType Property (PowerPoint)

 Copy code hover
[image]

SlideShowSettings.RangeType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the type of slide show to run. Read/write.

Syntax

expression .RangeType

expression A variable that represents a SlideShowSettings object.

Remarks

The value of the RangeType property can be one of these PpSlideShowRangeType constants.

ppShowAll

ppShowNamedSlideShow

ppShowSlideRange

Example

This example runs the named slide show "Quick Show."

VBA Copy code Copy code
With ActivePresentation.SlideShowSettings

    .RangeType = ppShowNamedSlideShow

    .SlideShowName = "Quick Show"

    .Run

End With

See also

Concepts

SlideShowSettings Object

Other resources

SlideShowSettings Object Members


SlideShowView.SlideShowName Property (PowerPoint)

 Copy code hover
[image]

SlideShowView.SlideShowName Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the name of the custom slide show that's currently running in the specified slide show view. Read-only.

Syntax

expression .SlideShowName

expression A variable that represents a SlideShowView object.

Return Value

String

Example

If the slide show running in slide show window one is a custom slide show, this example displays its name.

VBA Copy code Copy code
With SlideShowWindows(1).View

    If .IsNamedShow Then

        MsgBox "Now showing in slide show window 1: " _

            & .SlideShowName

    End If

End With

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


ShapeNodes.Count Property (PowerPoint)

 Copy code hover
[image]

ShapeNodes.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a ShapeNodes object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

ShapeNodes Object

Other resources

ShapeNodes Object Members


RulerLevels Properties (PowerPoint)

 Copy code hover
[image]

RulerLevels Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


Point.Has3DEffect Property (PowerPoint)

 Copy code hover
[image]

Point.Has3DEffect Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if a point has a three-dimensional appearance. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Has3DEffect

expression A variable that represents a Point object.

Remarks

This property applies only to bubble charts.

See also

Concepts

Point Object

Other resources

Point Object Members


PageSetup.SlideHeight Property (PowerPoint)

 Copy code hover
[image]

PageSetup.SlideHeight Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the slide height, in points. Read/write.

Syntax

expression .SlideHeight

expression A variable that represents a PageSetup object.

Return Value

Single

Example

This example sets the slide height to 8.5 inches and the slide width to 11 inches for the active presentation.

VBA Copy code Copy code
With Application.ActivePresentation.PageSetup

    .SlideWidth = 11 * 72

    .SlideHeight = 8.5 * 72

End With

See also

Concepts

PageSetup Object

Other resources

PageSetup Object Members


ObjectVerbs.Application Property (PowerPoint)

 Copy code hover
[image]

ObjectVerbs.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents an ObjectVerbs object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

ObjectVerbs Object

Other resources

ObjectVerbs Object Members


MediaBookmark Members (PowerPoint)

 Copy code hover
[image]

MediaBookmark Members (PowerPoint)
Send feedback

Published: July 16, 2012

Contains properties and methods that specify information about the bookmark of the media.

Methods

Name | Description
Delete | Deletes the bookmark from the collection.

Properties

Name | Description
Index | Returns the index position of the bookmark. Read-only.
Name | Returns the name of the bookmark. Read-only.
Position | Returns the time that is associated with the bookmark. Read-only.


ChartBorder.Parent Property (PowerPoint)

 Copy code hover
[image]

ChartBorder.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents a ChartBorder object.

See also

Concepts

ChartBorder Object

Other resources

ChartBorder Object Members


FileConverter.CanSave Property (PowerPoint)

 Copy code hover
[image]

FileConverter.CanSave Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

True if the specified file converter is designed to save files. Read-only Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .CanSave

expression A variable that represents a FileConverter object.

Remarks

The CanOpen property returns True if the specified file converter can be used to open (import) files.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

This example determines whether the WordPerfect converter can be used to save files. If the return value is True, the active document is saved in WordPerfect 6.x format.

VBA Copy code Copy code
Dim lngSaveFormat As Long

If Application.FileConverters("WordPerfect6x").CanSave = _

        True Then

    lngSaveFormat = _

        Application.FileConverters("WordPerfect6x").SaveFormat

    ActiveDocument.SaveAs FileName:="C:\Document.wp", _

        FileFormat:=lngSaveFormat

End If

This example displays a message that indicates whether the third converter in the FileConverters collection can save files.

VBA Copy code Copy code
If FileConverters(3).CanSave = True Then

    MsgBox FileConverters(3).FormatName & " can save files"

Else

    MsgBox FileConverters(3).FormatName & " cannot save files"

End If

See also

Concepts

FileConverter Object

Other resources

FileConverter Object Members


Font.NameOther Property (PowerPoint)

 Copy code hover
[image]

Font.NameOther Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets the font used for characters whose character set numbers are greater than 127. Read/write.

Syntax

expression .NameOther

expression A variable that represents a Font object.

Return Value

String

Remarks

In the U.S. English version of Microsoft PowerPoint, this property is read-only and the default value is Times New Roman. Use the Replace method to change a font in a presentation. The NameOther property setting is the same as the NameASCII property setting except when the NameASCII property is set to "Use FE Font."

Example

This example sets the font used for characters whose character set numbers are greater than 127, for the first member of the Fonts collection.

VBA Copy code Copy code
ActivePresentation.Fonts(1).NameOther = "Tahoma"

See also

Concepts

Font Object

Other resources

Font Object Members


FreeformBuilder Properties (PowerPoint)

 Copy code hover
[image]

FreeformBuilder Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
Parent | Returns the parent object for the specified object.


Sequence.AddTriggerEffect Method (PowerPoint)

 Copy code hover
[image]

Sequence.AddTriggerEffect Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Adds a trigger effect to the animation in a Sequence object.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .AddTriggerEffect(pShape, effectId, trigger, pTriggerShape, bookmark, Level)

expression A variable that represents a Sequence object.

Parameters

Name | Required/Optional | Data Type | Description
pShape | Required | Shape | The Shape object with animation.
effectId | Required | MsoAnimEffect | The type of animation.
trigger | Required | MsoAnimTriggerType | The type of trigger effect to add.
pTriggerShape | Required | Shape | The Shape object that represents the trigger.
bookmark | Optional | String | The bookmark.
Level | Optional | MsoAnimateByLevel | The level of animation.

Return Value

Effect

See also

Concepts

Sequence Object

Other resources

Sequence Object Members


UpBars.Parent Property (PowerPoint)

 Copy code hover
[image]

UpBars.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents an UpBars object.

See also

Concepts

UpBars Object

Other resources

UpBars Object Members


Presentation.ServerPolicy Property (PowerPoint)

 Copy code hover
[image]

Presentation.ServerPolicy Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Microsoft Office ServerPolicy object. Read-only.

Syntax

expression .ServerPolicy

expression An expression that returns a Presentation object.

Return Value

ServerPolicy

Remarks

The ServerPolicy object represents a policy specified for a document type stored on a server running Microsoft Office SharePoint Server 2007.

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


Comment Methods (PowerPoint)

 Copy code hover
[image]

Comment Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Delete | Deletes the specified Comment object.


Presentation.ContentTypeProperties Property (PowerPoint)

 Copy code hover
[image]

Presentation.ContentTypeProperties Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the Microsoft Office MetaProperties collection that describes the metadata stored in the presentation. Read-only.

Syntax

expression .ContentTypeProperties

expression An expression that returns a Presentation object.

Return Value

MetaProperties

Remarks

For more information about Content Types, see Introduction to Content Types on MSDN, the Microsoft Developer Netowrk.

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


PlaySettings Properties (PowerPoint)

 Copy code hover
[image]

PlaySettings Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
ActionVerb | Returns or sets a string that contains the OLE verb that will be run when the specified OLE object is animated during a slide show. Read/write.
Application | Returns an Application object that represents the creator of the specified object.
HideWhileNotPlaying | Determines whether the specified media clip is hidden during a slide show except when it is playing. Read/write.
LoopUntilStopped | Determines whether the specified movie or sound loops continuously until either the next movie or sound starts, the user clicks the slide, or a slide transition occurs. Read/write.
Parent | Returns the parent object for the specified object.
PauseAnimation | Determines whether the slide show pauses until the specified media clip is finished playing. Read/write.
PlayOnEntry | Determines whether the specified movie or sound is played automatically when it is animated. Read/write.
RewindMovie | Determines whether the first frame of the specified movie is automatically redisplayed as soon as the movie has finished playing. Read/write.
StopAfterSlides | Returns or sets the number of slides to be displayed before the media clip stops playing. Read/write.


CustomLayout.Select Method (PowerPoint)

 Copy code hover
[image]

CustomLayout.Select Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Selects the specified CustomLayout object.

Syntax

expression .Select

expression A variable that represents a CustomLayout object.

See also

Concepts

CustomLayout Object

Other resources

CustomLayout Object Members


Shape.Name Property (PowerPoint)

 Copy code hover
[image]

Shape.Name Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When a shape is created, Microsoft PowerPoint automatically assigns it a name in the form ShapeType Number, where ShapeType identifies the type of shape or AutoShape, and Number is an integer that's unique within the collection of shapes on the slide. For example, the automatically generated names of the shapes on a slide could be Placeholder 1, Oval 2, and Rectangle 3. To avoid conflict with automatically assigned names, don't use the form ShapeType Number for user-defined names, where ShapeType is a value that is used for automatically generated names, and Number is any positive integer. A shape range must contain exactly one shape. Read/write.

Syntax

expression .Name

expression A variable that represents a Shape object.

Return Value

String

Remarks

You can use the object's name in conjunction with the Item method to return a reference to the object if the Item method for the collection that contains the object takes a Variant argument. For example, if the value of the Name property for a shape is Rectangle 2, then .Shapes("Rectangle 2") will return a reference to that shape.

Example

This example sets the name of object two on slide one in the active presentation to "big triangle."

VBA Copy code Copy code
ActivePresentation.Slides(1).Shapes(2).Name = "big triangle"

This example sets the fill color for the shape named "big triangle" on slide one in the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(1) _

    .Shapes("big triangle").Fill.ForeColor.RGB = RGB(0, 0, 255)

See also

Concepts

Shape Object

Other resources

Shape Object Members


Tags.Item Method (PowerPoint)

 Copy code hover
[image]

Tags.Item Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a single tag from the specified Tags collection.

Syntax

expression .Item(Name)

expression A variable that represents a Tags object.

Parameters

Name | Required/Optional | Data Type | Description
Name | Required | String | The name of the single tag in the collection to be returned.

Return Value

String

Example

This example hides all slides in the active presentation that don't have the value "east" for the "region" tag.

VBA Copy code Copy code
For Each s In ActivePresentation.Slides

    If s.Tags.Item("region") <> "east" Then

        s.SlideShowTransition.Hidden = True

    End If

Next

See also

Concepts

Tags Object

Other resources

Tags Object Members


GroupShapes.Application Property (PowerPoint)

 Copy code hover
[image]

GroupShapes.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a GroupShapes object.

Return Value

Object

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

GroupShapes Object

Other resources

GroupShapes Object Members


Row.Select Method (PowerPoint)

 Copy code hover
[image]

Row.Select Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Selects the specified object.

Syntax

expression .Select

expression A variable that represents a Row object.

Remarks

If you try to make a selection that isn't appropriate for the view, your code will fail. For example, you can select a slide in slide sorter view but not in slide view.

Example

This example selects the first five characters in the title of slide one in the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(1).Shapes.Title.TextFrame _

    .TextRange.Characters(1, 5).Select

This example selects slide one in the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(1).Select

This example selects a table that has been added to a new slide in a new presentation. The table has three rows and three columns.

VBA Copy code Copy code
With Presentations.Add.Slides

    .Add(1, ppLayoutBlank).Shapes.AddTable(3, 3).Select

End With

See also

Concepts

Row Object

Other resources

Row Object Members


ThemeVariants.Application Property (PowerPoint)

 Copy code hover
[image]

ThemeVariants.Application Property (PowerPoint)
Send feedback

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2013

Syntax

expression .Application

expression A variable that represents a ThemeVariants object.


Gridlines.Select Method (PowerPoint)

 Copy code hover
[image]

Gridlines.Select Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Selects the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Select

expression A variable that represents a GridLines object.

See also

Concepts

GridLines Object

Other resources

Gridlines Object Members


Shape.ActionSettings Property (PowerPoint)

 Copy code hover
[image]

Shape.ActionSettings Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an ActionSettings object that contains information about what action occurs when the user clicks or moves the mouse over the specified shape or text range during a slide show. Read-only.

Syntax

expression .ActionSettings

expression A variable that represents a Shape object.

Return Value

ActionSettings

Example

The following example sets the actions for clicking and moving the mouse over shape one on slide two in the active presentation.

VBA Copy code Copy code
Set myShape = ActivePresentation.Slides(2).Shapes(1)

myShape.ActionSettings(ppMouseClick).Action = ppActionLastSlide

myShape.ActionSettings(ppMouseOver).SoundEffect.Name = "applause"

See also

Concepts

Shape Object

Other resources

Shape Object Members


PageSetup Members (PowerPoint)

 Copy code hover
[image]

PageSetup Members (PowerPoint)
Send feedback

Published: July 16, 2012

Contains information about the page setup for slides, notes pages, handouts, and outlines in a presentation.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
FirstSlideNumber | Returns or sets the slide number for the first slide in the presentation. Read/write.
NotesOrientation | Returns or sets the on-screen and printed orientation of notes pages, handouts, and outlines for the specified presentation. Read/write.
Parent | Returns the parent object for the specified object.
SlideHeight | Returns or sets the slide height, in points. Read/write.
SlideOrientation | Returns or sets the on-screen and printed orientation of slides in the specified presentation. Read/write.
SlideSize | Returns or sets the slide size for the specified presentation. Read/write.
SlideWidth | Returns or sets the slide width, in points. Read/write.


AnimationPoint Methods (PowerPoint)

 Copy code hover
[image]

AnimationPoint Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Delete | Deletes the specified AnimationPoint object.


Series.ClearFormats Method (PowerPoint)

 Copy code hover
[image]

Series.ClearFormats Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Clears the formatting of the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ClearFormats

expression A variable that represents a Series object.

See also

Concepts

Series Object

Other resources

Series Object Members


ConnectorFormat Properties (PowerPoint)

 Copy code hover
[image]

ConnectorFormat Properties (PowerPoint)
Send feedback

Published: July 12, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
BeginConnected | Determines whether the beginning of the specified connector is connected to a shape. Read/write.
BeginConnectedShape | Returns a Shape object that represents the shape that the beginning of the specified connector is attached to. Read-only.
BeginConnectionSite | Returns an integer that specifies the connection site that the beginning of a connector is connected to. Read-only.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
EndConnected | Determines whether the end of the specified connector is connected to a shape. Read-only.
EndConnectedShape | Returns a Shape object that represents the shape that the end of the specified connector is attached to. Read-only.
EndConnectionSite | Returns an integer that specifies the connection site that the end of a connector is connected to. Read-only.
Parent | Returns the parent object for the specified object.
Type | Represents the type of connector. Read/write.


NamedSlideShow.SlideIDs Property (PowerPoint)

 Copy code hover
[image]

NamedSlideShow.SlideIDs Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an array of slide IDs for the specified named slide show. Read-only.

Syntax

expression .SlideIDs

expression A variable that represents a NamedSlideShow object.

Return Value

Variant

Example

This example adds the current slide in the active window to the custom slide show named "Marketing Short Version." Note that to save a modified version of the custom slide show, you must delete the original custom show and then add it again, using the same name. Also note that if you want to resize an array contained in a Variant variable, you must explicitly declare the variable before attempting to resize its array.

VBA Copy code Copy code
'NOTE - The following code line is NOT optional.

'Can't redim array without this

Dim customShowSlideIDs As Variant

Dim customShowToExpand As NamedSlideShow

customShowName = "Marketing Short Version"

Set customShowToExpand = ActivePresentation.SlideShowSettings _

    .NamedSlideShows(customShowName)

slideToAddID = ActiveWindow.View.Slide.SlideID

customShowSlideIDs = customShowToExpand.SlideIDs

numSlides = UBound(customShowSlideIDs)

ReDim Preserve customShowSlideIDs(numSlides + 1)

customShowSlideIDs(numSlides + 1) = slideToAddID

customShowToExpand.Delete

ActivePresentation.SlideShowSettings.NamedSlideShows _

    .Add customShowName, customShowSlideIDs

See also

Concepts

NamedSlideShow Object

Other resources

NamedSlideShow Object Members


SeriesLines.Border Property (PowerPoint)

 Copy code hover
[image]

SeriesLines.Border Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the border of the object. Read-only ChartBorder.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Border

expression A variable that represents a SeriesLines object.

See also

Concepts

SeriesLines Object

Other resources

SeriesLines Object Members


SlideShowTransition.SoundEffect Property (PowerPoint)

 Copy code hover
[image]

SlideShowTransition.SoundEffect Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a SoundEffect object that represents the sound to be played during the transition to the specified slide. Read-only.

Syntax

expression .SoundEffect

expression A variable that represents a SlideShowTransition object.

Return Value

SoundEffect

Example

This example sets the file Bass.wav to be played whenever shape one on slide one in the active presentation is animated.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(1).AnimationSettings

    .Animate = True

    .TextLevelEffect = ppAnimateByAllLevels

    .SoundEffect.ImportFromFile "c:\bass.wav"

End With

See also

Concepts

SlideShowTransition Object

Other resources

SlideShowTransition Object Members


ThreeDFormat.IncrementRotationHorizontal Method (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.IncrementRotationHorizontal Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Rotates the ThreeDFormat object along the horizontal axis by the specified number of degrees.

Syntax

expression .IncrementRotationHorizontal(Increment)

expression A variable that represents a ThreeDFormat object.

Parameters

Name | Required/Optional | Data Type | Description
Increment | Required | Single | The number of degrees to rotate the ThreeDFormat object, between -180 and 180 degrees.

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


Application.WindowSelectionChange Event (PowerPoint)

 Copy code hover
[image]

Application.WindowSelectionChange Event (PowerPoint)
See also Send feedback

Published: July 16, 2012

Occurs when the selection of text, a shape, or a slide in the active document window changes, whether in the user interface or in code.

Syntax

expression .WindowSelectionChange(Sel)

expression A variable that represents an Application object.

Parameters

Name | Required/Optional | Data Type | Description
Sel | Required | Selection | Represents the object selected.

Example

This example determines when a different slide is being selected and changes the background color of the newly selected slide.

VBA Copy code Copy code
Private Sub App_WindowSelectionChange(ByVal Sel As Selection)

    With Sel

        If .Type = ppSelectionNone Then

            With .SlideRange(1)

                .ColorScheme.Colors(ppBackground).RGB = _

                    RGB(240, 115, 100)

            End With

        End If

    End With

End Sub

See also

Concepts

Application Object

Other resources

Application Object Members


Coauthoring.Parent Property (PowerPoint)

 Copy code hover
[image]

Coauthoring.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object. Read-only.

Syntax

expression .Parent

expression A variable that represents a Coauthoring object.

See also

Concepts

Coauthoring Object

Other resources

Coauthoring Object Members


ThreeDFormat.ExtrusionColor Property (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.ExtrusionColor Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a ColorFormat object that represents the color of the shape's extrusion. Read-only.

Syntax

expression .ExtrusionColor

expression A variable that represents an ThreeDFormat object.

Return Value

ColorFormat

Example

This example adds an oval to myDocument, and then specifies that the oval be extruded to a depth of 50 points and that the extrusion be purple.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

Set myShape = myDocument.Shapes _

    .AddShape(msoShapeOval, 90, 90, 90, 40)

With myShape.ThreeD

    .Visible = True

    .Depth = 50

    'RGB value for purple

    .ExtrusionColor.RGB = RGB(255, 100, 255)

End With

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


Font.Application Property (PowerPoint)

 Copy code hover
[image]

Font.Application Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a Font object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

Font Object

Other resources

Font Object Members


AnimationBehavior Object (PowerPoint)

 Copy code hover
[image]

AnimationBehavior Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the behavior of an animation effect, the main animation sequence, or an interactive animation sequence. The AnimationBehavior object is a member of the AnimationBehaviors collection.

Example

Use Behaviors (index), where index is the number of the behavior in the sequence of behaviors, to return a single AnimationBehavior object. The following example sets the positions of the a rotation's starting and ending points. This example assumes that the first behavior for the main animation sequence is a RotationEffect object.

VBA Copy code Copy code
Sub Change()

    With ActivePresentation.Slides(1).TimeLine.MainSequence(1) _

            .Behaviors(1).RotationEffect

        .From = 1

        .To = 180

    End With

End Sub

See also

Concepts

PowerPoint Object Model Reference

Other resources

AnimationBehavior Object Members


ThemeVariant Properties (PowerPoint)

 Copy code hover
[image]

ThemeVariant Properties (PowerPoint)
Send feedback

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Height | Returns the height of the theme variation. Read-only.
Id | Returns a string that represents the ID of the theme variation. Read-only.
Name | Returns the name of the theme variation. Read-only.
Parent | Returns the parent for the specified object. Read-only Object.
Width | Returns the height of the theme variation. Read-only.


SlideShowSettings Methods (PowerPoint)

 Copy code hover
[image]

SlideShowSettings Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Run | Runs a slide show of the specified presentation. Returns a SlideShowWindow object.


SeriesCollection Methods (PowerPoint)

 Copy code hover
[image]

SeriesCollection Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Add | Adds one or more new series to the collection.
Extend | Adds new data points to an existing series collection.
Item | Returns a single object from a collection.
NewSeries | Creates a new series.


Slide.ApplyTheme Method (PowerPoint)

 Copy code hover
[image]

Slide.ApplyTheme Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Applies a theme or design template to the specified slide.

Syntax

expression .ApplyTheme(themeName)

expression A variable that represents a Slide object.

Parameters

Name | Required/Optional | Data Type | Description
themeName | Required | String | The path and name of the theme file (.thmx) or design template file (.pot) to apply to the Slide object.

Example

This example applies a saved theme to the specified slide:

VBA Copy code Copy code
ActivePresentation.Slides(1).ApplyTheme "C:\Program Files\Microsoft Office\Templates\MyTheme.thmx"

This example applies a saved design template to the specified slide:

VBA Copy code Copy code
ActivePresentation.Slides(1).ApplyTheme "C:\Program Files\Microsoft Office\Templates\MyTheme.pot"

See also

Concepts

Slide Object

Other resources

Slide Object Members


Chart.HeightPercent Property (PowerPoint)

 Copy code hover
[image]

Chart.HeightPercent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the height of a 3-D chart as a percentage of the chart width (from 5 through 500 percent). Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .HeightPercent

expression A variable that represents a Chart object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the height of the first chart in the active document to 80 percent of its width. You should run the example on a 3-D chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.HeightPercent = 80

    End If

End With

See also

Concepts

Chart Object

Other resources

Chart Object Members


ActionSettings Methods (PowerPoint)

 Copy code hover
[image]

ActionSettings Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Item | Returns a single action setting from the specified ActionSettings collection.


Timing.RepeatCount Property (PowerPoint)

 Copy code hover
[image]

Timing.RepeatCount Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns the number of times to repeat an animation. Read/write.

Syntax

expression .RepeatCount

expression A variable that represents a Timing object.

Return Value

Long

Example

This example creates a shape and adds an animation to it, then repeats the animation twice.

VBA Copy code Copy code
Sub AddShapeSetTiming()

    Dim effDiamond As Effect

    Dim shpRectangle As Shape

    Set shpRectangle = ActivePresentation.Slides(1).Shapes _

        .AddShape(Type:=msoShapeRectangle, Left:=100, _

        Top:=100, Width:=50, Height:=50)

    Set effDiamond = ActivePresentation.Slides(1).TimeLine.MainSequence _

        .AddEffect(Shape:=shpRectangle, effectId:=msoAnimEffectPathDiamond)

    With effDiamond.Timing

        .Duration = 5 ' Length of effect.

        .RepeatCount = 2 ' How many times to repeat.

    End With

End Sub

See also

Concepts

Timing Object

Other resources

Timing Object Members


Sequence.Clone Method (PowerPoint)

 Copy code hover
[image]

Sequence.Clone Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Creates a copy of an Effect object, and adds it to the Sequences collection at the specified index position.

Syntax

expression .Clone(Effect, Index)

expression A variable that represents a Sequence object.

Parameters

Name | Required/Optional | Data Type | Description
Effect | Required | Effect | Effect object. The animation effect to be cloned.
Index | Optional | Long | The position at which the cloned animation effect will be added to the Sequences collection. The default value is -1 (added to the end).

Return Value

Effect

Example

This example copies an animation effect. This example assumes an animation effect named "effDiamond" exists.

VBA Copy code Copy code
Sub CloneEffect()

    ActivePresentation.Slides(1).TimeLine.MainSequence _

        .Clone Effect:=effDiamond, Index:=-1

End Sub

See also

Concepts

Sequence Object

Other resources

Sequence Object Members


ObjectVerbs Object (PowerPoint)

 Copy code hover
[image]

ObjectVerbs Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the collection of OLE verbs for the specified OLE object. OLE verbs are the operations supported by an OLE object. Commonly used OLE verbs are "play" and "edit."

Example

Use the ObjectVerbs property to return an ObjectVerbs object. The following example displays all the available verbs for the OLE object contained in shape one on slide two in the active presentation. For this example to work, shape one must contain an OLE object.

VBA Copy code Copy code
With ActivePresentation.Slides(2).Shapes(1).OLEFormat

    For Each v In .ObjectVerbs

        MsgBox v

    Next

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

ObjectVerbs Object Members


Axes Object (PowerPoint)

 Copy code hover
[image]

Axes Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a collection of all the Axis objects in the specified chart.

Version Information

Version Added: PowerPoint 2007

Remarks

Use the Axes method to return the Axes collection.

Use Axes(Type, AxisGroup), where Type is the axis type and AxisGroup is the axis group, to return an Axes collection that contains a single Axis object. Type can be one of the following XlAxisType constants: xlCategory, xlSeries, or xlValue. AxisGroup can be one of the following XlAxisGroup constants: xlPrimary or xlSecondary.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example displays the number of axes for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        MsgBox .Chart.Axes.Count

    End If

End With

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the category axis title text for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.Axes(xlCategory)

            .HasTitle = True

            .AxisTitle.Caption = "1994"

        End With

    End If

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

Axes Object Members


ThreeDFormat.PresetMaterial Property (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.PresetMaterial Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the extrusion surface material. Read/write.

Syntax

expression .PresetMaterial

expression A variable that represents a ThreeDFormat object.

Return Value

MsoPresetMaterial

Remarks

The value of the PresetMaterial property can be one of these MsoPresetMaterial constants.

msoMaterialMatte

msoMaterialMetal

msoMaterialPlastic

msoMaterialWireFrame

msoPresetMaterialMixed

Example

This example specifies that the extrusion surface for shape one in myDocument be wire frame.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(1).ThreeD

    .Visible = True

    .PresetMaterial = msoMaterialWireFrame

End With

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


Gridlines.Name Property (PowerPoint)

 Copy code hover
[image]

Gridlines.Name Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the name of the object. Read-only String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Name

expression A variable that represents a GridLines object.

See also

Concepts

GridLines Object

Other resources

Gridlines Object Members


ShadowFormat Methods (PowerPoint)

 Copy code hover
[image]

ShadowFormat Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
IncrementOffsetX | Changes the horizontal offset of the shadow by the specified number of points.
IncrementOffsetY | Changes the vertical offset of the shadow by the specified number of points.


Presentation.CustomXMLParts Property (PowerPoint)

 Copy code hover
[image]

Presentation.CustomXMLParts Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a CustomXMLParts object that represents the collection of custom XML parts associated with the specified Presentation object. Read-only.

Syntax

expression .CustomXMLParts

expression An expression that returns a Presentation object.

Return Value

CustomXMLParts

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


ChartTitle.FormulaR1C1Local Property (PowerPoint)

 Copy code hover
[image]

ChartTitle.FormulaR1C1Local Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the formula for the object, using R1C1-style notation in the language of the user. Read/write String.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .FormulaR1C1Local

expression A variable that represents a ChartTitle object.

Remarks

If the cell contains a constant, this property returns that constant. If the cell is empty, the property returns an empty string. If the cell contains a formula, the property returns the formula as a string, in the same format in which it would be displayed in the formula bar (including the equal sign).

If you set the value or formula of a cell to a date, Microsoft PowerPoint verifies whether that cell is already formatted with one of the date or time number formats. If not, the number format is changed to the default short date number format.

If the range is a one-dimensional or two-dimensional range, you can set the formula to a Visual Basic array of the same dimensions. Similarly, you can put the formula into a Visual Basic array.

Setting the formula of a multiple-cell range fills all cells in the range with the formula.

See also

Concepts

ChartTitle Object

Other resources

ChartTitle Object Members


TickLabels.Orientation Property (PowerPoint)

 Copy code hover
[image]

TickLabels.Orientation Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the text orientation. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Orientation

expression A variable that represents a TickLabels object.

Remarks

The value of this property can be an integer from -90 through 90 degrees or one of the XlTickLabelOrientation constants.

See also

Concepts

TickLabels Object

Other resources

TickLabels Object Members


Application.ActiveEncryptionSession Property (PowerPoint)

 Copy code hover
[image]

Application.ActiveEncryptionSession Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the encryption session associated with the active presentation. Read-only.

Syntax

expression .ActiveEncryptionSession

expression An expression that returns a Application object.

Return Value

Long

Remarks

The encryption provider mechanism manages each file on a separate process, so each file is associated with a separate encryption session.

Note Note

This property applies only when a presentation implements custom encryption.

See also

Concepts

Application Object

Other resources

Application Object Members


TabStop Object (PowerPoint)

 Copy code hover
[image]

TabStop Object (PowerPoint)
See also Send feedback

Published: July 12, 2012

Represents a single tab stop. The TabStop object is a member of the TabStops collection. The TabStops collection represents all the tab stops on one ruler.

Example

Use TabStops(index), where index is the tab stop index number, to return a single TabStop object. The following example clears tab stop one for the text in shape two on slide one in the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(1).Shapes(2).TextFrame _

    .Ruler.TabStops(1).Clear

See also

Concepts

PowerPoint Object Model Reference

Other resources

TabStop Object Members


AnimationSettings.Parent Property (PowerPoint)

 Copy code hover
[image]

AnimationSettings.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents an AnimationSettings object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

AnimationSettings Object

Other resources

AnimationSettings Object Members


TextStyles.Parent Property (PowerPoint)

 Copy code hover
[image]

TextStyles.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a TextStyles object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

TextStyles Object

Other resources

TextStyles Object Members


FileConverter.SaveFormat Property (PowerPoint)

 Copy code hover
[image]

FileConverter.SaveFormat Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the file format of the specified document or file converter. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .SaveFormat

expression Required. A variable that represents a FileConverter object.

See also

Concepts

FileConverter Object

Other resources

FileConverter Object Members


PpAdvanceMode Enumeration (PowerPoint)

 Copy code hover
[image]

PpAdvanceMode Enumeration (PowerPoint)
Send feedback

Published: July 12, 2012

Specifies how the specified animation advances.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppAdvanceModeMixed | -2 | Mixed mode.
ppAdvanceOnClick | 1 | Only when clicked.
ppAdvanceOnTime | 2 | Automatically after a specified amount of time.


SlideRange.Item Method (PowerPoint)

 Copy code hover
[image]

SlideRange.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single Slide object from the specified SlideRange collection.

Syntax

expression .Item(Index)

expression A variable that represents a SlideRange object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Variant | The name or index number of the single Slide object in the collection to be returned.

Return Value

Slide

Remarks

If your Visual Studio solution includes the Microsoft.Office.Interop.PowerPoint reference, this method maps to the following types:

  • Microsoft.Office.Interop.PowerPoint.SlideRange._Index

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


View.PasteSpecial Method (PowerPoint)

 Copy code hover
[image]

View.PasteSpecial Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Pastes the current contents of the Clipboard into the view represented by the View object.

Syntax

expression .PasteSpecial(DataType, DisplayAsIcon, IconFileName, IconIndex, IconLabel, Link)

expression A variable that represents a View object.

Parameters

Name | Required/Optional | Data Type | Description
DataType | Optional | PpPasteDataType | A format for the Clipboard contents when they're inserted into the document. The default value varies, depending on the contents in the Clipboard. An error occurs if the specified data type in the DataType argument is not supported by the clipboard contents.
DisplayAsIcon | Optional | MsoTriState | msoTrue to display the embedded object (or link) as an icon.
IconFileName | Optional | String | If DisplayAsIcon is set to msoTrue, this argument is the path and file name for the file in which the icon to be displayed is stored. If DisplayAsIcon is set to msoFalse, this argument is ignored.
IconIndex | Optional | Long | If DisplayAsIcon is set to msoTrue, this argument is a number that corresponds to the icon you want to use in the program file specified by IconFilename. Icons appear in the Change Icon dialog box, accessed from the Insert tab (click Object, select Display as icon, click Change Icon): 0 (zero) corresponds to the first icon, 1 corresponds to the second icon. If this argument is omitted, the first (default) icon is used. If DisplayAsIcon is set to msoFalse, this argument is ignored. If IconIndex is outside the valid range, the default icon (index 0) is used.
IconLabel | Optional | String | If DisplayAsIcon is set to msoTrue, this argument is the text that appears below the icon. If this label is missing, Microsoft PowerPoint generates an icon label based on the Clipboard contents. If DisplayAsIcon is set to msoFalse, this argument is ignored.
Link | Optional | MsoTriState | Determines whether to create a link to the source file of the Clipboard contents. An error occurs if the Clipboard contents do not support a link.

Remarks

An error occurs if there is no data on the Clipboard when the PasteSpecial method is called.

Valid views for the PasteSpecial method are the same as those for the Paste method. If the data type can't be pasted into the view (for example, if you try to paste a picture into Slide Sorter View), an error occurs.

The DataType parameter can be one of these PpPasteDataType constants

ppPasteBitmap

ppPasteDefaultdefault

ppPasteEnhancedMetafile

ppPasteGIF

ppPasteHTML

ppPasteJPG

ppPasteMetafilePicture

ppPasteOLEObject

ppPastePNG

ppPasteRTF

ppPasteShape

ppPasteText

The DisplayAsIcon parameter can be one of these MsoTriState constants.

msoFalse The default. Does not display the embedded object (or link) as an icon.

msoTrue Displays the embedded object (or link) as an icon.

The Link paramter can be one of these MsoTriState constants.

msoFalse The default. Does not create a link to the source file of the Clipboard contents.

msoTrue Creates a link to the source file of the Clipboard contents.

Example

The following example pastes a bitmap image as an icon into another window. This example assumes that there are two open windows and that a bitmap image in the first window is currently selected.

VBA Copy code Copy code
Sub PasteOLEObject()

    Windows(1).Selection.Copy

    Windows(2).View.PasteSpecial DataType:=ppPasteOLEObject, _

        DisplayAsIcon:=msoTrue, IconLabel:="New Bitmap Image"

End Sub

See also

Concepts

View Object

Other resources

View Object Members


Shapes Members (PowerPoint)

 Copy code hover
[image]

Shapes Members (PowerPoint)
Send feedback

Published: July 16, 2012

A collection of all the Shape objects on the specified slide.

Methods

Name | Description
AddCallout | Creates a borderless line callout. Returns a Shape object that represents the new callout.
AddChart2 | Adds a chart to the document. Returns a Shape object that represents a chart and adds it to the specified collection.
AddConnector | Creates a connector. Returns a Shape object that represents the new connector. When a connector is added, it is not connected to anything. Use the BeginConnect and EndConnect methods to attach the beginning and end of a connector to other shapes in the document.
AddCurve | Creates a Bézier curve. Returns a Shape object that represents the new curve.
AddLabel | Creates a label. Returns a Shape object that represents the new label.
AddLine | Creates a line. Returns a Shape object that represents the new line.
AddMediaObject2 | Adds a new media object.
AddMediaObjectFromEmbedTag | Adds a media object from an embedded tag to a Shapes object.
AddOLEObject | Creates an OLE object. Returns a Shape object that represents the new OLE object.
AddPicture | Creates a picture from an existing file. Returns a Shape object that represents the new picture.
AddPlaceholder | Restores a previously deleted placeholder on a slide. Returns a Shape object that represents the restored placeholder.
AddPolyline | Creates an open polyline or a closed polygon drawing. Returns a Shape object that represents the new polyline or polygon.
AddShape | Creates an AutoShape. Returns a Shape object that represents the new AutoShape.
AddSmartArt | Adds a SmartArt diagram to the Shapes object.
AddTable | Adds a table shape to a slide.
AddTextbox | Creates a text box. Returns a Shape object that represents the new text box.
AddTextEffect | Creates a WordArt object. Returns a Shape object that represents the new WordArt object.
AddTitle | Restores a previously deleted title placeholder to a slide. Returns a Shape object that represents the restored title.
BuildFreeform | Builds a freeform object. Returns a FreeformBuilder object that represents the freeform as it is being built.
Item | Returns a single Shape object from the specified Shapes collection.
Paste | Pastes the shapes, slides, or text on the Clipboard into the specified Shapes collection, at the top of the z-order. Each pasted object becomes a member of the specified Shapes collection. If the Clipboard contains entire slides, the slides will be pasted as shapes that contain the images of the slides. If the Clipboard contains a text range, the text will be pasted into a newly created TextFrame shape. Returns a ShapeRange object that represents the pasted objects.
PasteSpecial | Pastes the contents of the Clipboard, using a special format.
Range | Returns a ShapeRange object that represents a subset of the shapes in a Shapes collection.
SelectAll | Selects all the shapes in a Shapes collection.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
HasTitle | Returns whether the collection of objects on the specified slide contains a title placeholder. Read-only.
Parent | Returns the parent object for the specified object.
Placeholders | Returns a Placeholders collection that represents the collection of all the placeholders on a slide. Read-only.
Title | Returns a Shape object that represents the slide title. Read-only.


Axis.DisplayUnitLabel Property (PowerPoint)

 Copy code hover
[image]

Axis.DisplayUnitLabel Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the DisplayUnitLabel object for the specified axis. Returns null if the HasDisplayUnitLabel property is set to False. Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .DisplayUnitLabel

expression A variable that represents an Axis object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the label caption to "Millions" for the value axis of the first chart in the active document, and then it turns off automatic font scaling.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.Axes(xlValue).DisplayUnitLabel

            .Caption = "Millions"

            .AutoScaleFont = False

        End With

    End If

End With

See also

Concepts

Axis Object

Other resources

Axis Object Members


LeaderLines.Delete Method (PowerPoint)

 Copy code hover
[image]

LeaderLines.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Delete

expression A variable that represents a LeaderLines object.

See also

Concepts

LeaderLines Object

Other resources

LeaderLines Object Members


CalloutFormat.Angle Property (PowerPoint)

 Copy code hover
[image]

CalloutFormat.Angle Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the angle of the callout line. If the callout line contains more than one line segment, this property returns or sets the angle of the segment that is farthest from the callout text box. Read/write.

Syntax

expression .Angle

expression A variable that represents an CalloutFormat object.

Return Value

MsoCalloutAngleType

Remarks

The value of the Angle property can be one of these MsoCalloutAngleType constants.

Constant | Description
msoCalloutAngle30 |
msoCalloutAngle45 |
msoCalloutAngle60 |
msoCalloutAngle90 |
msoCalloutAngleAutomatic | The callout line maintains a fixed angle as you drag the callout.
msoCalloutAngleMixed |

Example

This example sets to 90 degrees the callout angle for a callout named "co1" on myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes("co1").Callout.Angle = msoCalloutAngle90

See also

Concepts

CalloutFormat Object

Other resources

CalloutFormat Object Members


Master.Guides Property (PowerPoint)

 Copy code hover
[image]

Master.Guides Property (PowerPoint)
Send feedback

Returns a Guides collection that represents all of the drawing guides associated with the slide master, title master, handout master, notes master, or design master.

Version information

Version Added: PowerPoint 2013

Syntax

expression .Guides

expression A variable that represents a Master object.

Property value

GUIDES


Tags Object (PowerPoint)

 Copy code hover
[image]

Tags Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a tag or a custom property that you can create for a shape, slide, or presentation.

Remarks

Each Tags object contains the name of a custom property and a value for that property.

Create tags when you want to be able to selectively work with specific members of a collection, based on an attribute that isn't already represented by a built-in property. For example, if you want to be able to categorize slides in a presentation based on what region of the country/region they apply to, you could create a Region tag and assign a Region value to each slide in the presentation. You could then selectively perform an operation on some of the slides, based on the values of their Region tags, such as hiding all the slides with the Region value "East."

Example

Use the Add method to add a tag to an object. The following example adds a tag with the name "Region" and with the value "East" to slide one in the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(1).Tags.Add "Region", "East"

Use Tags(index), where index is the name of a tag, to return a the tag value. The following example tests the value of the Region tag for all slides in the active presentation and hides any slides that don't pertain to the East Coast (denoted by the value "East").

VBA Copy code Copy code
For Each s In ActivePresentation.Slides

    If s.Tags("region") <> "east" Then

        s.SlideShowTransition.Hidden = True

    End If

Next

See also

Concepts

PowerPoint Object Model Reference

Other resources

Tags Object Members


Legend.Select Method (PowerPoint)

 Copy code hover
[image]

Legend.Select Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Selects the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Select

expression A variable that represents a Legend object.

See also

Concepts

Legend Object

Other resources

Legend Object Members


RulerLevel Properties (PowerPoint)

 Copy code hover
[image]

RulerLevel Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
FirstMargin | Returns or sets the first-line indent for the specified outline level, in points. Read/write.
LeftMargin | Returns or sets the left indent for the specified outline level, in points. Read/write.
Parent | Returns the parent object for the specified object.


SetEffect.Property Property (PowerPoint)

 Copy code hover
[image]

SetEffect.Property Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns an MsoAnimProperty constant that represents an animation property. Read/write.

Syntax

expression .Property

expression A variable that represents a SetEffect object.

Return Value

MsoAnimProperty

Example

The following example adds a shape, adds a three-second fill animation to that shape, and sets the fill animation to color.

VBA Copy code Copy code
Sub AddShapeSetAnimFill()

    Dim effBlinds As Effect

    Dim shpRectangle As Shape

    Dim animProperty As AnimationBehavior

    Set shpRectangle = ActivePresentation.Slides(1).Shapes _

        .AddShape(Type:=msoShapeRectangle, Left:=100, _

        Top:=100, Width:=50, Height:=50)

    Set effBlinds = ActivePresentation.Slides(1).TimeLine.MainSequence _

        .AddEffect(Shape:=shpRectangle, effectId:=msoAnimEffectBlinds)

    effBlinds.Timing.Duration = 3

    Set animProperty = effBlinds.Behaviors.Add(msoAnimTypeProperty)

    With animProperty.PropertyEffect

        .Property = msoAnimColor

        .From = RGB(Red:=0, Green:=0, Blue:=255)

        .To = RGB(Red:=255, Green:=0, Blue:=0)

    End With

End Sub

See also

Concepts

SetEffect Object

Other resources

SetEffect Object Members


Sequence.ConvertToAnimateBackground Method (PowerPoint)

 Copy code hover
[image]

Sequence.ConvertToAnimateBackground Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the background will be animated separately from, or in addition to, its accompanying text. Returns an Effect object representing the newly-modified animation effect.

Syntax

expression .ConvertToAnimateBackground(Effect, AnimateBackground)

expression A variable that represents a Sequence object.

Parameters

Name | Required/Optional | Data Type | Description
Effect | Required | Effect | The animation effect to be applied to the background.
AnimateBackground | Required | MsoTriState | Determines whether the text will be animated separately from the background.

Return Value

Effect

Example

This example creates a text effect for the first shape on the first slide in the active presentation, and animates the text in the shape separately from the background. This example assumes there is a shape on the first slide, and that the shape has text inside it.

VBA Copy code Copy code
Sub AnimateText()

    Dim timeMain As TimeLine
    Dim shpActive As Shape

    Set shpActive = ActivePresentation.Slides(1).Shapes(1)
    Set timeMain = ActivePresentation.Slides(1).TimeLine

    ' Add a blast effect to the text, and animate the text separately
    ' from the background.
    timeMain.MainSequence.ConvertToAnimateBackground _
        Effect:=timeMain.MainSequence.AddEffect(Shape:=shpActive, _
            effectid:=msoAnimEffectBlast), _
        AnimateBackGround:=msoFalse

End Sub

See also

Concepts

Sequence Object

Other resources

Sequence Object Members


SlideNavigation.Visible Property (PowerPoint)

 Copy code hover
[image]

SlideNavigation.Visible Property (PowerPoint)
Send feedback

Specifies whether the slide navigation screen is displayed during a slide show. Read/write.

Version information

Version Added: PowerPoint 2013

Syntax

expression .Visible

expression A variable that represents a SlideNavigation object.

Example

The following code sample starts a slide show from the active presentation and then makes the navigation screen visible.

Copy code Copy code
Sub ShowSlideNavigation()

    ' Start the slide show.
    ActivePresentation.SlideShowSettings.Run

    ' Show the slide navigation screen.
    ActivePresentation.SlideShowWindow.SlideNavigation.Visible = True

End Sub

Property value

BOOL


ParagraphFormat.Application Property (PowerPoint)

 Copy code hover
[image]

ParagraphFormat.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a ParagraphFormat object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

ParagraphFormat Object

Other resources

ParagraphFormat Object Members


FileConverter.Name Property (PowerPoint)

 Copy code hover
[image]

FileConverter.Name Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the name of the specified object. Read-only String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Name

expression A variable that represents a FileConverter object.

See also

Concepts

FileConverter Object

Other resources

FileConverter Object Members


PpRemoveDocInfoType Enumeration (PowerPoint)

 Copy code hover
[image]

PpRemoveDocInfoType Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Constants that specify the type of document information, passed to the RemoveDocumentInformation method of the Presentation object.

Name

Value

Description

ppRDIAll

99

Remove all document information.

ppRDIComments

1

Remove comments.

ppRDIContentType

16

Remove content type information.

ppRDIDocumentManagementPolicy

15

Remove document management policy information.

ppRDIDocumentProperties

8

Remove document properties.

ppRDIDocumentServerProperties

14

Remove document server properties.

ppRDIDocumentWorkspace

10

Remove document workspace information.

ppRDIInkAnnotations

11

Remove Ink annotations.

Note Note

This constant has been deprecated, but it remains part of the object model for backward compatibility. You should not use it in new applications.

ppRDIPublishPath

13

Remove publication path information.

ppRDIRemovePersonalInformation

4

Remove personal information.

ppRDISlideUpdateInformation

17

Remove slide update information.


ChartGroup Members (PowerPoint)

 Copy code hover
[image]

ChartGroup Members (PowerPoint)
Send feedback

Published: July 12, 2012

Represents one or more series plotted in a chart with the same format.

Methods

Name | Description
CategoryCollection | Returns all the visible categories in the chart group, or the specified visible category.
FullCategoryCollection | Returns all the categories in the chart group, or the specified category, whether visible or filtered out.
SeriesCollection | Returns all the series in the chart group.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
AxisGroup | Returns the type of axis group. Read/write XlAxisGroup.
BubbleScale | Returns or sets the scale factor for bubbles in the specified chart group. Read/write Long.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
DoughnutHoleSize | Returns or sets the size of the hole in a doughnut chart group. Read/write Long.
DownBars | Returns the down bars on a line chart. Read-only DownBars.
DropLines | Returns the drop lines for a series on a line chart or area chart. Read-only DropLines.
FirstSliceAngle | Returns or sets the angle, in degrees (clockwise from vertical), of the first pie-chart or doughnut-chart slice. Read/write Long.
GapWidth | For bar and column charts, returns or sets the space, as a percentage of the bar or column width, between bar or column clusters. For pie-of-pie and bar-of-pie charts, returns or sets the space between the primary and secondary sections of the chart. Read/write Long.
Has3DShading | True if a chart group has three-dimensional shading. Read/write Boolean.
HasDropLines | True if the line chart or area chart has drop lines. Read/write Boolean.
HasHiLoLines | True if the line chart has high-low lines. Read/write Boolean.
HasRadarAxisLabels | True if a radar chart has axis labels. Read/write Boolean.
HasSeriesLines | True if a stacked column chart or bar chart has series lines or if a pie-of-pie chart or bar-of-pie chart has connector lines between the two sections. Read/write Boolean.
HasUpDownBars | True if a line chart has up and down bars. Read/write Boolean.
HiLoLines | Returns the high-low lines for a series on a line chart. Read-only HiLoLines.
Index | Returns the index number of the object within the collection of similar objects. Read-only Long.
Overlap | Specifies how bars and columns are positioned. Read/write Long.
Parent | Returns the parent for the specified object. Read-only Object.
RadarAxisLabels | Returns the radar axis labels for the specified chart group. Read-only TickLabels.
SecondPlotSize | Returns or sets the size, as a percentage of the primary pie, of the secondary section of either a pie-of-pie chart or a bar-of-pie chart. Read/write Long.
SeriesLines | Returns the series lines for a 2-D stacked bar, 2-D stacked column, pie-of-pie, or bar-of-pie chart. Read-only SeriesLines.
ShowNegativeBubbles | True if negative bubbles are shown for the chart group. Read/write Boolean.
SizeRepresents | Returns or sets what the bubble size represents on a bubble chart. Read/write Long.
SplitType | Returns or sets the way the two sections of either a pie-of-pie chart or a bar-of-pie chart are split. Read/write XlChartSplitType.
SplitValue | Returns or sets the threshold value separating the two sections of either a pie-of-pie chart or a bar-of-pie chart. Read/write Variant.
UpBars | Returns the up bars on a line chart. Read-only UpBars.
VaryByCategories | True if Microsoft Word assigns a different color or pattern to each data marker. Read/write Boolean.


Point.MarkerStyle Property (PowerPoint)

 Copy code hover
[image]

Point.MarkerStyle Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the marker style for a point or series in a line chart, scatter chart, or radar chart. Read/write XlMarkerStyle.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .MarkerStyle

expression A variable that represents a Point object.

Remarks

MarkerStyle can be one of the following XlMarkerStyle constants:

  • xlMarkerStyleAutomatic—Automatic markers.

  • xlMarkerStyleCircle—Circular markers.

  • xlMarkerStyleDash—Long bar markers.

  • xlMarkerStyleDiamond—Diamond-shaped markers.

  • xlMarkerStyleDot—Short bar markers.

  • xlMarkerStyleNone—No markers.

  • xlMarkerStylePicture—Picture markers.

  • xlMarkerStylePlus—Square markers with a plus sign.

  • xlMarkerStyleSquare—Square markers.

  • xlMarkerStyleStar—Square markers with an asterisk.

  • xlMarkerStyleTriangle—Triangular markers.

  • xlMarkerStyleX—Square markers with an X.

See also

Concepts

Point Object

Other resources

Point Object Members


DataLabels.NumberFormatLocal Property (PowerPoint)

 Copy code hover
[image]

DataLabels.NumberFormatLocal Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the format code for the object as a string in the language of the user. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .NumberFormatLocal

expression A variable that represents a DataLabels object.

Remarks

The Format function uses different format code strings than do the NumberFormat and NumberFormatLocal properties.

See also

Concepts

DataLabels Object

Other resources

DataLabels Object Members


ChartCharacters.Creator Property (PowerPoint)

 Copy code hover
[image]

ChartCharacters.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents a ChartCharacters object.

See also

Concepts

ChartCharacters Object

Other resources

ChartCharacters Object Members


Slide.PublishSlides Method (PowerPoint)

 Copy code hover
[image]

Slide.PublishSlides Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Publishes the specified slide to the specified location.

Syntax

expression .PublishSlides(SlideLibraryUrl, Overwrite, UseSlideOrder)

expression An expression that returns a Slide object.

Parameters

Name | Required/Optional | Data Type | Description
SlideLibraryUrl | Required | String | The URL to which to publish the slide library.
Overwrite | Optional | Boolean | Whether to overwrite existing content at SlideLibraryURL. The default is False.
UseSlideOrder | Optional | Boolean | Whether to use the existing slide order. The default is False.

Return Value

Nothing

Example

The following example shows how to publish slide one in the active presentation to a specific URL. Before running this code, substitute a valid URL for myURL.

VBA Copy code Copy code
Public Sub PublishSlides_Example()

    Dim pptSlide As Slide

    Set pptSlide = ActivePresentation.Slides(1)

    pptSlide.PublishSlides ("http://myURL")

End Sub

See also

Concepts

Slide Object

Other resources

Slide Object Members


Comments Methods (PowerPoint)

 Copy code hover
[image]

Comments Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Add | Returns a Comment object that represents a new comment added to a slide.
Add2 | Returns a Comment object that represents a new comment added to a slide.
Item | Returns a single Comment object from the specified Comments collection.


HiLoLines Object (PowerPoint)

 Copy code hover
[image]

HiLoLines Object (PowerPoint)
See also Send feedback

Published: July 12, 2012

Represents the high-low lines in a chart group.

Version Information

Version Added: PowerPoint 2007

Remarks

High-low lines connect the highest point with the lowest point in every category in the chart group. Only 2-D line groups can have high-low lines. This object is not a collection. There is no object that represents a single high-low line; you either enable high-low lines for all points in a chart group or disable them.

If the HasHiLoLines property is False, most properties of the HiLoLines object are disabled.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

Use the HiLoLines property to return the HiLoLines object. The following example uses the HasHiLowLines property to add high-low lines to the first chart (the chart must be a line chart) in the active document. The example then makes the high-low lines blue.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With Chart.ChartGroups(1)

            .HasHighLowLines = True

            .HiLoLines.Border.Color = RGB(0, 0, 255)

        End With

    End If

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

HiLoLines Object Members


MotionEffect Object (PowerPoint)

 Copy code hover
[image]

MotionEffect Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a motion effect for an AnimationBehavior object.

Example

Use the MotionEffect propety of the AnimationBehavior object to return a MotionEffect object. The following example refers to the motion effect for a given animation behavior.

VBA Copy code Copy code
ActivePresentation.Slides(1).TimeLine.MainSequence.Item.Behaviors(1).MotionEffect

Use the ByX , ByY , FromX , FromY , ToX , and ToY properties of the MotionEffect object to construct a motion path. The ToY and ToX properties are in percentage, where ToX = 1.0 means 100% of slide width and ToY = 1.0 means 100% of slide height. The following example adds a shape to the first slide and creates a motion path.

VBA Copy code Copy code
Sub AddMotionPath()

    Dim shpNew As Shape

    Dim effNew As Effect

    Dim aniMotion As AnimationBehavior

    Set shpNew = ActivePresentation.Slides(1).Shapes _

        .AddShape(Type:=msoShape5pointStar, Left:=0, _

        Top:=0, Width:=100, Height:=100)

    Set effNew = ActivePresentation.Slides(1).TimeLine.MainSequence _

        .AddEffect(Shape:=shpNew, effectId:=msoAnimEffectCustom, _

        Trigger:=msoAnimTriggerWithPrevious)

    Set aniMotion = effNew.Behaviors.Add(msoAnimTypeMotion)

    With aniMotion.MotionEffect

        .FromX = 0

        .FromY = 0

        .ToX = .5

        .ToY = .5

    End With

End Sub

See also

Concepts

PowerPoint Object Model Reference

Other resources

MotionEffect Object Members


Shapes.AddTable Method (PowerPoint)

 Copy code hover
[image]

Shapes.AddTable Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Adds a table shape to a slide.

Syntax

expression .AddTable(NumRows, NumColumns, Left, Top, Width, Height)

expression A variable that represents a Shapes object.

Parameters

Name | Required/Optional | Data Type | Description
NumRows | Required | Long | The number of rows in the table.
NumColumns | Required | Long | The number of columns in the table.
Left | Optional | Single | The distance (in points) from the left edge of the slide to the left edge of the table.
Top | Optional | Single | The distance (in points) from the top edge of the slide to the top edge of the table.
Width | Optional | Single | The width (in points) of the new table.
Height | Optional | Single | The height (in points) of the new table.

Return Value

Shape

Example

This example creates a new table on slide two of the active presentation. The table has three rows and four columns. It is 10 points from the left edge of the slide, and 10 points from the top edge. The width of the new table is 288 points, which makes each of the four columns one inch wide (there are 72 points per inch). The height is set to 216 points, which makes each of the three rows one inch tall.

VBA Copy code Copy code
ActivePresentation.Slides(2).Shapes.AddTable(3, 4, 10, 10, 288, 216)

See also

Concepts

Shapes Object

Other resources

Shapes Object Members


Shape.Creator Property (PowerPoint)

 Copy code hover
[image]

Shape.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.

Syntax

expression .Creator

expression A variable that represents a Shape object.

Return Value

Long

Remarks

The Creator property is designed to be used in Microsoft Office applications for the Macintosh.

Example

This example displays a message about the creator of myObject.

VBA Copy code Copy code
Set myObject = Application.ActivePresentation.Slides(1).Shapes(1)

If myObject.Creator = &h50575054 Then

    MsgBox "This is a PowerPoint object"

Else

    MsgBox "This is not a PowerPoint object"

End If

See also

Concepts

Shape Object

Other resources

Shape Object Members


ChartTitle.ReadingOrder Property (PowerPoint)

 Copy code hover
[image]

ChartTitle.ReadingOrder Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets an XlReadingOrder constant that represents the reading order for the specified object. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ReadingOrder

expression A variable that represents a ChartTitle object.

See also

Concepts

ChartTitle Object

Other resources

ChartTitle Object Members


SoundEffect.ImportFromFile Method (PowerPoint)

 Copy code hover
[image]

SoundEffect.ImportFromFile Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Specifies the sound that will be played whenever the specified shape is clicked or animated or whenever the specified slide transition occurs.

Syntax

expression .ImportFromFile(FullName)

expression A variable that represents an SoundEffect object.

Parameters

Name | Required/Optional | Data Type | Description
FullName | Required | String | The name of the specified sound file.

Example

This example specifies that the file Dudududu.wav will start to play at the transition to slide two in the active presentation and will continue to play until the next sound starts.

VBA Copy code Copy code
With ActivePresentation.Slides(2).SlideShowTransition

    .SoundEffect.ImportFromFile "c:\sndsys\dudududu.wav"

    .LoopSoundUntilNext = True

End With

See also

Concepts

SoundEffect Object

Other resources

SoundEffect Object Members


TextFrame.MarginTop Property (PowerPoint)

 Copy code hover
[image]

TextFrame.MarginTop Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the distance (in points) between the top of the text frame and the top of the inscribed rectangle of the shape that contains the text. Read/write.

Syntax

expression .MarginTop

expression A variable that represents a TextFrame object.

Return Value

Single

Example

This example adds a rectangle to myDocument, adds text to the rectangle, and then sets the margins for the text frame.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddShape(msoShapeRectangle, _

        0, 0, 250, 140).TextFrame

    .TextRange.Text = "Here is some test text"

    .MarginBottom = 0

    .MarginLeft = 10

    .MarginRight = 0

    .MarginTop = 20

End With

See also

Concepts

TextFrame Object

Other resources

TextFrame Object Members


DataLabels.ShowBubbleSize Property (PowerPoint)

 Copy code hover
[image]

DataLabels.ShowBubbleSize Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True to show the bubble size for the data labels on a chart. False to hide the bubble size. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ShowBubbleSize

expression A variable that represents a DataLabels object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example shows the bubble size for the data labels of the first series on the first chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).DataLabels. _

            ShowBubbleSize = True

    End If

End With

See also

Concepts

DataLabels Object

Other resources

DataLabels Object Members


DataLabels.Creator Property (PowerPoint)

 Copy code hover
[image]

DataLabels.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents a DataLabels object.

See also

Concepts

DataLabels Object

Other resources

DataLabels Object Members


Trendlines Members (PowerPoint)

 Copy code hover
[image]

Trendlines Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a collection of all the Trendline objects for the specified series.

Methods

Name | Description
Add | Creates a new trendline.
Item | Returns a single object from a collection.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Count | Returns the number of objects in the collection. Read-only Long.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Parent | Returns the parent for the specified object. Read-only Object.


ThemeVariants Object (PowerPoint)

 Copy code hover
[image]

ThemeVariants Object (PowerPoint)
Send feedback

A collection of ThemeVariant objects that represent variations in the theme.

Version information

Version Added: PowerPoint 2013

Example

This example opens a theme file, iterates through the variants in the theme, and prints the name and ID of each variation in the theme.

VBA Copy code Copy code
Sub IterateThemeVariants()

    Dim pptTheme As Theme
    Dim pptThemeVariants As ThemeVariants
    Dim pptThemeVariant As ThemeVariant
    Dim path As String

    ' Get a reference to the currently active theme.
    path = "C:\Program Files (x86)\Microsoft Office\Document Themes 15\" & _
        ActivePresentation.TemplateName & ".thmx"
    Set pptTheme = Application.OpenThemeFile(path)

    ' Get a reference to all of the variations in the theme.
    Set pptThemeVariants = pptTheme.ThemeVariants

    ' Iterate over each variation of the theme and print
    ' its name and ID.
    For Each pptThemeVariant In pptThemeVariants

        Debug.Print "Variation " & pptThemeVariant.name & " id: " & pptThemeVariant.Id

    Next pptThemeVariant

End Sub


SlideShowTransition.AdvanceTime Property (PowerPoint)

 Copy code hover
[image]

SlideShowTransition.AdvanceTime Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the amount of time, in seconds, after which the specified slide transition will occur. Read/write.

Syntax

expression .AdvanceTime

expression A variable that represents a SlideShowTransition object.

Return Value

Single

Remarks

To put the slide interval settings into effect for the entire slide show, set the AdvanceMode property of the SlideShowSettings object to ppSlideShowUseSlideTimings.

Example

This example sets slide one in the active presentation to advance after five seconds have passed or when the mouse is clicked — whichever occurs first.

VBA Copy code Copy code
With ActivePresentation.Slides(1).SlideShowTransition

    .AdvanceOnClick = msoTrue

    .AdvanceOnTime = msoTrue

    .AdvanceTime = 5

End With

See also

Concepts

SlideShowTransition Object

Other resources

SlideShowTransition Object Members


CategoryCollection.Creator Property (PowerPoint)

 Copy code hover
[image]

CategoryCollection.Creator Property (PowerPoint)
Send feedback

Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.

Version Information

Version Added: PowerPoint 2013

Syntax

expression .Creator

expression A variable that represents a CategoryCollection object.


AnimationPoint Object (PowerPoint)

 Copy code hover
[image]

AnimationPoint Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents an individual animation point for an animation behavior. The AnimationPoint object is a member of the AnimationPoints collection. The AnimationPoints collection contains all the animation points for an animation behavior.

Example

To add or reference an AnimationPoint object, use the Add or Item method, respectively. Use the Time property of an AnimationPoint object to set timing between animation points. Use the Value property to set other animation point properties, such as color. The following example adds three animation points to the first behavior in the active presentation's main animation sequence, and then it changes colors at each animation point.

VBA Copy code Copy code
Sub AniPoint()

    Dim sldNewSlide As Slide

    Dim shpHeart As Shape

    Dim effCustom As Effect

    Dim aniBehavior As AnimationBehavior

    Dim aptNewPoint As AnimationPoint

    Set sldNewSlide = ActivePresentation.Slides.Add _

        (Index:=1, Layout:=ppLayoutBlank)

    Set shpHeart = sldNewSlide.Shapes.AddShape _

        (Type:=msoShapeHeart, Left:=100, Top:=100, _

        Width:=200, Height:=200)

    Set effCustom = sldNewSlide.TimeLine.MainSequence _

        .AddEffect(shpHeart, msoAnimEffectCustom)

    Set aniBehavior = effCustom.Behaviors.Add(msoAnimTypeProperty)

    With aniBehavior.PropertyEffect

        .Property = msoAnimShapeFillColor

        Set aptNewPoint = .Points.Add

        aptNewPoint.Time = 0.2

        aptNewPoint.Value = RGB(0, 0, 0)

        Set aptNewPoint = .Points.Add

        aptNewPoint.Time = 0.5

        aptNewPoint.Value = RGB(0, 255, 0)

        Set aptNewPoint = .Points.Add

        aptNewPoint.Time = 1

        aptNewPoint.Value = RGB(0, 255, 255)

    End With

End Sub

See also

Concepts

PowerPoint Object Model Reference

Other resources

AnimationPoint Object Members


Presentation.SharedWorkspace Property (PowerPoint)

 Copy code hover
[image]

Presentation.SharedWorkspace Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a SharedWorkspace object that represents the Document Workspace in which a specified presentation is located. Read-only.

Syntax

expression .SharedWorkspace

expression A variable that represents a Presentation object.

Return Value

SharedWorkspace

Remarks

Use the SharedWorkspace object to add the active Microsoft PowerPoint presentation to a Microsoft SharePoint Server document workspace site on the server to take advantage of the workspace's collaboration features, or to disconnect or remove the document from the workspace. Use the SharedWorkspace object's collections to manage files, folders, links, members and tasks associated with the shared document.

The SharedWorkspace object model is available whether or not a document is stored in a workspace. The SharedWorkspace property of the Presentation object does not return Nothing when the document is not shared. Use the Connected property of the SharedWorkspace object to determine whether the active presentation is in fact saved in and connected to a shared workspace.

Users require appropriate permissions to use the objects, properties, and methods in the SharedWorkspace object hierarchy.

Use the SharedWorkspaceFiles collection, accessed through the Files property of the SharedWorkspace object, to manage presentations and files saved in a shared workspace.

Use the SharedWorkspaceFolders collection, accessed through the Folders property of the SharedWorkspace object, to manage subfolders within the main document library folder of a shared workspace.

Use the SharedWorkspaceLinks collection, accessed through the Links property of the SharedWorkspace object, to manage links to additional documents and information of interest to the members who are collaborating on the documents in the shared workspace.

Use the SharedWorkspaceMembers collection, accessed through the Members property of the SharedWorkspace object, to manage users who have rights to participate in a shared workspace and to collaborate on the shared documents saved in the workspace.

Use the SharedWorkspaceTasks collection, accessed through the Tasks property of the SharedWorkspace object, to manage tasks assigned to the members who are collaborating on the documents in the shared workspace.

Use the CreateNew method to create a new document workspace and to add the active document to the workspace. Use the Name and URL properties to return information about the workspace.

The SharedWorkspace object uses a local cache of objects and properties from the server. The developer may need to update this cache before performing certain operations or to save cached property changes back to the server. Use the Refresh method of the SharedWorkspace object to refresh the local cache from the server, and the LastRefreshed property to determine when the refresh operation last took place. Use the Save method of the SharedWorkspaceLink and SharedWorkspaceTask objects after modifying their properties locally, to upload the changes to the server.

Use the Disconnect method to disconnect the local copy of the active document from the shared workspace, while leaving the shared copy intact in the workspace. Use the RemoveDocument method to remove the shared document from the shared workspace entirely.

Users require appropriate permissions to use the objects, properties, and methods in the SharedWorkspace object hierarchy. Use the Role argument when adding members to the SharedWorkspaceMembers collection to specify the set of permissions specific to each workspace member.

When using the SharedWorkspace object model, it is possible to create conditions where the SharedWorkspace object cache is not synchronized with the user interface displayed in the Shared Workspace pane of the active document. For example, if the CreateNew method programmatically adds the active document to a new workspace while the Shared Workspace pane is open, the Shared Workspace pane will continue to display the Create New button. In circumstances like these, if the user makes a selection in the Shared Workspace pane that is no longer valid, an error is raised and a refresh operation is carried out to synchronize the display with the current document state and shared workspace data.

The Presentation object also has a Sync property which returns a Sync object. Use the Sync object and its properties and methods to manage the synchronization of the local and the server copies of the shared document.

Example

The following example returns a reference to the document workspace in which the active presentation is stored. This example assumes that the active document belongs to a document workspace.

VBA Copy code Copy code
Dim objWorkspace As SharedWorkspace

Set objWorkspace = ActivePresentation.SharedWorkspace
Note Note

This object or member has been deprecated, but it remains part of the object model for backward compatibility. You should not use it in new applications.

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


LegendKey.Left Property (PowerPoint)

 Copy code hover
[image]

LegendKey.Left Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the distance, in points, from the left edge of the object to the left edge of the chart area. Read-only Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Left

expression A variable that represents a LegendKey object.

See also

Concepts

LegendKey Object

Other resources

LegendKey Object Members


Application.SmartArtQuickStyles Property (PowerPoint)

 Copy code hover
[image]

Application.SmartArtQuickStyles Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the quick styles of the SmartArt diagram in the current Application object. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .SmartArtQuickStyles

expression A variable that represents an Application object.

See also

Concepts

Application Object

Other resources

Application Object Members


SlideRange Properties (PowerPoint)

 Copy code hover
[image]

SlideRange Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Background | Returns a ShapeRange object that represents the slide background.
BackgroundStyle | Sets or returns the background style of the specified object. Read/write.
ColorScheme | Returns or sets the ColorScheme object that represents the scheme colors for the specified slide, slide range, or slide master. Read/write.
Comments | Returns a Comments object that represents a collection of comments. Read-only.
Count | Returns the number of objects in the specified collection. Read-only.
CustomerData | Returns a CustomerData object. Read-only.
CustomLayout | Returns a CustomLayout object that represents the custom layout associated with the specified range of slides. Read-only.
Design | Returns a Design object representing a design.
DisplayMasterShapes | Determines whether the specified range of slides displays the background objects on the slide master. Read/write.
FollowMasterBackground | Determines whether the range of slides follows the slide master background. Read/write.
HasNotesPage | Indicates whether the selected SlideRange has media that resides on a notes page. Read-only.
HeadersFooters | Returns a HeadersFooters collection that represents the header, footer, date and time, and slide number associated with the slide, slide master, or range of slides. Read-only.
Hyperlinks | Returns a Hyperlinks collection that represents all the hyperlinks on the specified slide. Read-only.
Layout | Returns or sets a PpSlideLayout constant that represents the slide layout. Read/write.
Master | Returns a Master object that represents the slide master. Read-only.
Name | When a slide is inserted into a presentation, Microsoft PowerPoint automatically assigns it a name in the form Sliden, where n is an integer that represents the order in which the slide was created in the presentation. For example, the first slide inserted into a presentation is automatically named Slide1. If you copy a slide from one presentation to another, the slide loses the name it had in the first presentation and is automatically assigned a new name in the second presentation. A slide range must contain exactly one slide. Read/write.
NotesPage | Returns a SlideRange object that represents the notes pages for the specified slide or range of slides. Read-only.
Parent | Returns the parent object for the specified object.
PrintSteps | Returns the number of slides you'd need to print to simulate the builds on the specified slide, slide master, or range of slides. Read-only.
sectionIndex | Returns the index of the selected section in the SlideRange. Read-only.
Shapes | Returns a Shapes collection that represents all the elements that have been placed or inserted on the specified slide, slide master, or range of slides. Read-only.
SlideID | Returns a unique ID number for the specified slide. Read-only.
SlideIndex | Returns the index number of the specified slide within the Slides collection. Read-only.
SlideNumber | Returns the slide number. Read-only.
SlideShowTransition | Returns a SlideShowTransition object that represents the special effects for the specified slide transition. Read-only.
Tags | Returns a Tags object that represents the tags for the specified object. Read-only.
ThemeColorScheme | Returns a ThemeColorScheme object that represents the color scheme associated with the specified range of slides. Read-only.
TimeLine | Returns a TimeLine object that represents the animation timeline for the slide. Read-only.


ColorScheme Members (PowerPoint)

 Copy code hover
[image]

ColorScheme Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a color scheme, which is a set of eight colors used for the different elements of a slide, notes page, or handout, such as the title or background. (Note that the color schemes for slides, notes pages, and handouts in a presentation can be set independently.)

Methods

Name | Description
Colors | Returns an RGBColor object that represents a single color in a color scheme.
Delete | Deletes the specified ColorScheme object.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


LeaderLines.Parent Property (PowerPoint)

 Copy code hover
[image]

LeaderLines.Parent Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents a LeaderLines object.

See also

Concepts

LeaderLines Object

Other resources

LeaderLines Object Members


RulerLevels.Parent Property (PowerPoint)

 Copy code hover
[image]

RulerLevels.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a RulerLevels object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

RulerLevels Object

Other resources

RulerLevels Object Members


Axis.TickLabels Property (PowerPoint)

 Copy code hover
[image]

Axis.TickLabels Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the tick-mark labels for the specified axis. Read-only TickLabels.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .TickLabels

expression A variable that represents an Axis object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the color of the tick-mark label font for the value axis of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.Axes(xlValue).TickLabels.Font.ColorIndex = 3

    End If

End With

See also

Concepts

Axis Object

Other resources

Axis Object Members


ThreeDFormat.IncrementRotationZ Method (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.IncrementRotationZ Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Rotates the ThreeDFormat object around the ground plane by the specified number of degrees.

Syntax

expression .IncrementRotationZ(Increment)

expression A variable that represents a ThreeDFormat object.

Parameters

Name | Required/Optional | Data Type | Description
Increment | Required | Single | The number of degrees to rotate the ThreeDFormat object, between -180 and 180 degrees.

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


AnimationBehavior.Application Property (PowerPoint)

 Copy code hover
[image]

AnimationBehavior.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents an AnimationBehavior object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

AnimationBehavior Object

Other resources

AnimationBehavior Object Members


SlideRange.CustomerData Property (PowerPoint)

 Copy code hover
[image]

SlideRange.CustomerData Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a CustomerData object. Read-only.

Syntax

expression .CustomerData

expression An expression that returns a SlideRange object.

Return Value

CustomerData

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


Broadcast Object (PowerPoint)

 Copy code hover
[image]

Broadcast Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

A Broadcast Documents library that is used to store documents being presented.

Version Information

Version Added: PowerPoint 2010

See also

Concepts

PowerPoint Object Model Reference

Other resources

Broadcast Object Members


Coauthoring.FavorServerEditsDuringMerge Property (PowerPoint)

 Copy code hover
[image]

Coauthoring.FavorServerEditsDuringMerge Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Gets or sets whether the merged document favors server-side edits when conflicts occur. Read/write.

Syntax

expression .FavorServerEditsDuringMerge

expression A variable that represents a Coauthoring object.

Return Value

Boolean

Remarks

FavorServerEditsDuringMerge returns an error if the application is not already in merge mode. True to favor server-side edits. The default is False, which means that local client-side edits are favored.

See also

Concepts

Coauthoring Object

Other resources

Coauthoring Object Members


Legend.Position Property (PowerPoint)

 Copy code hover
[image]

Legend.Position Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the position of the legend on the chart. Read/write XlLegendPosition.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Position

expression A variable that represents a Legend object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example moves the chart legend to the bottom of the chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.Legend.Position = xlLegendPositionBottom

    End If

End With

See also

Concepts

Legend Object

Other resources

Legend Object Members


HeadersFooters Properties (PowerPoint)

 Copy code hover
[image]

HeadersFooters Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
DateAndTime | Returns a HeaderFooter object that represents the date and time item that appears in the lower-left corner of a slide or in the upper-right corner of a notes page, handout, or outline. Read-only.
DisplayOnTitleSlide | Determines whether the footer, date and time, and slide number appear on the title slide. Applies to slide masters. Read/write.
Footer | Returns a HeaderFooter object that represents the footer that appears at the bottom of a slide or in the lower-left corner of a notes page, handout, or outline. Read-only.
Header | Returns a HeaderFooter object that represents the header that appears at the top of a slide or in the upper-left corner of a notes page, handout, or outline. Read-only.
Parent | Returns the parent object for the specified object.
SlideNumber | Returns a HeaderFooter object that represents the slide number in the lower-right corner of a slide, or the page number in the lower-right corner of a notes page or a page of a printed handout or outline. Read-only.


TextStyleLevels.Application Property (PowerPoint)

 Copy code hover
[image]

TextStyleLevels.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a TextStyleLevels object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

TextStyleLevels Object

Other resources

TextStyleLevels Object Members


SlideNavigation Properties (PowerPoint)

 Copy code hover
[image]

SlideNavigation Properties (PowerPoint)
Send feedback

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Parent | Returns the parent for the specified object. Read-only Object.
Visible | Specifies whether the slide navigation screen is displayed during a slide show. Read/write.


Series.PictureUnit2 Property (PowerPoint)

 Copy code hover
[image]

Series.PictureUnit2 Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the unit for each picture on the chart if the PictureType property is set to xlStackScale; otherwise, this property is ignored. Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .PictureUnit2

expression A variable that represents a Series object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets series one for the first chart in the active document to stack pictures and uses each picture to represent five units. You should run the example on a 2-D column chart that has picture data markers.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.SeriesCollection(1)

            .PictureType = xlScale

            .PictureUnit2 = 5

        End With

    End If

End With

See also

Concepts

Series Object

Other resources

Series Object Members


PlotArea.ClearFormats Method (PowerPoint)

 Copy code hover
[image]

PlotArea.ClearFormats Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Clears the formatting of the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ClearFormats

expression A variable that represents a PlotArea object.

See also

Concepts

PlotArea Object

Other resources

PlotArea Object Members


Comment.Author Property (PowerPoint)

 Copy code hover
[image]

Comment.Author Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a String that represents the author as for a specified Comment object. Read-only.

Syntax

expression .Author

expression A variable that represents an Comment object.

Return Value

String

Remarks

This property returns only the author's name. To return the author's initials, use the AuthorInitials property. Specify the author of a comment when you add a new comment to the presentation.

Example

The following example adds a comment to the first slide of the active presentation and then displays the author's name and initials in a message.

VBA Copy code Copy code
Sub GetAuthorName()

    With ActivePresentation.Slides(1)

        .Comments.Add Left:=100, Top:=100, Author:="Jeff Smith", _

            AuthorInitials:="JS", _

            Text:="This is a new comment added to the first slide."

        MsgBox "This comment was created by " & _

            .Comments(1).Author & " (" & .Comments(1).AuthorInitials & ")."

    End With

End Sub

See also

Concepts

Comment Object

Other resources

Comment Object Members


Legend.Name Property (PowerPoint)

 Copy code hover
[image]

Legend.Name Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the name of the object. Read-only String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Name

expression A variable that represents a Legend object.

See also

Concepts

Legend Object

Other resources

Legend Object Members


Tags Members (PowerPoint)

 Copy code hover
[image]

Tags Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a tag or a custom property that you can create for a shape, slide, or presentation.

Methods

Name | Description
Add | Adds a tag to the Tags collection of an object.
Delete | Deletes a tag.
Item | Returns a single tag from the specified Tags collection.
Name | Returns the name of the specified tag as a String.
Value | Returns the value of the specified tag as a String.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


Series.PlotColorIndex Property (PowerPoint)

 Copy code hover
[image]

Series.PlotColorIndex Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an index value that is used internally to associate series formatting with chart elements. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .PlotColorIndex

expression A variable that represents a Series object.

Return Value

Integer

Remarks

This property is used internally by Microsoft PowerPoint and is not intended to be called from your code.

See also

Concepts

Series Object

Other resources

Series Object Members


AnimationPoint.Formula Property (PowerPoint)

 Copy code hover
[image]

AnimationPoint.Formula Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a String that represents a formula to use for calculating an animation. Read/write.

Syntax

expression .Formula

expression A variable that represents a AnimationPoint object.

Return Value

String

Example

The following example adds a shape, and adds a three-second fill animation to that shape.

VBA Copy code Copy code
Sub AddShapeSetAnimFill()

    Dim effBlinds As Effect

    Dim shpRectangle As Shape

    Dim animBlinds As AnimationBehavior

    'Adds rectangle and sets animiation effect

    Set shpRectangle = ActivePresentation.Slides(1).Shapes _

        .AddShape(Type:=msoShapeRectangle, Left:=100, _

        Top:=100, Width:=50, Height:=50)

    Set effBlinds = ActivePresentation.Slides(1).TimeLine.MainSequence _

        .AddEffect(Shape:=shpRectangle, effectId:=msoAnimEffectBlinds)

    'Sets the duration of the animation

    effBlinds.Timing.Duration = 3

    'Adds a behavior to the animation

    Set animBlinds = effBlinds.Behaviors.Add(msoAnimTypeProperty)

    'Sets the animation color effect and the formula to use

    With animBlinds.PropertyEffect

        .Property = msoAnimColor

        .Formula = RGB(Red:=255, Green:=255, Blue:=255)

    End With

End Sub

See also

Concepts

AnimationPoint Object

Other resources

AnimationPoint Object Members


Chart.HasLegend Property (PowerPoint)

 Copy code hover
[image]

Chart.HasLegend Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if the chart has a legend. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .HasLegend

expression A variable that represents a Chart object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example enables the legend for the first chart in the active document and then sets the legend font color to blue.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart

            .HasLegend = True

            .Legend.Font.ColorIndex = 5

        End With

    End If

End With

See also

Concepts

Chart Object

Other resources

Chart Object Members


TextFrame2.Application Property (PowerPoint)

 Copy code hover
[image]

TextFrame2.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified TextFrame2 object. Read-only.

Syntax

expression .Application

expression An expression that returns a TextFrame2 object.

See also

Concepts

TextFrame2 Object

Other resources

TextFrame2 Object Members


Comments Members (PowerPoint)

 Copy code hover
[image]

Comments Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a collection of Comment objects.

Methods

Name | Description
Add | Returns a Comment object that represents a new comment added to a slide.
Add2 | Returns a Comment object that represents a new comment added to a slide.
Item | Returns a single Comment object from the specified Comments collection.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


ThreeDFormat.PresetLightingDirection Property (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.PresetLightingDirection Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the position of the light source relative to the extrusion. Read/write.

Syntax

expression .PresetLightingDirection

expression A variable that represents a ThreeDFormat object.

Return Value

MsoPresetLightingDirection

Remarks

The value of the PresetLightingDirection property can be one of these MsoPresetLightingDirection constants.

msoLightingBottom

msoLightingBottomLeft

msoLightingBottomRight

msoLightingLeft

msoLightingNone

msoLightingRight

msoLightingTop

msoLightingTopLeft

msoLightingTopRight

msoPresetLightingDirectionMixed

Example

This example specifies that the extrusion for shape one on myDocument extend toward the top of the shape and that the lighting for the extrusion come from the left.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(1).ThreeD

    .Visible = True

    .SetExtrusionDirection msoExtrusionTop

    .PresetLightingDirection = msoLightingLeft

End With

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


Slides Properties (PowerPoint)

 Copy code hover
[image]

Slides Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


Point.Copy Method (PowerPoint)

 Copy code hover
[image]

Point.Copy Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

If the point has a picture fill, copies the picture to the Clipboard.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Copy

expression A variable that represents a Point object.

See also

Concepts

Point Object

Other resources

Point Object Members


Axis.TickMarkSpacing Property (PowerPoint)

 Copy code hover
[image]

Axis.TickMarkSpacing Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the number of categories or series between tick marks. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .TickMarkSpacing

expression A variable that represents an Axis object.

Remarks

This property applies only to category and series axes. It can be a value from 1 through 31999.

Use the MajorUnit and MinorUnit properties to set tick-mark spacing on the value axis.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the number of categories between tick marks on the category axis of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.Axes(xlCategory).TickMarkSpacing = 10

    End If

End With

See also

Concepts

Axis Object

Other resources

Axis Object Members


Comment.Delete Method (PowerPoint)

 Copy code hover
[image]

Comment.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the specified Comment object.

Syntax

expression .Delete

expression A variable that represents a Comment object.

See also

Concepts

Comment Object

Other resources

Comment Object Members


LegendEntry.Select Method (PowerPoint)

 Copy code hover
[image]

LegendEntry.Select Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Selects the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Select

expression A variable that represents a LegendEntry object.

See also

Concepts

LegendEntry Object

Other resources

LegendEntry Object Members


Presentation.SlideMaster Property (PowerPoint)

 Copy code hover
[image]

Presentation.SlideMaster Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Master object that represents the slide master.

Syntax

expression .SlideMaster

expression A variable that represents a Presentation object.

Return Value

Master

Example

This example sets the background pattern for the slide master for the active presentation.

VBA Copy code Copy code
Application.ActivePresentation.SlideMaster.Background.Fill _

    .PresetTextured msoTextureGreenMarble

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


SlideShowWindow Properties (PowerPoint)

 Copy code hover
[image]

SlideShowWindow Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Active | Returns whether the specified pane or window is active. Read-only.
Application | Returns an Application object that represents the creator of the specified object.
Height | Returns or sets the height of the specified object, in points. Read/write.
IsFullScreen | Returns whether the specified slide show window occupies the entire screen. Read-only.
Left | Returns or sets a Single that represents the distance in points from the left edge of the document, application, and slide show windows to the left edge of the application window's client area. Setting this property to a very large positive or negative value may position the window completely off the desktop. Read/write.
Parent | Returns the parent object for the specified object.
Presentation | Returns a Presentation object that represents the presentation in which the specified document window or slide show window was created. Read-only.
SlideNavigation | Returns a SlideNavigation object that represents the slide navigation screen in slide show view. Read-only
Top | Returns or sets a Single that represents the distance in points from the top edge of the document, application, and slide show window to the top edge of the application window's client area. Read/write.
View | Returns a SlideShowView object. Read-only.
Width | Returns or sets the width of the specified object, in points. Read/write.


DataLabels.Propagate Method (PowerPoint)

 Copy code hover
[image]

DataLabels.Propagate Method (PowerPoint)
Send feedback

Propagates the contents and formatting of the specified data label to all the other data labels in the series.

Version information

Version Added: PowerPoint 2013

Syntax

expression .Propagate(Index)

expression A variable that represents a DataLabels object.

Parameters

Name | Required/Optional | Data type | Description
Index | Required | Variant | The index number in the DataLabels collection of the data label to propagate.
Index | Required | VARIANT |

Return value

VOID


Presentation.PasswordEncryptionFileProperties Property (PowerPoint)

 Copy code hover
[image]

Presentation.PasswordEncryptionFileProperties Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns whether Microsoft PowerPoint encrypts file properties for password-protected documents. Read-only.

Syntax

expression .PasswordEncryptionFileProperties

expression A variable that represents a Presentation object.

Return Value

MsoTriState

Remarks

Use the SetPasswordEncryptionOptions method to specify the algorithm PowerPoint uses for encrypting documents with passwords.

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

Constant | Description
msoFalse | PowerPoint does not encrypt file properties for password-protected documents.
msoTrue | PowerPoint encrypts file properties for password-protected documents.

Example

This example sets the password encryption options if the file properties are not encrypted for password-protected documents.

VBA Copy code Copy code
Sub PasswordSettings()

    With ActivePresentation

        If .PasswordEncryptionFileProperties = msoFalse Then

            .SetPasswordEncryptionOptions _

                PasswordEncryptionProvider:="Microsoft RSA SChannel Cryptographic Provider", _

                PasswordEncryptionAlgorithm:="RC4", _

                PasswordEncryptionKeyLength:=56, _

                PasswordEncryptionFileProperties:=True

        End If

    End With

End Sub

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


Series.Type Property (PowerPoint)

 Copy code hover
[image]

Series.Type Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the series type. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Type

expression A variable that represents a Series object.

Remarks

You can use the following XlConstants constants for this property:

  • xlColumn

  • xlBar

  • xl3DBar

  • xlLine

  • xlPie

  • xlXYScatter

  • xlArea

  • xl3DArea

  • xlDoughnut

  • xlRadar

  • xl3DSurface

  • xl3DColumn

  • xl3DBar

See also

Concepts

Series Object

Other resources

Series Object Members


LegendEntry.Delete Method (PowerPoint)

 Copy code hover
[image]

LegendEntry.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Delete

expression A variable that represents a LegendEntry object.

See also

Concepts

LegendEntry Object

Other resources

LegendEntry Object Members


ShadowFormat.Application Property (PowerPoint)

 Copy code hover
[image]

ShadowFormat.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a ShadowFormat object.

Return Value

Object

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

ShadowFormat Object

Other resources

ShadowFormat Object Members


FillFormat.UserPicture Method (PowerPoint)

 Copy code hover
[image]

FillFormat.UserPicture Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Fills the specified shape with one large image.

Syntax

expression .UserPicture(PictureFile)

expression A variable that represents an FillFormat object.

Parameters

Name | Required/Optional | Data Type | Description
PictureFile | Required | String | The name of the picture file.

Remarks

If you want to fill the shape with small tiles of an image, use the UserTextured method.

Example

This example adds two rectangles to myDocument. The rectangle on the left is filled with one large image of the picture in Tiles.bmp; the rectangle on the right is filled with many small tiles of the picture in Tiles.bmp

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    .AddShape(msoShapeRectangle, 0, 0, 200, 100).Fill _

        .UserPicture "c:\windows\tiles.bmp"

    .AddShape(msoShapeRectangle, 300, 0, 200, 100).Fill _

        .UserTextured "c:\windows\tiles.bmp"

End With

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


Shapes.AddOLEObject Method (PowerPoint)

 Copy code hover
[image]

Shapes.AddOLEObject Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Creates an OLE object. Returns a Shape object that represents the new OLE object.

Syntax

expression .AddOLEObject(Left, Top, Width, Height, ClassName, FileName, DisplayAsIcon, IconFileName, IconIndex, IconLabel, Link)

expression A variable that represents a Shapes object.

Parameters

Name | Required/Optional | Data Type | Description
Left | Optional | Single | The position (in points) of the upper-left corner of the new object relative to the upper-left corner of the slide. The default value is 0 (zero).
Top | Optional | Single | The position (in points) of the upper-left corner of the new object relative to the upper-left corner of the slide. The default value is 0 (zero).
Width | Optional | Single | The initial width of the OLE object, in points.
Height | Optional | Single | The initial height of the OLE object, in points.
ClassName | Optional | String | The OLE long class name or the ProgID for the object that's to be created. You must specify either the ClassName or FileName argument for the object, but not both.
FileName | Optional | String | The file from which the object is to be created. If the path isn't specified, the current working folder is used. You must specify either the ClassName or FileName argument for the object, but not both.
DisplayAsIcon | Optional | MsoTriState | Determines whether the OLE object will be displayed as an icon.
IconFileName | Optional | String | The file that contains the icon to be displayed.
IconIndex | Optional | Long | The index of the icon within IconFileName. The first icon in the file has the index number 0 (zero). If an icon with the given index number doesn't exist in IconFileName, the icon with the index number 1 (the second icon in the file) is used. The default value is 0 (zero).
IconLabel | Optional | String | A label (caption) to be displayed beneath the icon.
Link | Optional | MsoTriState | Determines whether the OLE object will be linked to the file from which it was created. If you specified a value for ClassName, this argument must be msoFalse.

Return Value

Shape

Example

This example adds a linked Word document to myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)
myDocument.Shapes.AddOLEObject Left:=100, Top:=100, _
    Width:=200, Height:=300, _
    FileName:="c:\my documents\testing.doc", Link:=msoTrue

This example adds a new Microsoft Excel worksheet to myDocument. The worksheet will be displayed as an icon.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)
myDocument.Shapes.AddOLEObject Left:=100, Top:=100, _
    Width:=200, Height:=300, _
    ClassName:="Excel.Sheet", DisplayAsIcon:=True

This example adds a command button to myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)
myDocument.Shapes.AddOLEObject Left:=100, Top:=100, _
    Width:=150, Height:=50, ClassName:="Forms.CommandButton.1"

See also

Concepts

Shapes Object

Other resources

Shapes Object Members


PrintRanges Methods (PowerPoint)

 Copy code hover
[image]

PrintRanges Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Add | Returns a PrintRange object that represents a new print range to be added to the PrintRanges collection.
ClearAll | Clears all the print ranges from the PrintRanges collection. Use the Add method of the PrintRanges collection to add print ranges to the collection.
Item | Returns a single PrintRange object from the specified PrintRanges collection.


DataTable.Application Property (PowerPoint)

 Copy code hover
[image]

DataTable.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents a DataTable object.

See also

Concepts

DataTable Object

Other resources

DataTable Object Members


PlaySettings.Parent Property (PowerPoint)

 Copy code hover
[image]

PlaySettings.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a PlaySettings object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

PlaySettings Object

Other resources

PlaySettings Object Members


SeriesLines Properties (PowerPoint)

 Copy code hover
[image]

SeriesLines Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Border | Returns the border of the object. Read-only ChartBorder.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Name | Returns the name of the object. Read-only String.
Parent | Returns the parent for the specified object. Read-only Object.


ActionSettings.Item Method (PowerPoint)

 Copy code hover
[image]

ActionSettings.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single action setting from the specified ActionSettings collection.

Syntax

expression .Item(Index)

expression A variable that represents an ActionSettings object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | PpMouseActivation | The action setting for a MouseClick or MouseOver event.

Return Value

ActionSetting

Remarks

The Index parameter value can be one of these PpMouseActivation constants.

Constant | Description
ppMouseClick | The action setting for when the user clicks the shape.
ppMouseOver | The action setting for when the mouse pointer is positioned over the specified shape.

The Item method is the default member for a collection. For example, the following two lines of code are equivalent:

VBA Copy code Copy code
ActivePresentation.Slides.Item(1)
VBA Copy code Copy code
ActivePresentation.Slides(1)

For more information about returning a single member of a collection, see Returning an Object from a Collection.

Example

This example sets shape three on slide one to play the sound of applause and uses the AnimateAction property to specify that the shape's color is to be momentarily inverted when the shape is clicked during a slide show.

VBA Copy code Copy code
With ActivePresentation.Slides.Item(1).Shapes _

        .Item(3).ActionSettings.Item(ppMouseClick)

    .SoundEffect.Name = "applause"

    .AnimateAction = True

End With

See also

Concepts

ActionSettings Object

Other resources

ActionSettings Object Members


View.Application Property (PowerPoint)

 Copy code hover
[image]

View.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a View object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

View Object

Other resources

View Object Members


DataLabel.Parent Property (PowerPoint)

 Copy code hover
[image]

DataLabel.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents a DataLabel object.

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


TextEffectFormat.NormalizedHeight Property (PowerPoint)

 Copy code hover
[image]

TextEffectFormat.NormalizedHeight Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the characters (both uppercase and lowercase) in the specified WordArt are the same height. Read/write.

Syntax

expression .NormalizedHeight

expression A variable that represents a TextEffectFormat object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | All characters (both uppercase and lowercase) in the specified WordArt are not the same height.
msoTrue | All characters (both uppercase and lowercase) in the specified WordArt are the same height.

Example

This example adds WordArt that contains the text "Test Effect" to myDocument and gives the new WordArt the name "texteff1." The code then makes all characters in the shape named "texteff1" the same height.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes.AddTextEffect(PresetTextEffect:=msoTextEffect1, _

    Text:="Test Effect", FontName:="Courier New", _

    FontSize:=44, FontBold:=True, _

    FontItalic:=False, Left:=10, Top:=10)_

    .Name = "texteff1"

myDocument.Shapes("texteff1").TextEffect.NormalizedHeight = msoTrue

See also

Concepts

TextEffectFormat Object

Other resources

TextEffectFormat Object Members


GroupShapes.Creator Property (PowerPoint)

 Copy code hover
[image]

GroupShapes.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.

Syntax

expression .Creator

expression A variable that represents a GroupShapes object.

Return Value

Long

Remarks

The Creator property is designed to be used in Microsoft Office applications for the Macintosh.

Example

This example displays a message about the creator of myObject.

VBA Copy code Copy code
Set myObject = Application.ActivePresentation.Slides(1).Shapes(1)

If myObject.Creator = &h50575054 Then

    MsgBox "This is a PowerPoint object"

Else

    MsgBox "This is not a PowerPoint object"

End If

See also

Concepts

GroupShapes Object

Other resources

GroupShapes Object Members


Application.WindowDeactivate Event (PowerPoint)

 Copy code hover
[image]

Application.WindowDeactivate Event (PowerPoint)
See also Send feedback

Published: July 16, 2012

Occurs when the application window or any document window is deactivated.

Syntax

expression .WindowDeactivate(Pres, Wn)

expression A variable that represents an Application object.

Parameters

Name | Required/Optional | Data Type | Description
Pres | Required | Presentation | The presentation displayed in the deactivated window.
Wn | Required | DocumentWindow | The deactivated document window.

Example

This example finds the file name (without its extension) for the presentation in the window that is being deactivated. It then appends the .htm extension to the file name and saves it as a Web page in the same folder as the presentation.

VBA Copy code Copy code
Private Sub App_WindowDeactivate (ByVal Pres As Presentation, ByVal Wn As DocumentWindow)

    FindNum = InStr(1, Wn.Presentation.FullName, ".")

    If FindNum = 0 Then

        HTMLName = Wn.Presentation.FullName & ".htm"

    Else

        HTMLName = Mid(Wn.Presentation.FullName, 1, FindNum - 1) _

            & ".htm"

    End If

    Wn.Presentation.SaveCopyAs HTMLName, ppSaveAsHTML

    MsgBox "Presentation being saved in HTML format as " _

        & HTMLName & " ."

End Sub

See also

Concepts

Application Object

Other resources

Application Object Members


ChartTitle.Creator Property (PowerPoint)

 Copy code hover
[image]

ChartTitle.Creator Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents a ChartTitle object.

See also

Concepts

ChartTitle Object

Other resources

ChartTitle Object Members


AnimationSettings Members (PowerPoint)

 Copy code hover
[image]

AnimationSettings Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents the special effects applied to the animation for the specified shape during a slide show.

Properties

Name | Description
AdvanceMode | Returns or sets a value that indicates whether the specified shape animation advances only when clicked or automatically after a specified amount of time. Read/write.
AdvanceTime | Returns or sets the amount of time, in seconds, after which the specified shape will become animated. Read/write.
AfterEffect | Returns or sets a PpAfterEffect constant that indicates whether the specified shape appears dimmed, hidden, or unchanged after it is built. Read/write.
Animate | Determines whether the specified shape is animated during a slide show. Read/write.
AnimateBackground | If the specified object is an AutoShape, specifies if the shape is animated separately from the text it contains. Read/write.
AnimateTextInReverse | Determines whether the specified shape is built in reverse order. Applies only to shapes (such as shapes containing lists) that can be built in more than one step. Read/write.
AnimationOrder | Returns or sets an integer that represents the position of the specified shape within the collection of shapes to be animated. Read/write.
Application | Returns an Application object that represents the creator of the specified object.
ChartUnitEffect | Returns or sets a value that indicates whether the graph range is animated by series, category, or element. Read/write.
DimColor | Returns or sets a ColorFormat object that represents the color of the specified shape after it is been built. Read-only.
EntryEffect | For the AnimationSettings object, this property returns or sets the special effect applied to the animation for the specified shape. Read/write.
Parent | Returns the parent object for the specified object.
PlaySettings | Returns a PlaySettings object that contains information about how the specified media clip plays during a slide show. Read-only.
SoundEffect | Returns a SoundEffect object that represents the sound to be played during the transition to the specified slide. REad-only.
TextLevelEffect | Indicates whether the text in the specified shape is animated by first-level paragraphs, second-level paragraphs, or some other level of paragraphs (up to fifth-level paragraphs). Read/write.
TextUnitEffect | Indicates whether the text in the specified shape is animated paragraph by paragraph, word by word, or letter by letter. Read/write.


Presentation.SlideShowSettings Property (PowerPoint)

 Copy code hover
[image]

Presentation.SlideShowSettings Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a SlideShowSettings object that represents the slide show settings for the specified presentation. Read-only.

Syntax

expression .SlideShowSettings

expression A variable that represents a Presentation object.

Return Value

SlideShowSettings

Example

This example starts a slide show meant to be presented by a speaker. The slide show will run with animation and narration turned off.

VBA Copy code Copy code
With Application.ActivePresentation.SlideShowSettings

    .ShowType = ppShowTypeSpeaker

    .ShowWithNarration = False

    .ShowWithAnimation = False

    .Run

End With

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


PictureFormat Properties (PowerPoint)

 Copy code hover
[image]

PictureFormat Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Brightness | Returns or sets the brightness of the specified picture or OLE object. Read/write.
ColorType | Returns or sets the type of color transformation applied to the specified picture or OLE object. Read/write.
Contrast | Returns or sets the contrast for the specified picture or OLE object.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
Crop | Returns or sets the number of points that are cropped off the specified picture or OLE object. Read-only.
CropBottom | Returns or sets the number of points that are cropped off the bottom of the specified picture or OLE object. Read/write.
CropLeft | Returns or sets the number of points that are cropped off the left side of the specified picture or OLE object. Read/write.
CropRight | Returns or sets the number of points that are cropped off the right side of the specified picture or OLE object. Read/write.
CropTop | Returns or sets the number of points that are cropped off the top of the specified picture or OLE object. Read/write.
Parent | Returns the parent object for the specified object.
TransparencyColor | Returns or sets the transparent color for the specified picture as a red-green-blue (RGB) value. Read/write.
TransparentBackground | Determines whether parts of the picture that are the color defined as the transparent color appear transparent. Applies to bitmaps only. Read/write.


ChartGroup.Index Property (PowerPoint)

 Copy code hover
[image]

ChartGroup.Index Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the index number of the object within the collection of similar objects. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Index

expression A variable that represents a ChartGroup object.

See also

Concepts

ChartGroup Object

Other resources

ChartGroup Object Members


Application.FileValidation Property (PowerPoint)

 Copy code hover
[image]

Application.FileValidation Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a value that indicates how PowerPoint will validate files before opening them. Read/write

Version Information

Version Added: PowerPoint 2010

Syntax

expression .FileValidation

expression A variable that represents an Application object.

Return Value

MsoFileValidationMode

Remarks

Files that do not pass validation will be opened in a Protected View window. If you set the FileValidation property, that setting will remain in effect for the entire session during which the application is open.

See also

Concepts

Application Object

Other resources

Application Object Members


Axis.MinimumScale Property (PowerPoint)

 Copy code hover
[image]

Axis.MinimumScale Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the minimum value on the value axis. Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .MinimumScale

expression A variable that represents an Axis object.

Remarks

Setting this property sets the MinimumScaleIsAuto property to False.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the minimum and maximum values for the value axis of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.Axes(xlValue)

            .MinimumScale = 10

            .MaximumScale = 120

        End With

    End If

End With

See also

Concepts

Axis Object

Other resources

Axis Object Members


CustomLayouts.Parent Property (PowerPoint)

 Copy code hover
[image]

CustomLayouts.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object. Read-only.

Syntax

expression .Parent

expression A variable that represents a CustomLayouts object.

Return Value

Object

See also

Concepts

CustomLayouts Object

Other resources

CustomLayouts Object Members


HiLoLines.Name Property (PowerPoint)

 Copy code hover
[image]

HiLoLines.Name Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the name of the object. Read-only String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Name

expression A variable that represents a HiLoLines object.

See also

Concepts

HiLoLines Object

Other resources

HiLoLines Object Members


ThemeVariant.Id Property (PowerPoint)

 Copy code hover
[image]

ThemeVariant.Id Property (PowerPoint)
Send feedback

Returns a string that represents the ID of the theme variation. Read-only.

Version information

Version Added: PowerPoint 2013

Syntax

expression .Id

expression A variable that represents a ThemeVariant object.

Example

This example opens a theme file, iterates through the variants in the theme, and prints the name and ID of each variation in the theme.

VBA Copy code Copy code
Sub IterateThemeVariants()

    Dim pptTheme As Theme
    Dim pptThemeVariants As ThemeVariants
    Dim pptThemeVariant As ThemeVariant
    Dim path As String

    ' Get a reference to the currently active theme.
    path = "C:\Program Files (x86)\Microsoft Office\Document Themes 15\" & _
        ActivePresentation.TemplateName & ".thmx"
    Set pptTheme = Application.OpenThemeFile(path)

    ' Get a reference to all of the variations in the theme.
    Set pptThemeVariants = pptTheme.ThemeVariants

    ' Iterate over each variation of the theme and print
    ' its name and ID.
    For Each pptThemeVariant In pptThemeVariants

        Debug.Print "Variation " & pptThemeVariant.name & " id: " & pptThemeVariant.Id

    Next pptThemeVariant

End Sub

Property value

STRING


BulletFormat.Number Property (PowerPoint)

 Copy code hover
[image]

BulletFormat.Number Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the bullet number of a paragraph when the Type property of the BulletFormat object is set to ppBulletNumbered. Read-only.

Syntax

expression .Number

expression A variable that represents a BulletFormat object.

Return Value

Long

Remarks

If this property is queried for multiple paragraphs with different numbers, then the value ppBulletMixed is returned. If this property is queried for a paragraph with a type other than ppBulletNumbered, then a run-time error occurs.

Example

This example returns the bullet number of paragraph one in the selected text range to a variable named myParnum.

VBA Copy code Copy code
With ActiveWindow.Selection

    If .Type = ppSelectionTextRange Then

        With .TextRange.Paragraphs(1).ParagraphFormat.Bullet

            If .Type = ppBulletNumbered Then

                myParnum = .Number

            End If

        End With

    End If

End With

See also

Concepts

BulletFormat Object

Other resources

BulletFormat Object Members


AxisTitle.FormulaLocal Property (PowerPoint)

 Copy code hover
[image]

AxisTitle.FormulaLocal Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the formula for the object, using A1-style references in the language of the user. Read/write.

Syntax

expression .FormulaLocal

expression A variable that represents an AxisTitle object.

See also

Concepts

AxisTitle Object

Other resources

AxisTitle Object Members


Hyperlink.Type Property (PowerPoint)

 Copy code hover
[image]

Hyperlink.Type Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Represents the type of hyperlink. Read-only.

Syntax

expression .Type

expression A variable that represents a Hyperlink object.

Return Value

MsoHyperlinkType

Remarks

The value of the Type property can be one of these MsoHyperlinkType constants.

msoHyperlinkInlineShape For use in Microsoft Word only.

msoHyperlinkRange

msoHyperlinkShape

See also

Concepts

Hyperlink Object

Other resources

Hyperlink Object Members


PlotArea.Position Property (PowerPoint)

 Copy code hover
[image]

PlotArea.Position Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the position of the plot area on the chart. Read/write XlChartElementPosition.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Position

expression A variable that represents a PlotArea object.

See also

Concepts

PlotArea Object

Other resources

PlotArea Object Members


SlideRange.Cut Method (PowerPoint)

 Copy code hover
[image]

SlideRange.Cut Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the specified object and places it on the Clipboard.

Syntax

expression .Cut

expression A variable that represents a SlideRange object.

Example

This example deletes shapes one and two from slide one in the active presentation, places copies of them on the Clipboard, and then pastes the copies onto slide two.

VBA Copy code Copy code
With ActivePresentation

    .Slides(1).Shapes.Range(Array(1, 2)).Cut

    .Slides(2).Shapes.Paste

End With

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


Hyperlinks.Item Method (PowerPoint)

 Copy code hover
[image]

Hyperlinks.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single Hyperlink object from the specified Hyperlinks collection.

Syntax

expression .Item(Index)

expression A variable that represents a Hyperlinks object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Long | The index number of the single Hyperlink object in the collection to be returned.

Return Value

Hyperlink

See also

Concepts

Hyperlinks Object

Other resources

Hyperlinks Object Members


Adjustments Members (PowerPoint)

 Copy code hover
[image]

Adjustments Members (PowerPoint)
Send feedback

Published: July 16, 2012

Contains a collection of adjustment values for the specified AutoShape, WordArt object, or connector.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
Item | Returns or sets the adjustment value specified by the Index argument. Read/write.
Parent | Returns the parent object for the specified object.


SlideShowView.Zoom Property (PowerPoint)

 Copy code hover
[image]

SlideShowView.Zoom Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the zoom setting of the specified slide show window view as a percentage of normal size. Read-only.

Syntax

expression .Zoom

expression A variable that represents a SlideShowView object.

Return Value

Integer

Remarks

The Zoom property value can be from 10 to 400 percent.

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


Research Object (PowerPoint)

 Copy code hover
[image]

Research Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Provides access to the research service feature of Microsoft PowerPoint.

Remarks

The research service feature provides the ability to search multiple custom and third-party references from within PowerPoint. For more information, see the Office 2003 Research Services Software Development Kit (SDK).

See also

Concepts

PowerPoint Object Model Reference

Other resources

Research Object Members


Chart.ShowDataLabelsOverMaximum Property (PowerPoint)

 Copy code hover
[image]

Chart.ShowDataLabelsOverMaximum Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a value that indicates whether to show the data labels when the value is greater than the maximum value on the value axis. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ShowDataLabelsOverMaximum

expression A variable that represents a Chart object.

Remarks

If you change the value axis in such a way that it becomes smaller than the size of the data points, you can use this property to set a value that indicates whether to show the data labels. This property applies to 2-D charts only.

See also

Concepts

Chart Object

Other resources

Chart Object Members


ShapeNodes Methods (PowerPoint)

 Copy code hover
[image]

ShapeNodes Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Delete | Deletes a shape node.
Insert | Inserts a new segment after the specified node of the freeform.
Item | Returns a single ShapeNode object from the specified ShapeNodes collection.
SetEditingType | Sets the editing type of the specified node.
SetPosition | Sets the location of the node specified by Index. Note that, depending on the editing type of the node, this method may affect the position of adjacent nodes.
SetSegmentType | Sets the segment type of the segment that follows the specified node.


Presentation.HasTitleMaster Property (PowerPoint)

 Copy code hover
[image]

Presentation.HasTitleMaster Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

MsoTrue if the specified presentation has a title master. Read-only.

Syntax

expression .HasTitleMaster

expression A variable that represents a Presentation object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified presentation does not have a title master.
msoTrue | The specified presentation has a title master.

Example

This example adds a title master to the active presentation if it doesn't already have one.

VBA Copy code Copy code
With Application.ActivePresentation

    If Not .HasTitleMaster Then .AddTitleMaster

End With

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


PpChangeCase Enumeration (PowerPoint)

 Copy code hover
[image]

PpChangeCase Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the way the case of the specified text will be changed.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppCaseLower | 2 | Change to lowercase.
ppCaseSentence | 1 | Change to lowercase.
ppCaseTitle | 4 | Change to title case.
ppCaseToggle | 5 | Toggle the casing.
ppCaseUpper | 3 | Change to uppercase.


Series.FormulaLocal Property (PowerPoint)

 Copy code hover
[image]

Series.FormulaLocal Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the formula for the object, using A1-style references in the language of the user. Read/write String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .FormulaLocal

expression A variable that represents a Series object.

Remarks

If the cell contains a constant, this property returns that constant. If the cell is empty, the property returns an empty string. If the cell contains a formula, the property returns the formula as a string, in the same format in which it would be displayed in the formula bar (including the equal sign).

If you set the value or formula of a cell to a date, Microsoft Word verifies whether that cell is already formatted with one of the date or time number formats. If not, the number format is changed to the default short date number format.

If the range is a one- or two-dimensional range, you can set the formula to a Visual Basic array of the same dimensions. Similarly, you can put the formula into a Visual Basic array.

Setting the formula of a multiple-cell range fills all cells in the range with the formula.

See also

Concepts

Series Object

Other resources

Series Object Members


Master.Background Property (PowerPoint)

 Copy code hover
[image]

Master.Background Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a ShapeRange object that represents the slide background.

Syntax

expression .Background

expression A variable that represents a Master object.

Return Value

ShapeRange

Remarks

If you use the Background property to set the background for an individual slide without changing the slide master, the FollowMasterBackground property for that slide must be set to False.

Example

This example sets the background of the slide master in the active presentation to a preset shade.

VBA Copy code Copy code
ActivePresentation.SlideMaster.Background.Fill.PresetGradient _

    Style:=msoGradientHorizontal, Variant:=1, _

    PresetGradientType:=msoGradientLateSunset

This example sets the background of slide one in the active presentation to a preset shade.

VBA Copy code Copy code
With ActivePresentation.Slides(1)

    .FollowMasterBackground = False

    .Background.Fill.PresetGradient Style:=msoGradientHorizontal, _

        Variant:=1, PresetGradientType:=msoGradientLateSunset

End With

See also

Concepts

Master Object

Other resources

Master Object Members


ShapeRange.GroupItems Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.GroupItems Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a GroupShapes object that represents the individual shapes in the specified group. Use the Item method of the GroupShapes object to return a single shape from the group. Read-only.

Syntax

expression .GroupItems

expression A variable that represents a ShapeRange object.

Return Value

GroupShapes

Example

This example adds three triangles to myDocument, groups them, sets a color for the entire group, and then changes the color for the second triangle only.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    .AddShape(msoShapeIsoscelesTriangle, 10, _

        10, 100, 100).Name = "shpOne"

    .AddShape(msoShapeIsoscelesTriangle, 150, _

        10, 100, 100).Name = "shpTwo"

    .AddShape(msoShapeIsoscelesTriangle, 300, _

        10, 100, 100).Name = "shpThree"

    With .Range(Array("shpOne", "shpTwo", "shpThree")).Group

        .Fill.PresetTextured msoTextureBlueTissuePaper

        .GroupItems(2).Fill.PresetTextured msoTextureGreenMarble

    End With

End With

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


Application.Active Property (PowerPoint)

 Copy code hover
[image]

Application.Active Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns whether the specified pane or window is active. Read-only.

Syntax

expression .Active

expression A variable that represents an Application object.

Return Value

MsoTriState

Remarks

The value returned by the Active property can be one of these MsoTriState constants.

Constant | Description
msoFalse | The specified pane or window is inactive.
msoTrue | The specified pane or window is active.

Example

This example checks to see if the presentation file "test.ppt" is in the active window. If not, it saves the name of the presentation that is currently active in the variable oldWin and activates the "test.ppt" presentation.

VBA Copy code Copy code
With Application.Presentations("test.ppt").Windows(1)

    If Not .Active Then

        Set oldWin = Application.ActiveWindow

        .Activate

    End If

End With

See also

Concepts

Application Object

Other resources

Application Object Members


Columns.Application Property (PowerPoint)

 Copy code hover
[image]

Columns.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a Columns object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

Columns Object

Other resources

Columns Object Members


Fonts.Count Property (PowerPoint)

 Copy code hover
[image]

Fonts.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a Fonts object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

Fonts Object

Other resources

Fonts Object Members


Application.SlideShowNextClick Event (PowerPoint)

 Copy code hover
[image]

Application.SlideShowNextClick Event (PowerPoint)
See also Send feedback

Published: July 16, 2012

Occurs on the next click of the slide.

Syntax

expression .SlideShowNextClick(Wn, nEffect)

expression A variable that represents an Application object.

Parameters

Name | Required/Optional | Data Type | Description
Wn | Required | SlideShowWindow | The slide show window initialized prior to this event.
nEffect | Required | Effect | The effect to animate on next click.

Remarks

For information about using events with the Application object, see How to: Use Events with the Application Object.

See also

Concepts

Application Object

Other resources

Application Object Members


PrintRanges.Parent Property (PowerPoint)

 Copy code hover
[image]

PrintRanges.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a PrintRanges object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

PrintRanges Object

Other resources

PrintRanges Object Members


RulerLevels.Item Method (PowerPoint)

 Copy code hover
[image]

RulerLevels.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single RulerLevel object from the specified RulerLevels collection.

Syntax

expression .Item(Index)

expression A variable that represents a RulerLevels collection.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Long | The index number of the single RulerLevel object in the collection to be returned.

Return Value

RulerLevel

Example

This example sets the first-line indent and the hanging indent for outline level one in body text on the slide master for the active presentation.

VBA Copy code Copy code
With ActivePresentation.SlideMaster.TextStyles.Item(ppBodyStyle)

    With .Ruler.Levels.Item(1) ' sets indents for level 1

        .FirstMargin = 9

        .LeftMargin = 54

    End With

End With

See also

Concepts

RulerLevels Object

Other resources

RulerLevels Object Members


CellRange Methods (PowerPoint)

 Copy code hover
[image]

CellRange Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Item | Returns a single Cell object from the specified CellRange collection.


TickLabels.Creator Property (PowerPoint)

 Copy code hover
[image]

TickLabels.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents a TickLabels object.

See also

Concepts

TickLabels Object

Other resources

TickLabels Object Members


LineFormat Properties (PowerPoint)

 Copy code hover
[image]

LineFormat Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
BackColor | Returns or sets a ColorFormat object that represents the background color for the specified fill or patterned line. Read/write.
BeginArrowheadLength | Returns or sets the length of the arrowhead at the beginning of the specified line. Read/write.
BeginArrowheadStyle | Returns or sets the style of the arrowhead at the beginning of the specified line. Read/write.
BeginArrowheadWidth | Returns or sets the width of the arrowhead at the beginning of the specified line. Read/write.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
DashStyle | Returns or sets the dash style for the specified line. Read/write.
EndArrowheadLength | Returns or sets the length of the arrowhead at the end of the specified line. Read/write.
EndArrowheadStyle | Returns or sets the style of the arrowhead at the end of the specified line. Read/write.
EndArrowheadWidth | Returns or sets the width of the arrowhead at the end of the specified line. Read/write.
ForeColor | Returns or sets a ColorFormat object that represents the foreground color for the fill, line, or shadow. Read/write.
InsetPen | Detemines whether to draw lines on the inside of a specified shape. Read/write.
Parent | Returns the parent object for the specified object.
Pattern | Sets or returns a value that represents the pattern applied to the specified line. Read/write.
Style | Returns or sets the line style. Read/write.
Transparency | Returns or sets the degree of transparency of the specified fill, shadow, or line as a value between 0.0 (opaque) and 1.0 (clear). Read/write.
Visible | Returns or sets the visibility of the specified object or the formatting applied to the specified object. Read/write.
Weight | Returns or sets the thickness of the specified line, in points. Read/write.


Player.CurrentPosition Property (PowerPoint)

 Copy code hover
[image]

Player.CurrentPosition Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Gets or sets a Long that represents the current position of the player in the media. Read/write.

Syntax

expression .CurrentPosition

expression A variable that represents a Player object.

See also

Concepts

Player Object

Other resources

Player Object Members


TextEffectFormat.Creator Property (PowerPoint)

 Copy code hover
[image]

TextEffectFormat.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.

Syntax

expression .Creator

expression A variable that represents a TextEffectFormat object.

Return Value

Long

Remarks

The Creator property is designed to be used in Microsoft Office applications for the Macintosh.

Example

This example displays a message about the creator of myObject.

VBA Copy code Copy code
Set myObject = Application.ActivePresentation.Slides(1).Shapes(1)

If myObject.Creator = &h50575054 Then

    MsgBox "This is a PowerPoint object"

Else

    MsgBox "This is not a PowerPoint object"

End If

See also

Concepts

TextEffectFormat Object

Other resources

TextEffectFormat Object Members


Hyperlink.ScreenTip Property (PowerPoint)

 Copy code hover
[image]

Hyperlink.ScreenTip Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the ScreenTip text of a hyperlink. Read/write.

Syntax

expression .ScreenTip

expression A variable that represents a Hyperlink object.

Return Value

String

Remarks

ScreenTip text appears, for example, when you save a presentation to HTML, view it in a Web browser, and rest the mouse pointer over a hyperlink. Some browsers may not support ScreenTips.

Example

This example sets the ScreenTip text for the first hyperlink.

VBA Copy code Copy code
ActivePresentation.Slides(1).Hyperlinks(1) _

    .ScreenTip = "Go to the Microsoft home page"

See also

Concepts

Hyperlink Object

Other resources

Hyperlink Object Members


TextRange.PasteSpecial Method (PowerPoint)

 Copy code hover
[image]

TextRange.PasteSpecial Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Replaces the text range with the contents of the Clipboard in the format specified.

Syntax

expression .PasteSpecial(DataType, DisplayAsIcon, IconFileName, IconIndex, IconLabel, Link)

expression A variable that represents a TextRange object.

Parameters

Name | Required/Optional | Data Type | Description
DataType | Optional | PpPasteDataType | A format for the Clipboard contents when they're inserted into the document. The default value varies, depending on the contents in the Clipboard. An error occurs if the specified data type in the DataType argument is not supported by the clipboard contents.
DisplayAsIcon | Optional | MsoTriState | MsoTrue to display the embedded object (or link) as an icon.
IconFileName | Optional | String | If DisplayAsIcon is set to msoTrue, this argument is the path and file name for the file in which the icon to be displayed is stored. If DisplayAsIcon is set to msoFalse, this argument is ignored.
IconIndex | Optional | Long | If DisplayAsIcon is set to msoTrue, this argument is a number that corresponds to the icon you want to use in the program file specified by IconFilename. For example, 0 (zero) corresponds to the first icon, 1 corresponds to the second icon. If this argument is omitted, the first (default) icon is used. If DisplayAsIcon is set to msoFalse, then this argument is ignored. If IconIndex is outside the valid range, then the default icon (index 0) is used.
IconLabel | Optional | String | If DisplayAsIcon is set to msoTrue, this argument is the text that appears below the icon. If this label is missing, Microsoft PowerPoint generates an icon label based on the Clipboard contents. If DisplayAsIcon is set to msoFalse, then this argument is ignored.
Link | Optional | MsoTriState | Determines whether to create a link to the source file of the Clipboard contents. An error occurs if the Clipboard contents do not support a link.

Return Value

TextRange

Remarks

Valid data types for the TextRange object are ppPasteText, ppPasteHTML, and ppPasteRTF (any other format generates an error). If the paste succeeds, this method returns a TextRange object representing the text range that was pasted.

The DataType parameter value can be one of these PpPasteDataType constants.

ppPasteDefault

ppPasteHTML

ppPasteRTF

ppPasteText

The DisplayAsIcon parameter value can be one of these MsoTriState constants.

Constant | Description
msoFalse | The default. Does not display the embedded object (or link) as an icon.
msoTrue | Displays the embedded object (or link) as an icon.

An error occurs if there is no data on the Clipboard when the PasteSpecial method is called.

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


Walls.Paste Method (PowerPoint)

 Copy code hover
[image]

Walls.Paste Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Pastes a picture from the Clipboard on the walls of the specified chart.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Paste

expression A variable that represents a Walls object.

Remarks

You can use this method on column, bar, line, or radar charts.

See also

Concepts

Walls Object

Other resources

Walls Object Members


Shape.PictureFormat Property (PowerPoint)

 Copy code hover
[image]

Shape.PictureFormat Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a PictureFormat object that contains picture formatting properties for the specified shape. Read-only.

Syntax

expression .PictureFormat

expression A variable that represents a Shape object.

Return Value

PictureFormat

Remarks

This property applies to Shape or ShapeRange objects that represent pictures or OLE objects.

Example

This example sets the brightness and contrast for shape one on myDocument. Shape one must be a picture or an OLE object.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(1).PictureFormat

    .Brightness = 0.3

    .Contrast = .75

End With

See also

Concepts

Shape Object

Other resources

Shape Object Members


Application.Help Method (PowerPoint)

 Copy code hover
[image]

Application.Help Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Displays a Help topic.

Syntax

expression .Help(HelpFile, ContextID)

expression A variable that represents a Application object.

Parameters

Name | Required/Optional | Data Type | Description
HelpFile | Optional | String | The name of the Help file you want to display. Can be either a .chm or an .hlp file. If this argument is not specified, Microsoft PowerPoint Help is used.
ContextID | Optional | Long | The context ID number for the Help topic. If this argument is not specified or if it specifies a context ID number that is not associated with a Help topic, the Help Topics dialog box is displayed.

Example

This example displays topic number 65527 in the Help file MyHelpFile.chm.

Copy code Copy code
Application.Help "MyHelpFile.chm", 65527

See also

Concepts

Application Object

Other resources

Application Object Members


ChartBorder.LineStyle Property (PowerPoint)

 Copy code hover
[image]

ChartBorder.LineStyle Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the line style for the border. Read/write XlLineStyle, xlGray25, xlGray50, xlGray75, or xlAutomatic.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .LineStyle

expression A variable that represents a ChartBorder object.

Remarks

The xlDouble and xlSlantDashDot constants of the XlLineStyle enumeration do not apply to charts.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example puts a border around the chart area and the plot area of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart

            .ChartArea.Border.LineStyle = xlDashDot

            With .PlotArea.Border

                .LineStyle = xlDashDotDot

                .Weight = xlThick

            End With

        End With

    End If

End With

See also

Concepts

ChartBorder Object

Other resources

ChartBorder Object Members


Table Members (PowerPoint)

 Copy code hover
[image]

Table Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a table shape on a slide. The Table object is a member of the Shapes collection. The Table object contains the Columns collection and the Rows collection.

Methods

Name | Description
ApplyStyle | Applies a table style to the specified table.
Cell | Returns a Cell object that represents a cell in a table.
ScaleProportionally | Scales all cell heights and widths, font sizes, and internal margins in the table by a specified proportion.

Properties

Name | Description
AlternativeText | Returns or sets the alternative text associated with a shape in a Web presentation. Read/write.
Application | Returns an Application object that represents the creator of the specified object.
Background | Returns the TableBackground object associated with the specified table. Read-only.
Columns | Returns a Columns collection that represents all the columns in a table. Read-only.
FirstCol | Determines whether to display special formatting for the first column of the specified table. Read/write.
FirstRow | Determinew whether to display special formatting for the first row of the specified table. Read/write.
HorizBanding | Determines whether to display banded rows, in which even rows are formatted differently from odd rows. Read/write.
LastCol | Determines whether to display special formatting for the last column of the specified table. Read/write.
LastRow | Determines whether to display special formatting for the last row of the specified table. Read/write.
Parent | Returns the parent object for the specified object.
Rows | Returns a Rows collection that represents all the rows in a table. Read-only.
Style | Returns a TableStyle object that contains information about the specified table's current table style. Read-only.
TableDirection | Returns or sets the direction in which the table cells are ordered. Read/write.
Title | Returns or sets the title of the Table object. Read/write.
VertBanding | Determines whether to display banded columns, in which even columns are formatted differently from odd columns. Read/write.


DisplayUnitLabel.Name Property (PowerPoint)

 Copy code hover
[image]

DisplayUnitLabel.Name Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the name of the object. Read-only String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Name

expression A variable that represents a DisplayUnitLabel object.

See also

Concepts

DisplayUnitLabel Object

Other resources

DisplayUnitLabel Object Members


FillFormat.Transparency Property (PowerPoint)

 Copy code hover
[image]

FillFormat.Transparency Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the degree of transparency of the specified fill, shadow, or line as a value between 0.0 (opaque) and 1.0 (clear). Read/write.

Syntax

expression .Transparency

expression A variable that represents a FillFormat object.

Return Value

Single

Remarks

The value of this property affects the appearance of solid-colored fills and lines only; it has no effect on the appearance of patterned lines or patterned, gradient, picture, or textured fills.

Example

This example sets the shadow for shape three on myDocument to semitransparent red. If the shape doesn't already have a shadow, this example adds one to it.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(3).Shadow

    .Visible = True

    .ForeColor.RGB = RGB(255, 0, 0)

    .Transparency = 0.5

End With

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


Comments Properties (PowerPoint)

 Copy code hover
[image]

Comments Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


Application Properties (PowerPoint)

 Copy code hover
[image]

Application Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Active | Returns whether the specified pane or window is active. Read-only.
ActiveEncryptionSession | Represents the encryption session associated with the active presentation. Read-only.
ActivePresentation | Returns a Presentation object that represents the presentation open in the active window. Read-only.
ActivePrinter | Returns the name of the active printer. Read-only.
ActiveProtectedViewWindow | Returns a ProtectedViewWindow object that represents the active Protected View window (the window on top). Read-only.
ActiveWindow | Returns a DocumentWindow object that represents the active document window. Read-only.
AddIns | Returns the program-specific AddIns collection that represents all the add-ins listed in the Add-Ins dialog box (click the Office button, click PowerPoint Options, click Add-Ins, click PowerPoint Add-Ins on the Manage list). Read-only.
Assistance | Gets a reference to the Microsoft Office IAssistance object, which provides a means for developers to create a customized help experience for users within Microsoft Office. Read-only.
AutoCorrect | Returns an AutoCorrect object that represents the AutoCorrect functionality in Microsoft PowerPoint.
AutomationSecurity | Represents the security mode that Microsoft PowerPoint uses when it opens files programmatically. Read/write.
Build | Returns the build number for the current instance of Microsoft PowerPoint. Read-only.
Caption | Returns the text that appears in the title bar of the application window. Read/write.
ChartDataPointTrack | Returns or sets a Boolean that specifies whether charts use cell-reference data-point tracking. Read-write.
COMAddIns | Returns a reference to the Component Object Model (COM) add-ins currently loaded in Microsoft PowerPoint. These add-ins are listed on the Add-Ins tab in the PowerPoint Options dialog box. Read-only.
CommandBars | Returns a CommandBars collection that represents all the command bars in Microsoft PowerPoint. Read-only.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
DisplayAlerts | Sets or returns whether Microsoft PowerPoint displays alerts while running a macro. Read/write.
DisplayDocumentInformationPanel | Returns or sets whether the Document Properties panel is displayed in the Microsoft PowerPoint user interface. Read/write.
DisplayGridLines | Determines whether to display gridlines in Microsoft PowerPoint. Read/write.
DisplayGuides | Gets or sets whether drawing guides are displayed in the application.
FeatureInstall | Returns or sets how Microsoft PowerPoint handles calls to methods and properties that require features not yet installed. Read/write.
FileConverters | Returns information about installed file converters. Returns null if there are no converters installed. Read-only Variant.
FileDialog | Returns a FileDialog object that represents a single instance of a file dialog box. Read-only.
FileValidation | Returns or sets a value that indicates how PowerPoint will validate files before opening them. Read/write
Height | Returns or sets the height of the specified object, in points. Read/write.
IsSandboxed | Returns True if the specified presentation is open in a Protected View window. Read-only.
LanguageSettings | Returns a LanguageSettings object that contains information about the language settings in Microsoft PowerPoint. Read-only.
Left | Returns or sets a Single that represents the distance in points from the left edge of the document, application, and slide show windows to the left edge of the application window's client area. Setting this property to a very large positive or negative value may position the window completely off the desktop. Read/write.
Name | Returns the string "Microsoft PowerPoint." Read-only.
NewPresentation | Returns a NewFile object that represents a presentation listed on the New Presentation task pane. Read-only.
OperatingSystem | Returns the name of the operating system. Read-only.
Options | Returns an Options object that represents application options in Microsoft PowerPoint.
Path | Returns a String that represents the path to the specified Application object. Read-only.
Presentations | Returns a Presentations collection that represents all open presentations. Read-only.
ProductCode | Returns the Microsoft PowerPoint globally unique identifier (GUID). Read-only.
ProtectedViewWindows | Returns a ProtectedViewWindows collection that represents all the Protected View windows that are open in the application. Read-only
ShowStartupDialog | Determines whether to display the New Presentation task pane when Microsoft PowerPoint is started. Read/write.
ShowWindowsInTaskbar | Determines whether there is a separate Windows taskbar button for each open presentation. Read/write.
SlideShowWindows | Returns a SlideShowWindows collection that represents all open slide show windows. Read-only.
SmartArtColors | Returns the SmartArt colors of the current Application object. Read-only.
SmartArtLayouts | Returns the SmartArt layout of the current Application object. Read-only.
SmartArtQuickStyles | Returns the quick styles of the SmartArt diagram in the current Application object. Read-only.
Top | Returns or sets a Single that represents the distance in points from the top edge of the document, application, and slide show window to the top edge of the application window's client area. Read/write.
VBE | Returns a VBE object that represents the Visual Basic Editor. Read-only.
Version | Returns the Microsoft PowerPoint version number. Read-only.
Visible | Returns or sets the visibility of the specified object or the formatting applied to the specified object. Read/write.
Width | Returns or sets the width of the specified object, in points. Read/write.
Windows | Returns a DocumentWindows collection that represents all open document windows. Read-only.
WindowState | Returns or sets the state of the specified window. Read/write.


Comment.Text Property (PowerPoint)

 Copy code hover
[image]

Comment.Text Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a String that represents the text in a comment. Read-only.

Syntax

expression .Text

expression A variable that represents a Comment object.

Return Value

String

See also

Concepts

Comment Object

Other resources

Comment Object Members


LegendKey Object (PowerPoint)

 Copy code hover
[image]

LegendKey Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a legend key in a chart legend.

Version Information

Version Added: PowerPoint 2007

Remarks

Each legend key is a graphic that visually links a legend entry with its associated series or trendline in the chart. The legend key is linked to its associated series or trendline in such a way that changing the formatting of one simultaneously changes the formatting of the other.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

Use the LegendKey property to return the LegendKey object. The following example changes the marker background color for the legend entry at the top of the legend for the first chart in the active document. This simultaneously changes the format of every point in the series associated with this legend entry. The associated series must support data markers.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.Legend.LegendEntries(1).LegendKey _

            .MarkerBackgroundColorIndex = 5

    End If

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

LegendKey Object Members


Axes.Count Property (PowerPoint)

 Copy code hover
[image]

Axes.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the collection. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Count

expression A variable that represents an Axes object.

See also

Concepts

Axes Object

Other resources

Axes Object Members


DisplayUnitLabel.Shadow Property (PowerPoint)

 Copy code hover
[image]

DisplayUnitLabel.Shadow Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a value that indicates whether the object has a shadow. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Shadow

expression A variable that represents a DisplayUnitLabel object.

See also

Concepts

DisplayUnitLabel Object

Other resources

DisplayUnitLabel Object Members


Shape.AutoShapeType Property (PowerPoint)

 Copy code hover
[image]

Shape.AutoShapeType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the shape type for the specified Shape object, which must represent an AutoShape other than a line, freeform drawing, or connector. Read/write.

Syntax

expression .AutoShapeType

expression A variable that represents a Shape object.

Return Value

MsoAutoShapeType

Remarks

Use the Type property of the ConnectorFormat object to set or return the connector type.

Example

This example replaces all 16-point stars with 32-point stars in myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)
For Each s In myDocument.Shapes
    If s.AutoShapeType = msoShape16pointStar Then
        s.AutoShapeType = msoShape32pointStar
    End If
Next
Note Note

When you change the type of a shape, the shape retains its size, color, and other attributes.

See also

Concepts

Shape Object

Other resources

Shape Object Members


LegendEntry.Index Property (PowerPoint)

 Copy code hover
[image]

LegendEntry.Index Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the index number of the object within the collection of similar objects. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Index

expression A variable that represents a LegendEntry object.

See also

Concepts

LegendEntry Object

Other resources

LegendEntry Object Members


ChartCharacters.Count Property (PowerPoint)

 Copy code hover
[image]

ChartCharacters.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the collection. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Count

expression A variable that represents a ChartCharacters object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example makes the last character a superscript character in the title of the first chart in the active document.

VBA Copy code Copy code
Sub MakeSuperscript()

    Dim n As Integer

    With ActiveDocument.InlineShapes(1)

        If .HasChart Then

            n = .Chart.Title.Characters.Count

            .Chart.Title.Characters(n, 1).Font.Superscript = True

        End If

    End With

End Sub

See also

Concepts

ChartCharacters Object

Other resources

ChartCharacters Object Members


SlideShowWindow.Height Property (PowerPoint)

 Copy code hover
[image]

SlideShowWindow.Height Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the height of the specified object, in points. Read/write.

Syntax

expression .Height

expression A variable that represents a SlideShowWindow object.

Return Value

Single

Remarks

The Height property of a Shape object returns or sets the height of the forward-facing surface of the specified shape. This measurement doesn't include shadows or 3-D effects.

Example

This example sets the height of document window two to half the height of the application window.

VBA Copy code Copy code
Windows(2).Height = Application.Height / 2

This example sets the height for row two in the specified table to 100 points (72 points per inch).

VBA Copy code Copy code
ActivePresentation.Slides(2).Shapes(5).Table.Rows(2).Height = 100

See also

Concepts

SlideShowWindow Object

Other resources

SlideShowWindow Object Members


Adjustments Object (PowerPoint)

 Copy code hover
[image]

Adjustments Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Contains a collection of adjustment values for the specified AutoShape, WordArt object, or connector.

Remarks

Each adjustment value represents one way an adjustment handle can be adjusted. Because some adjustment handles can be adjusted in two ways — for instance, some handles can be adjusted both horizontally and vertically — a shape can have more adjustment values than it has adjustment handles. A shape can have up to eight adjustments.

Use the Adjustments property to return an Adjustments object. Use Adjustments(index), where index is the adjustment value's index number, to return a single adjustment value.

Different shapes have different numbers of adjustment values, different kinds of adjustments change the geometry of a shape in different ways, and different kinds of adjustments have different ranges of valid values. For example, the following illustration shows what each of the four adjustment values for a right-arrow callout contributes to the definition of the callout's geometry.

Note Note

Because each adjustable shape has a different set of adjustments, the recommended way to verify the adjustment behavior for a specific shape is to manually create an instance of the shape, make adjustments with the macro recorder turned on, and then examine the recorded code.

The following table summarizes the ranges of valid adjustment values for different types of adjustments. In most cases, if you specify a value that's beyond the range of valid values, the closest valid value will be assigned to the adjustment.

Type of adjustment | Valid values
Linear (horizontal or vertical) | Generally the value 0.0 represents the left or top edge of the shape and the value 1.0 represents the right or bottom edge of the shape. Valid values correspond to valid adjustments you can make to the shape manually. For example, if you can only pull an adjustment handle half way across the shape manually, the maximum value for the corresponding adjustment will be 0.5. For shapes such as connectors and callouts, where the values 0.0 and 1.0 represent the limits of the rectangle defined by the starting and ending points of the connector or callout line, negative numbers and numbers greater than 1.0 are valid values.
Radial | An adjustment value of 1.0 corresponds to the width of the shape. The maximum value is 0.5, or half way across the shape.
Angle | Values are expressed in degrees. If you specify a value outside the range - 180 to 180, it will be normalized to be within that range.

Example

The following example adds a right-arrow callout to myDocument and sets adjustment values for the callout. Note that although the shape has only three adjustment handles, it has four adjustments. Adjustments three and four both correspond to the handle between the head and neck of the arrow.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

Set rac = myDocument.Shapes _

    .AddShape(msoShapeRightArrowCallout, 10, 10, 250, 190)

With rac.Adjustments

    .Item(1) = 0.5    'adjusts width of text box

    .Item(2) = 0.15   'adjusts width of arrow head

    .Item(3) = 0.8    'adjusts length of arrow head

    .Item(4) = 0.4    'adjusts width of arrow neck

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

Adjustments Object Members


PictureFormat.TransparencyColor Property (PowerPoint)

 Copy code hover
[image]

PictureFormat.TransparencyColor Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets the transparent color for the specified picture as a red-green-blue (RGB) value. Read/write.

Syntax

expression .TransparencyColor

expression A variable that represents a PictureFormat object.

Return Value

Long

Remarks

For this property to take effect, the TransparentBackground property must be set to True.

This property applies to bitmaps only.

If you want to be able to see through the transparent parts of the picture all the way to the objects behind the picture, you must set the Visible property of the picture's FillFormat object to False. If your picture has a transparent color and the Visible property of the picture's FillFormat object is set to True, the picture's fill will be visible through the transparent color, but objects behind the picture will be obscured.

Example

This example sets the color that has the RGB value returned by the function RGB(0, 0, 255) as the transparent color for shape one on myDocument. For the example to work, shape one must be a bitmap.

VBA Copy code Copy code
blueScreen = RGB(0, 0, 255)

Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(1)

    With .PictureFormat

        .TransparentBackground = True

        .TransparencyColor = blueScreen

    End With

    .Fill.Visible = False

End With

See also

Concepts

PictureFormat Object

Other resources

PictureFormat Object Members


Sequence.FindFirstAnimationFor Method (PowerPoint)

 Copy code hover
[image]

Sequence.FindFirstAnimationFor Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Effect object that represents the first animation for a given shape.

Syntax

expression .FindFirstAnimationFor(Shape)

expression A variable that represents a Sequence object.

Parameters

Name | Required/Optional | Data Type | Description
Shape | Required | Shape | The shape for which to find the first animation.

Return Value

Effect

Example

The following example finds and deletes the first animation for a the first shape on the first slide. This example assumes that at least one animation effect exists for the specified shape.

VBA Copy code Copy code
Sub FindFirstAnimation()

    Dim sldFirst As Slide

    Dim shpFirst As Shape

    Dim effFirst As Effect

    Set sldFirst = ActivePresentation.Slides(1)

    Set shpFirst = sldFirst.Shapes(1)

    Set effFirst = sldFirst.TimeLine.MainSequence _

        .FindFirstAnimationFor(Shape:=shpFirst)

    effFirst.Delete

End Sub

See also

Concepts

Sequence Object

Other resources

Sequence Object Members


Application.WindowState Property (PowerPoint)

 Copy code hover
[image]

Application.WindowState Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the state of the specified window. Read/write.

Syntax

expression .WindowState

expression A variable that represents an Application object.

Return Value

PpWindowState

Remarks

The value of the WindowState property can be one of these PpWindowState constants.

ppWindowMaximized

ppWindowMinimized

ppWindowNormal

When the state of the window is ppWindowNormal, the window is neither maximized nor minimized.

Example

This example maximizes the active window.

VBA Copy code Copy code
Application.ActiveWindow.WindowState = ppWindowMaximized

See also

Concepts

Application Object

Other resources

Application Object Members


SectionProperties.FirstSlide Method (PowerPoint)

 Copy code hover
[image]

SectionProperties.FirstSlide Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the index of the first slide in the specified section, or returns -1 if the section is empty.

Syntax

expression .FirstSlide(sectionIndex)

expression A variable that represents a SectionProperties object.

Parameters

Name | Required/Optional | Data Type | Description
sectionIndex | Required | Integer | The index of the section.

Return Value

Integer

See also

Concepts

SectionProperties Object

Other resources

SectionProperties Object Members


Hyperlinks Members (PowerPoint)

 Copy code hover
[image]

Hyperlinks Members (PowerPoint)
Send feedback

Published: July 16, 2012

A collection of all the Hyperlink objects on a slide or master.

Methods

Name | Description
Item | Returns a single Hyperlink object from the specified Hyperlinks collection.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


Legend Members (PowerPoint)

 Copy code hover
[image]

Legend Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents the legend in a chart. Each chart can have only one legend.

Methods

Name | Description
Clear | Clears the entire object.
Delete | Deletes the object.
LegendEntries | Returns a collection of legend entries for the legend.
Select | Selects the object.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Height | Returns or sets the height, in points, of the object. Read/write Double.
IncludeInLayout | True if a legend will occupy the chart layout space when a chart layout is being determined. The default is True. Read/write Boolean.
Left | Returns the distance, in points, from the left edge of the object to the left edge of the chart area. Read-only Double.
Name | Returns the name of the object. Read-only String.
Parent | Returns the parent for the specified object. Read-only Object.
Position | Returns or sets the position of the legend on the chart. Read/write XlLegendPosition.
Shadow | Returns or sets a value that indicates whether the object has a shadow. Read/write Boolean.
Top | Returns or sets the distance, in points, from the top edge of the object to the top of the first row (on a worksheet) or the top of the chart area (on a chart). Read/write Double.
Width | Returns or sets the width, in points, of the object. Read/write Double.


LegendKey.MarkerStyle Property (PowerPoint)

 Copy code hover
[image]

LegendKey.MarkerStyle Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the marker style for a point or series in a line chart, scatter chart, or radar chart. Read/write XlMarkerStyle.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .MarkerStyle

expression A variable that represents a LegendKey object.

Remarks

MarkerStyle can be one of the following XlMarkerStyle constants:

  • xlMarkerStyleAutomatic—Automatic markers.

  • xlMarkerStyleCircle—Circular markers.

  • xlMarkerStyleDash—Long bar markers.

  • xlMarkerStyleDiamond—Diamond-shaped markers.

  • xlMarkerStyleDot—Short bar markers.

  • xlMarkerStyleNone—No markers.

  • xlMarkerStylePicture—Picture markers.

  • xlMarkerStylePlus—Square markers with a plus sign.

  • xlMarkerStyleSquare—Square markers.

  • xlMarkerStyleStar—Square markers with an asterisk.

  • xlMarkerStyleTriangle—Triangular markers.

  • xlMarkerStyleX—Square markers with an X.

See also

Concepts

LegendKey Object

Other resources

LegendKey Object Members


RulerLevel Members (PowerPoint)

 Copy code hover
[image]

RulerLevel Members (PowerPoint)
Send feedback

Published: July 16, 2012

Contains first-line indent and hanging indent information for an outline level.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
FirstMargin | Returns or sets the first-line indent for the specified outline level, in points. Read/write.
LeftMargin | Returns or sets the left indent for the specified outline level, in points. Read/write.
Parent | Returns the parent object for the specified object.


FullSeriesCollection Methods (PowerPoint)

 Copy code hover
[image]

FullSeriesCollection Methods (PowerPoint)
Send feedback

This object has the following methods:

Methods

Name | Description
Item | Returns an individual Series object from the collection.


Table.Background Property (PowerPoint)

 Copy code hover
[image]

Table.Background Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the TableBackground object associated with the specified table. Read-only.

Syntax

expression .Background

expression An expression that returns a Table object.

Return Value

TableBackground

See also

Concepts

Table Object

Other resources

Table Object Members


SlideShowWindow.Parent Property (PowerPoint)

 Copy code hover
[image]

SlideShowWindow.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a SlideShowWindow object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

SlideShowWindow Object

Other resources

SlideShowWindow Object Members


HeadersFooters.Parent Property (PowerPoint)

 Copy code hover
[image]

HeadersFooters.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a HeadersFooters object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

HeadersFooters Object

Other resources

HeadersFooters Object Members


ShapeRange.SetShapesDefaultProperties Method (PowerPoint)

 Copy code hover
[image]

ShapeRange.SetShapesDefaultProperties Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Applies the formatting for the specified shape to the default shape. Shapes created after this method has been used will have this formatting applied to them by default.

Syntax

expression .SetShapesDefaultProperties

expression A variable that represents a ShapeRange object.

Example

This example adds a rectangle to myDocument, formats the rectangle's fill, applies the rectangle's formatting to the default shape, and then adds another smaller rectangle to the document. The second rectangle has the same fill as the first one.

VBA Copy code Copy code
Set mydocument = ActivePresentation.Slides(1)

With mydocument.Shapes

    With .AddShape(msoShapeRectangle, 5, 5, 80, 60)

        With .Fill

            .ForeColor.RGB = RGB(0, 0, 255)

            .BackColor.RGB = RGB(0, 204, 255)

            .Patterned msoPatternHorizontalBrick

        End With

    ' Sets formatting for default shapes

        .SetShapesDefaultProperties

    End With

' New shape has default formatting

    .AddShape msoShapeRectangle, 90, 90, 40, 30

End With

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


CalloutFormat.CustomDrop Method (PowerPoint)

 Copy code hover
[image]

CalloutFormat.CustomDrop Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets the vertical distance (in points) from the edge of the text bounding box to the place where the callout line attaches to the text box. This distance is measured from the top of the text box unless the AutoAttach property is set to True and the text box is to the left of the origin of the callout line (the place that the callout points to). In this case the drop distance is measured from the bottom of the text box.

Syntax

expression .CustomDrop(Drop)

expression A variable that represents a CalloutFormat object.

Parameters

Name | Required/Optional | Data Type | Description
Drop | Required | Single | The drop distance, in points.

Return Value

Nothing

Example

This example sets the custom drop distance to 14 points, and specifies that the drop distance always be measured from the top. For the example to work, shape three must be a callout.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(3).Callout

    .CustomDrop 14

    .AutoAttach = False

End With

See also

Concepts

CalloutFormat Object

Other resources

CalloutFormat Object Members


ColorEffect.From Property (PowerPoint)

 Copy code hover
[image]

ColorEffect.From Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns a ColorFormat object that represents the starting RGB color value of an animation behavior.

Syntax

expression .From

expression A variable that represents a ColorEffect object.

Remarks

Use this property in conjunction with the To property to transition from one color to another.

Do not confuse this property with the FromX or FromY properties of the ScaleEffect and MotionEffect objects, which are only used for scaling or motion effects.

Example

The following example adds a color effect and immediately changes its color.

VBA Copy code Copy code
Sub AddAndChangeColorEffect()
    Dim effBlinds As Effect
    Dim tlnTiming As TimeLine
    Dim shpRectangle As Shape
    Dim animColorEffect As AnimationBehavior
    Dim clrEffect As ColorEffect

    'Adds rectangle and sets effect and animation
    Set shpRectangle = ActivePresentation.Slides(1).Shapes _
        .AddShape(Type:=msoShapeRectangle, Left:=100, _
        Top:=100, Width:=50, Height:=50)
    Set effBlinds = t.MainSequence.AddEffect(Shape:=shpRectangle, _
        effectId:=msoAnimEffectBlinds)
    Set animColorEffect = tlnTimming.MainSequence(1).Behaviors _
        .Add(Type:=msoAnimTypeColor)
    Set clrEffect = animColorEffect.ColorEffect

    'Sets the animation effect starting and ending colors
    clrEffect.From.RGB = RGB(Red:=255, Green:=255, Blue:=0)
    clrEffect.To.RGB = RGB(Red:=0, Green:=255, Blue:=255)
End Sub

See also

Concepts

ColorEffect Object

Other resources

ColorEffect Object Members


Presentation.LayoutDirection Property (PowerPoint)

 Copy code hover
[image]

Presentation.LayoutDirection Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the layout direction for the user interface. Read/write.

Syntax

expression .LayoutDirection

expression A variable that represents a Presentation object.

Return Value

PpDirection

Remarks

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.

ppDirectionLeftToRight

ppDirectionMixed

ppDirectionRightToLeft

Example

This example sets the layout direction to right-to-left.

VBA Copy code Copy code
Application.ActivePresentation.LayoutDirection = ppDirectionRightToLeft

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


Interior Members (PowerPoint)

 Copy code hover
[image]

Interior Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents the interior of an object.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Color | Returns or sets the primary color of the object. Read/write Variant.
ColorIndex | Returns or sets the color of the interior. Read/write Variant.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
InvertIfNegative | True if Microsoft Word inverts the pattern in the object when it corresponds to a negative number. Read/write Variant.
Parent | Returns the parent for the specified object. Read-only Object.
Pattern | Returns or sets a Variant value, containing an XlPattern constant, that represents the interior pattern.
PatternColor | Returns or sets the color of the interior pattern as an RGB value. Read/write Variant.
PatternColorIndex | Returns or sets the color of the interior pattern as an index into the current color palette, or as one of the following XlColorIndex constants: xlColorIndexAutomatic or xlColorIndexNone. Read/write Long.


ChartFont Object (PowerPoint)

 Copy code hover
[image]

ChartFont Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Contains the font attributes (font name, font size, color, and so on) for an object chart.

Version Information

Version Added: PowerPoint 2007

Remarks

If you do not want to format all the text in an AxisTitle, ChartTitle, DataLabel, or DisplayUnitLabel object the same way, use the Characters property of that object to first return a subset of the text as a ChartCharacters object. Then use the Font property of the ChartCharacters object to return a ChartFont object you can use to format the subset of text, as needed.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example formats the title of the first chart as bold. Use the Font property to return the ChartFont object.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1).Chart

    .AxisTitle.Font.Bold = True

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

ChartFont Object Members


Series.PlotOrder Property (PowerPoint)

 Copy code hover
[image]

Series.PlotOrder Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the plot order for the selected series within the chart group. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .PlotOrder

expression A variable that represents a Chart object.

Remarks

You can set plot order only within a chart group (you cannot set the plot order for the entire chart if you have more than one chart type). A chart group is a collection of series with the same chart type.

Changing the plot order of one series will cause the plot orders of the other series in the chart group to be adjusted, as necessary.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example makes series two for the first chart in the active document appear third in the plot order. You should run the example on a 2-D column chart that contains three or more series.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.ChartGroups(1).SeriesCollection(2).PlotOrder = 3

    End If

End With

See also

Concepts

Series Object

Other resources

Series Object Members


ChartFormat.Line Property (PowerPoint)

 Copy code hover
[image]

ChartFormat.Line Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the line formatting properties for the specified chart element. Read-only LineFormat.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Line

expression A variable that represents a ChartFormat object.

Remarks

For a line, the LineFormat object represents the line itself; for a chart with a border, the LineFormat object represents the border.

See also

Concepts

ChartFormat Object

Other resources

ChartFormat Object Members


AnimationBehaviors.Parent Property (PowerPoint)

 Copy code hover
[image]

AnimationBehaviors.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents an AnimationBehaviors object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

AnimationBehaviors Object

Other resources

AnimationBehaviors Object Members


SlideRange.HeadersFooters Property (PowerPoint)

 Copy code hover
[image]

SlideRange.HeadersFooters Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a HeadersFooters collection that represents the header, footer, date and time, and slide number associated with the slide, slide master, or range of slides. Read-only.

Syntax

expression .HeadersFooters

expression A variable that represents a SlideRange object.

Return Value

HeadersFooters

Example

This example sets the footer text and the date and time format for the notes master in the active presentation and sets the date and time to be updated automatically.

VBA Copy code Copy code
With ActivePresentation.NotesMaster.HeadersFooters

    .Footer.Text = "Regional Sales"

    With .DateAndTime

        .UseFormat = True

        .Format = ppDateTimeHmmss

    End With

End With

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


SlideShowSettings.SlideShowName Property (PowerPoint)

 Copy code hover
[image]

SlideShowSettings.SlideShowName Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the name of the custom slide show to run in response to a mouse action on the shape during a slide show. Read/write.

Syntax

expression .SlideShowName

expression A variable that represents a SlideShowSettings object.

Return Value

String

See also

Concepts

SlideShowSettings Object

Other resources

SlideShowSettings Object Members


ExtraColors.Item Method (PowerPoint)

 Copy code hover
[image]

ExtraColors.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single color from the specified ExtraColors collection.

Syntax

expression .Item(Index)

expression A variable that represents an ExtraColors object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Long | The index number of the single object in the collection to be returned.

Return Value

MsoRGBType

See also

Concepts

ExtraColors Object

Other resources

ExtraColors Object Members


SoundEffect Object (PowerPoint)

 Copy code hover
[image]

SoundEffect Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the sound effect that accompanies an animation or slide transition in a slide show.

Example

Use the SoundEffect property of the AnimationSettings object to return the SoundEffect object that represents the sound effect that accompanies an animation. The following example specifies that the animation of the title on slide one in the active presentation be accompanied by the sound in the Bass.wav file.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(1).AnimationSettings

    .TextLevelEffect = ppAnimateByAllLevels

    .SoundEffect.ImportFromFile "c:\sndsys\bass.wav"

End With

Use the SoundEffect property of the SlideShowTransition object to return the SoundEffect object that represents the sound effect that accompanies a slide transition.

The following example specifies that the transition to slide one in the active presentation be accompanied by the sound in the Bass.wav file.

VBA Copy code Copy code
ActivePresentation.Slides(1).SlideShowTransition.SoundEffect _

    .ImportFromFile "c:\sndsys\bass.wav"

See also

Concepts

PowerPoint Object Model Reference

Other resources

SoundEffect Object Members


FullSeriesCollection.Count Property (PowerPoint)

 Copy code hover
[image]

FullSeriesCollection.Count Property (PowerPoint)
Send feedback

Returns a Long that represents the number of full series in the collection. Read-only.

Version information

Version Added: PowerPoint 2013

Syntax

expression .Count

expression A variable that represents a FullSeriesCollection object.

Property value

INT32


Placeholders.Parent Property (PowerPoint)

 Copy code hover
[image]

Placeholders.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a Placeholders object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

Placeholders Object

Other resources

Placeholders Object Members


PpSlideShowRangeType Enumeration (PowerPoint)

 Copy code hover
[image]

PpSlideShowRangeType Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Constants that specify the type of the slideshow range, passed to and returned by the RangeType property of the SlideShowSettings object.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppShowAll | 1 | Show all.
ppShowNamedSlideShow | 3 | Show named slideshow.
ppShowSlideRange | 2 | Show slide range.


Guides.Add Method (PowerPoint)

 Copy code hover
[image]

Guides.Add Method (PowerPoint)
Send feedback

Adds a new drawing guide to the presentation, slide master, or custom layout.

Version information

Version Added: PowerPoint 2013

Syntax

expression .Add(Orientation,Position)

expression A variable that represents a Guides object.

Parameters

Name | Required/Optional | Data type | Description
Orientation | Required | PpGuideOrientation | Specifies the orientation of a drawing guide, either horizontal or vertical.
Position | Required | Float | The position of the guide along the specified axis.
Orientation | Required | PPGUIDEORIENTATION |
Position | Required | FLOAT |

Return value

Guide


XlUnderlineStyle Enumeration (PowerPoint)

 Copy code hover
[image]

XlUnderlineStyle Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the type of underline that is applied to a font.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlUnderlineStyleDouble | -4119 | Double thick underline.
xlUnderlineStyleDoubleAccounting | 5 | Two thin underlines placed close together.
xlUnderlineStyleNone | -4142 | No underline.
xlUnderlineStyleSingle | 2 | Single underline.
xlUnderlineStyleSingleAccounting | 4 | Not supported.


Application.PresentationSave Event (PowerPoint)

 Copy code hover
[image]

Application.PresentationSave Event (PowerPoint)
See also Send feedback

Published: July 16, 2012

Occurs before any open presentation is saved.

Syntax

expression .PresentationSave(Pres)

expression A variable that represents an Application object.

Parameters

Name | Required/Optional | Data Type | Description
Pres | Required | Presentation | The presentation to be saved.

Remarks

For information about using events with the Application object, see How to: Use Events with the Application Object.

Example

This example saves the current presentation as an HTML version 4.0 file with the name "mallard.htm." It then displays a message indicating that the current named presentation is being saved in both PowerPoint and HTML formats.

VBA Copy code Copy code
Private Sub App_PresentationSave(ByVal Pres As Presentation)

    With Pres.PublishObjects(1)

        PresName = .SlideShowName

        .SourceType = ppPublishAll

        .FileName = "C:\HTMLPres\mallard.htm"

        .HTMLVersion = ppHTMLVersion4

        MsgBox ("Saving presentation " & "'" _

            & PresName & "'" & " in PowerPoint" _

            & Chr(10) & Chr(13) _

            & " format and HTML version 4.0 format")

        .Publish

    End With

End Sub

See also

Concepts

Application Object

Other resources

Application Object Members


ThreeDFormat.BevelBottomDepth Property (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.BevelBottomDepth Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the bottom bevel height for the specified ThreeDFormat object, in points. Read/write.

Syntax

expression .BevelBottomDepth

expression A variable that represents a ThreeDFormat object.

Return Value

Single

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


SlideShowWindow.SlideNavigation Property (PowerPoint)

 Copy code hover
[image]

SlideShowWindow.SlideNavigation Property (PowerPoint)
Send feedback

Returns a SlideNavigation object that represents the slide navigation screen in slide show view. Read-only

Version information

Version Added: PowerPoint 2013

Syntax

expression .SlideNavigation

expression A variable that represents a SlideShowWindow object.

Example

The following code sample starts a slide show from the active presentation and then makes the navigation screen visible.

Copy code Copy code
Sub ShowSlideNavigation()

    ' Start the slide show.
    ActivePresentation.SlideShowSettings.Run

    ' Show the slide navigation screen.
    ActivePresentation.SlideShowWindow.SlideNavigation.Visible = True

End Sub

Property value

SLIDENAVIGATION


DataLabels.Item Method (PowerPoint)

 Copy code hover
[image]

DataLabels.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single object from a collection.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Item(Index)

expression A variable that represents a DataLabels object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Variant | The index number for the object.

Return Value

A DataLabel object contained by the collection.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the number format for the fifth data label in the first series for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).DataLabels.Item(5). _

            NumberFormat = "0.000"

    End If

End With

See also

Concepts

DataLabels Object

Other resources

DataLabels Object Members


TextRange.Font Property (PowerPoint)

 Copy code hover
[image]

TextRange.Font Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a Font object that represents character formatting. Read-only.

Syntax

expression .Font

expression A variable that represents a TextRange object.

Return Value

Font

Example

This example sets the formatting for the text in shape one on slide one in the active presentation.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(1)

    With .TextFrame.TextRange.Font

        .Size = 48

        .Name = "Palatino"

        .Bold = True

        .Color.RGB = RGB(255, 127, 255)

    End With

End With

This example sets the color and font name for bullets in shape two on slide one.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(2)

    With .TextFrame.TextRange.ParagraphFormat.Bullet

        .Visible = True

        With .Font

            .Name = "Palatino"

            .Color.RGB = RGB(0, 0, 255)

        End With

    End With

End With

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


Row.Delete Method (PowerPoint)

 Copy code hover
[image]

Row.Delete Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Deletes the specified Row object.

Syntax

expression .Delete

expression A variable that represents a Row object.

Remarks

Attempting to delete the only existing row in a table will result in a run-time error.

See also

Concepts

Row Object

Other resources

Row Object Members


View.PrintOut Method (PowerPoint)

 Copy code hover
[image]

View.PrintOut Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Prints the specified presentation.

Syntax

expression .PrintOut(From, To, PrintToFile, Copies, Collate)

expression A variable that represents a View object.

Parameters

Name | Required/Optional | Data Type | Description
From | Optional | Long | The number of the first page to be printed. If this argument is omitted, printing starts at the beginning of the presentation. Specifying the To and From arguments sets the contents of the PrintRanges object and sets the value of the RangeType property for the presentation.
To | Optional | Long | The number of the last page to be printed. If this argument is omitted, printing continues to the end of the presentation. Specifying the To and From arguments sets the contents of the PrintRanges object and sets the value of the RangeType property for the presentation.
PrintToFile | Optional | String | The name of the file to print to. If you specify this argument, the file is printed to a file rather than sent to a printer. If this argument is omitted, the file is sent to a printer.
Copies | Optional | Long | The number of copies to be printed. If this argument is omitted, only one copy is printed. Specifying this argument sets the value of the NumberOfCopies property.
Collate | Optional | MsoTriState | If this argument is omitted, multiple copies are collated. Specifying this argument sets the value of the Collate property.

Remarks

The Collate parameter value can be one of these MsoTriState constants.

Constant | Description
msoFalse | Prints all copies of one page before printing the first copy of the next page.
msoTrue | Prints a complete copy of the presentation before the first page of the next copy is printed.

See also

Concepts

View Object

Other resources

View Object Members


TabStops.Application Property (PowerPoint)

 Copy code hover
[image]

TabStops.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a TabStops object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

TabStops Object

Other resources

TabStops Object Members


DisplayUnitLabel.VerticalAlignment Property (PowerPoint)

 Copy code hover
[image]

DisplayUnitLabel.VerticalAlignment Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets the vertical alignment of the specified object. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .VerticalAlignment

expression A variable that represents a DisplayUnitLabel object.

Remarks

You can set the value of this property to one of the following XlConstants constants:

  • xlBottom

  • xlCenter

  • xlDistributed

  • xlJustify

  • xlTop

See also

Concepts

DisplayUnitLabel Object

Other resources

DisplayUnitLabel Object Members


Slide.FollowMasterBackground Property (PowerPoint)

 Copy code hover
[image]

Slide.FollowMasterBackground Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the slide follows the slide master background. Read/write.

Syntax

expression .FollowMasterBackground

expression A variable that represents a Slide object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified slide or range of slides has a custom background.
msoTrue | The specified slide or range of slides follows the slide master background.

When you create a new slide, the default value for this property is True. If you copy a slide from another presentation, it retains the setting it had in the original presentation. That is, if the slide followed the slide master background in the original presentation, it will automatically follow the slide master background in the new presentation; or, if the slide had a custom background, it will retain that custom background.

Note that the look of the slide's background is determined by the color scheme and background objects and by the background itself. If setting the FollowMasterBackground property alone doesn't give you the results you want, try setting the ColorScheme and DisplayMasterShapes properties as well.

Example

This example copies slide one from presentation two, pastes the slide at the end of presentation one, and matches the slide's background, color scheme, and background objects to the rest of presentation one.

VBA Copy code Copy code
Presentations(2).Slides(1).Copy

With Presentations(1).Slides.Paste

    .FollowMasterBackground = msoTrue

    .ColorScheme = Presentations(1).SlideMaster.ColorScheme

    .DisplayMasterShapes = True

End With

See also

Concepts

Slide Object

Other resources

Slide Object Members


Application.FeatureInstall Property (PowerPoint)

 Copy code hover
[image]

Application.FeatureInstall Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets how Microsoft PowerPoint handles calls to methods and properties that require features not yet installed. Read/write.

Syntax

expression .FeatureInstall

expression A variable that represents an Application object.

Return Value

MsoFeatureInstall

Remarks

You can use the msoFeatureInstallOnDemandWithUI constant to prevent users from believing that the application is not responding while a feature is being installed. Use the msoFeatureInstallNone constant with error trapping routines to exclude end-user feature installation.

Note Note

If you refer to an uninstalled presentation design template in a string, a run-time error is generated. The template is not installed automatically regardless of your FeatureInstall property setting. To use the ApplyTemplate method for a template that is not currently installed, you first must install the additional design templates. To do so, install the Additional Design Templates for PowerPoint by running the Microsoft Office installation program (available by clicking the Add/Remove Programs icon in Windows Control Panel).

The value of the FeatureInstall property can be one of these MsoFeatureInstall constants.

Constant | Description
msoFeatureInstallNone | The default. A trappable run-time automation error is generated when uninstalled features are called.
msoFeatureInstallOnDemand | A dialog box is displayed prompting the user to install new features.
msoFeatureInstallOnDemandWithUI | A progress meter is displayed during installation. The user is not prompted to install new features.

Example

This example checks the value of the FeatureInstall property. If the property is set to msoFeatureInstallNone, the code displays a message box that asks the user whether they want to change the property setting. If the user responds "Yes", the property is set to msoFeatureInstallOnDemand.

VBA Copy code Copy code
With Application

    If .FeatureInstall = msoFeatureInstallNone Then

        Reply = MsgBox("Uninstalled features for this " _

                & "application " & vbCrLf _

                & "may cause a run-time error when called." & vbCrLf _

                & vbCrLf _

                & "Would you like to change this setting" & vbCrLf _

                & "to automatically install missing features when called?" _

                , 52, "Feature Install Setting")

            If Reply = 6 Then

                .FeatureInstall = msoFeatureInstallOnDemand

            End If

    End If

End With

See also

Concepts

Application Object

Other resources

Application Object Members


DataLabels.Shadow Property (PowerPoint)

 Copy code hover
[image]

DataLabels.Shadow Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a value that indicates whether the object has a shadow. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Shadow

expression A variable that represents a DataLabels object.

See also

Concepts

DataLabels Object

Other resources

DataLabels Object Members


DataLabels Methods (PowerPoint)

 Copy code hover
[image]

DataLabels Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Delete | Deletes the object.
Item | Returns a single object from a collection.
Propagate | Propagates the contents and formatting of the specified data label to all the other data labels in the series.
Select | Selects the object.


ExtraColors.Application Property (PowerPoint)

 Copy code hover
[image]

ExtraColors.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents an ExtraColors object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

ExtraColors Object

Other resources

ExtraColors Object Members


PageSetup.FirstSlideNumber Property (PowerPoint)

 Copy code hover
[image]

PageSetup.FirstSlideNumber Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the slide number for the first slide in the presentation. Read/write.

Syntax

expression .FirstSlideNumber

expression A variable that represents a PageSetup object.

Return Value

Long

Remarks

The slide number is the actual number that will appear in the lower-right corner of the slide when you display slide numbers. This number is determined by the number (order) of the slide within the presentation (the SlideIndex property value) and the starting slide number for the presentation (the FirstSlideNumber property value). The slide number will always be equal to the starting slide number + the slide index number - 1. The SlideNumber property returns the slide number.

Example

This example shows how changing the first slide number in the active presentation affects the slide number of a specific slide.

VBA Copy code Copy code
With Application.ActivePresentation

    .PageSetup.FirstSlideNumber = 1  'starts slide numbering at 1

    MsgBox .Slides(2).SlideNumber    'returns 2

    .PageSetup.FirstSlideNumber = 10  'starts slide numbering at 10

    MsgBox .Slides(2).SlideNumber     'returns 11

End With

See also

Concepts

PageSetup Object

Other resources

PageSetup Object Members


DataLabels.NumberFormatLinked Property (PowerPoint)

 Copy code hover
[image]

DataLabels.NumberFormatLinked Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .NumberFormatLinked

expression A variable that represents a DataLabels object.

See also

Concepts

DataLabels Object

Other resources

DataLabels Object Members


ShadowFormat.OffsetY Property (PowerPoint)

 Copy code hover
[image]

ShadowFormat.OffsetY Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the vertical offset of the shadow from the specified shape, in points. Read/write.

Syntax

expression .OffsetY

expression A variable that represents an ShadowFormat object.

Return Value

Single

Remarks

A positive value offsets the shadow to the right of the shape; a negative value offsets it to the left.

If you want to nudge a shadow horizontally or vertically from its current position without having to specify an absolute position, use the IncrementOffsetX method or the IncrementOffsetY method.

Example

This example sets the horizontal and vertical offsets of the shadow for shape three on myDocument. The shadow is offset 5 points to the right of the shape and 3 points above it. If the shape doesn't already have a shadow, this example adds one to it.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(3).Shadow

    .Visible = True

    .OffsetX = 5

    .OffsetY = -3

End With

See also

Concepts

ShadowFormat Object

Other resources

ShadowFormat Object Members


TextFrame2.TextRange Property (PowerPoint)

 Copy code hover
[image]

TextFrame2.TextRange Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a TextRange object that represents the text in the specified text frame. Read-only.

Syntax

expression .TextRange

expression An expression that returns a TextFrame2 object.

Return Value

TextRange

Example

This example shows how to set the text for shape one on slide one of the active presentation to the word "Hello!"

VBA Copy code Copy code
Public Sub TextRange_Example()

    Dim pptSlide As Slide

    Set pptSlide = ActivePresentation.Slides(1)

    pptSlide.Shapes(1).TextFrame2.TextRange = "Hello!"

End Sub

See also

Concepts

TextFrame2 Object

Other resources

TextFrame2 Object Members


ColorFormat.Type Property (PowerPoint)

 Copy code hover
[image]

ColorFormat.Type Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the type of color. Read-only.

Syntax

expression .Type

expression A variable that represents a ColorFormat object.

Return Value

MsoColorType

Remarks

The value of the Type property can be one of these MsoColorType constants.

msoColorTypeCMS

msoColorTypeCMYK

msoColorTypeInk

msoColorTypeMixed

msoColorTypeRGB

msoColorTypeScheme

See also

Concepts

ColorFormat Object

Other resources

ColorFormat Object Members


Panes.Parent Property (PowerPoint)

 Copy code hover
[image]

Panes.Parent Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a Panes object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

Panes Object

Other resources

Panes Object Members


TextEffectFormat.FontSize Property (PowerPoint)

 Copy code hover
[image]

TextEffectFormat.FontSize Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the font size for the specified WordArt in points. Read/write.

Syntax

expression .FontSize

expression An expression that returns a TextEffectFormat object.

Return Value

Single

See also

Concepts

TextEffectFormat Object

Other resources

TextEffectFormat Object Members


DataLabel.Width Property (PowerPoint)

 Copy code hover
[image]

DataLabel.Width Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the width, in points, of the object. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Width

expression A variable that represents a DataLabel object.

Return Value

Double

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


SetEffect Object (PowerPoint)

 Copy code hover
[image]

SetEffect Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a set effect for an animation behavior. You can use the SetEffect object to set the value of a property.

Remarks

Use the SetEffect property of the AnimationBehavior object to return a SetEffect object. Set effects can be changed using the SetEffect object's Property and To properties.

Example

The following example adds a shape to the first slide of the active presentation and sets a set effect animation behavior.

VBA Copy code Copy code
Sub ChangeSetEffect()

    Dim sldFirst As Slide

    Dim shpHeart As Shape

    Dim effNew As Effect

    Dim bhvEffect As AnimationBehavior

    Set sldFirst = ActivePresentation.Slides(1)

    Set shpHeart = sldFirst.Shapes.AddShape(Type:=msoShapeHeart, _

        Left:=100, Top:=100, Width:=100, Height:=100)

    Set effNew = sldFirst.TimeLine.MainSequence.AddEffect _

        (Shape:=shpHeart, EffectID:=msoAnimEffectChangeFillColor, _

        Trigger:=msoAnimTriggerAfterPrevious)

    Set bhvEffect = effNew.Behaviors.Add(msoAnimTypeSet)

    With bhvEffect.SetEffect

         .Property = msoAnimShapeFillColor

         .To = RGB(Red:=0, Green:=255, Blue:=255)

    End With

End Sub

See also

Concepts

PowerPoint Object Model Reference

Other resources

SetEffect Object Members


TextRange.Parent Property (PowerPoint)

 Copy code hover
[image]

TextRange.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a TextRange object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


Legend.Parent Property (PowerPoint)

 Copy code hover
[image]

Legend.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents a Legend object.

See also

Concepts

Legend Object

Other resources

Legend Object Members


DataTable.Border Property (PowerPoint)

 Copy code hover
[image]

DataTable.Border Property (PowerPoint)
Send feedback

Published: July 16, 2012

Returns the border of the object. Read-only ChartBorder.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Border

expression A variable that represents a DataTable object.


FillFormat.TextureType Property (PowerPoint)

 Copy code hover
[image]

FillFormat.TextureType Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the texture type for the specified fill. Read-only.

Syntax

expression .TextureType

expression A variable that represents a FillFormat object.

Return Value

MsoTextureType

Remarks

Use the PresetTextured or UserTextured method to set the texture type for the fill.

The value of the TextureType property can be one of these MsoTextureType constants.

msoTexturePreset

msoTextureTypeMixed

msoTextureUserDefined

Example

This example changes the fill to canvas for all shapes on myDocument that have a custom textured fill.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

For Each s In myDocument.Shapes

    With s.Fill

        If .TextureType = msoTextureUserDefined Then

            .PresetTextured msoTextureCanvas

        End If

    End With

Next

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


Presentation.DefaultShape Property (PowerPoint)

 Copy code hover
[image]

Presentation.DefaultShape Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Shape object that represents the default shape for the presentation. Read-only.

Syntax

expression .DefaultShape

expression A variable that represents a Presentation object.

Return Value

Shape

Example

This example adds a shape to slide one in the active presentation, sets the default fill color to red for shapes in the presentation, and then adds another shape. This second shape will automatically have the new default fill color applied to it.

VBA Copy code Copy code
With Application.ActivePresentation

    Set sld1Shapes = .Slides(1).Shapes

    sld1Shapes.AddShape msoShape16pointStar, 20, 20, 100, 100

    .DefaultShape.Fill.ForeColor.RGB = RGB(255, 0, 0)

    sld1Shapes.AddShape msoShape16pointStar, 150, 20, 100, 100

End With

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


SlideRange.Master Property (PowerPoint)

 Copy code hover
[image]

SlideRange.Master Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a Master object that represents the slide master. Read-only.

Syntax

expression .Master

expression A variable that represents a SlideRange object.

Return Value

Master

Example

This example sets the background fill for the slide master for slide one in the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(1).Master.Background.Fill _

    .PresetGradient msoGradientDiagonalUp, 1, msoGradientDaybreak

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


SlideShowWindows Members (PowerPoint)

 Copy code hover
[image]

SlideShowWindows Members (PowerPoint)
Send feedback

Published: July 16, 2012

A collection of all the SlideShowWindow objects that represent the open slide shows in Microsoft PowerPoint.

Methods

Name | Description
Item | Returns a single SlideShowWindow object from the specified SlideShowWindows collection.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


Chart.AutoScaling Property (PowerPoint)

 Copy code hover
[image]

Chart.AutoScaling Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if Microsoft Word scales a 3-D chart so that it is closer in size to the equivalent 2-D chart. The RightAngleAxes property must be True. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .AutoScaling

expression A variable that represents a Chart object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example automatically scales the first chart in the active document. The example should be run on a 3-D chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.RightAngleAxes = True

        .Chart.AutoScaling = True

    End If

End With

See also

Concepts

Chart Object

Other resources

Chart Object Members


Shapes.BuildFreeform Method (PowerPoint)

 Copy code hover
[image]

Shapes.BuildFreeform Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Builds a freeform object. Returns a FreeformBuilder object that represents the freeform as it is being built.

Syntax

expression .BuildFreeform(EditingType, X1, Y1)

expression A variable that represents a Shapes object.

Parameters

Name | Required/Optional | Data Type | Description
EditingType | Required | MsoEditingType | The editing property of the first node.
X1 | Required | Single | The horizontal position, measured in points, of the first node in the freeform drawing relative to the left edge of the slide.
Y1 | Required | Single | The vertical position, measured in points, of the first node in the freeform drawing relative to the top edge of the slide.

Return Value

FreeformBuilder

Remarks

Use the AddNodes method to add segments to the freeform. After you have added at least one segment to the freeform, you can use the ConvertToShape method to convert the FreeformBuilder object into a Shape object that has the geometric description you've defined in the FreeformBuilder object.

Example

This example adds a freeform with four segments to myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)
With myDocument.Shapes.BuildFreeform(EditingType:=msoEditingCorner, _
    X1=360, Y1=200)
    .AddNodes SegmentType:=msoSegmentCurve, EditingType:=msoEditingCorner, _
        X1:=380, Y1:=230, X2:=400, Y2:=250, X3:=450, Y3:=300
    .AddNodes SegmentType:=msoSegmentCurve, EditingType:=msoEditingAuto, _
        X1:=480, Y1:=200
    .AddNodes SegmentType:=msoSegmentLine, EditingType:=msoEditingAuto, _
        X1:=480, Y1:=400
    .AddNodes SegmentType:=msoSegmentLine, EditingType:=msoEditingAuto, _
        X1:=360, Y1:=200
    .ConvertToShape
End With

See also

Concepts

Shapes Object

Other resources

Shapes Object Members


View Object (PowerPoint)

 Copy code hover
[image]

View Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the current editing view in the specified document window.

Remarks

Note Note

The View object can represent any of the document window views: normal view, slide view, outline view, slide sorter view, notes page view, slide master view, handout master view, or notes master view. Some properties and methods of the View object work only in certain views. If you try to use a property or method that's inappropriate for a View object, an error occurs.

Example

Use the View property of the DocumentWindow object to return the View object. The following example sets the size of window one and then sets the zoom to fit the new window size.

VBA Copy code Copy code
With Windows(1)

    .Height = 200

    .Width = 250

    .View.ZoomToFit = True

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

View Object Members


SlideRange.Application Property (PowerPoint)

 Copy code hover
[image]

SlideRange.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a SlideRange object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


Presentation.ApplyTemplate Method (PowerPoint)

 Copy code hover
[image]

Presentation.ApplyTemplate Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Applies a design template to the specified presentation.

Syntax

expression .ApplyTemplate(FileName)

expression A variable that represents a Presentation object.

Parameters

Name | Required/Optional | Data Type | Description
FileName | Required | String | Specifies the name of the design template.

Example

This example applies the "Professional" design template to the active presentation.

VBA Copy code Copy code
Application.ActivePresentation.ApplyTemplate _

    "c:\program files\microsoft office\templates" & _

    "\presentation designs\professional.pot"
Note Note

If you refer to an uninstalled presentation design template in a string, a run-time error is generated. The template is not installed automatically regardless of your FeatureInstall property setting. To use the ApplyTemplate method for a template that is not currently installed, you first must install the additional design templates. To do so, install the Additional Design Templates for PowerPoint by running the Microsoft Office installation program (click Add/Remove Programs or Programs and Features in Windows Control Panel).

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


AnimationBehavior.Timing Property (PowerPoint)

 Copy code hover
[image]

AnimationBehavior.Timing Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Timing object that represents the timing properties for an animation sequence.

Syntax

expression .Timing

expression A variable that represents an AnimationBehavior object.

Return Value

Timing

Example

The following example sets the duration of the first animation sequence on the first slide.

VBA Copy code Copy code
Sub SetTiming()

    ActivePresentation.Slides(1).TimeLine _

        .MainSequence(1).Timing.Duration = 1

End Sub

See also

Concepts

AnimationBehavior Object

Other resources

AnimationBehavior Object Members


TextStyle.Application Property (PowerPoint)

 Copy code hover
[image]

TextStyle.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a TextStyle object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

TextStyle Object

Other resources

TextStyle Object Members


FillFormat.UserTextured Method (PowerPoint)

 Copy code hover
[image]

FillFormat.UserTextured Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Fills the specified shape with small tiles of an image.

Syntax

expression .UserTextured(TextureFile)

expression A variable that represents an FillFormat object.

Remarks

If you want to fill the shape with one large image, use the UserPicture method.

Example

This example adds two rectangles to myDocument. The rectangle on the left is filled with one large image of the picture in Tiles.bmp; the rectangle on the right is filled with many small tiles of the picture in Tiles.bmp

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    .AddShape(msoShapeRectangle, 0, 0, 200, 100).Fill _

        .UserPicture "c:\windows\tiles.bmp"

    .AddShape(msoShapeRectangle, 300, 0, 200, 100).Fill _

        .UserTextured "c:\windows\tiles.bmp"

End With

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


ShapeRange.ConnectionSiteCount Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.ConnectionSiteCount Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the number of connection sites on the specified shape. Read-only.

Syntax

expression .ConnectionSiteCount

expression A variable that represents a ShapeRange object.

Return Value

Long

Example

This example adds two rectangles to myDocument and joins them with two connectors. The beginnings of both connectors attach to connection site one on the first rectangle; the ends of the connectors attach to the first and last connection sites of the second rectangle.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

Set s = myDocument.Shapes

Set firstRect = s.AddShape(msoShapeRectangle, 100, 50, 200, 100)

Set secondRect = s.AddShape(msoShapeRectangle, 300, 300, 200, 100)

lastsite = secondRect.ConnectionSiteCount

With s.AddConnector(msoConnectorCurve, 0, 0, 100, 100) _

        .ConnectorFormat

    .BeginConnect ConnectedShape:=firstRect, ConnectionSite:=1

    .EndConnect ConnectedShape:=secondRect, ConnectionSite:=1

End With

With s.AddConnector(msoConnectorCurve, 0, 0, 100, 100) _

        .ConnectorFormat

    .BeginConnect ConnectedShape:=firstRect, ConnectionSite:=1

    .EndConnect ConnectedShape:=secondRect, _

        ConnectionSite:=lastsite

End With

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


SlideRange.PublishSlides Method (PowerPoint)

 Copy code hover
[image]

SlideRange.PublishSlides Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Creates a Web presentation (in HTML format) from any loaded presentation. You can view the published presentation in a Web browser.

Syntax

expression .PublishSlides(SlideLibraryUrl, Overwrite)

expression An expression that returns a SlideRange object.

Parameters

Name | Required/Optional | Data Type | Description
SlideLibraryUrl | Required | String | URL to the slide library.
Overwrite | Optional | Boolean | True if the original presentation should be overwritten.

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


Point.MarkerBackgroundColorIndex Property (PowerPoint)

 Copy code hover
[image]

Point.MarkerBackgroundColorIndex Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the marker background color as an index into the current color palette, or as one of the following XlColorIndex constants: xlColorIndexAutomatic or xlColorIndexNone. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .MarkerBackgroundColorIndex

expression A variable that represents a Point object.

Remarks

The property applies only to line, scatter, and radar charts.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the marker background and foreground colors for the second point in series one for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.SeriesCollection(1).Points(2)

            ' Set the background color to green.

            .MarkerBackgroundColorIndex = 4

            ' Set the foreground color to red.

            .MarkerForegroundColorIndex = 3

        End With

    End If

End With

See also

Concepts

Point Object

Other resources

Point Object Members


ColorScheme.Count Property (PowerPoint)

 Copy code hover
[image]

ColorScheme.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a ColorScheme object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

ColorScheme Object

Other resources

ColorScheme Object Members


CustomLayout.Parent Property (PowerPoint)

 Copy code hover
[image]

CustomLayout.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a reference to the slide master object that is the parent of the specified CustomLayout object. Read-only.

Syntax

expression .Parent

expression A variable that represents a CustomLayout object.

Return Value

Object

See also

Concepts

CustomLayout Object

Other resources

CustomLayout Object Members


Selection.Unselect Method (PowerPoint)

 Copy code hover
[image]

Selection.Unselect Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Cancels the current selection.

Syntax

expression .Unselect

expression A variable that represents an Selection object.

Example

This example cancels the current selection in window one.

VBA Copy code Copy code
Windows(1).Selection.Unselect

See also

Concepts

Selection Object

Other resources

Selection Object Members


PpPrintHandoutOrder Enumeration (PowerPoint)

 Copy code hover
[image]

PpPrintHandoutOrder Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the page layout order in which slides appear on printed handouts that show multiple slides on one page.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppPrintHandoutHorizontalFirst | 2 | Slides are ordered horizontally, with the first slide in the upper-left corner and the second slide to the right of it. If your language setting specifies a right-to-left language, the first slide is in the upper-right corner with the second slide to the left of it.
ppPrintHandoutVerticalFirst | 1 | Slides are ordered vertically, with the first slide in the upper-left corner and the second slide below it. If your language setting specifies a right-to-left language, the first slide is in the upper-right corner with the second slide below it.


Ruler.Application Property (PowerPoint)

 Copy code hover
[image]

Ruler.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a Ruler object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

Ruler Object

Other resources

Ruler Object Members


Shape.Callout Property (PowerPoint)

 Copy code hover
[image]

Shape.Callout Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a CalloutFormat object that contains callout formatting properties for the specified shape. Applies to Shape or ShapeRange objects that represent line callouts. Read-only.

Syntax

expression .Callout

expression A variable that represents a Shape object.

Return Value

CalloutFormat

Example

This example adds to myDocument an oval and a callout that points to the oval. The callout text won't have a border, but it will have a vertical accent bar that separates the text from the callout line.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    .AddShape msoShapeOval, 180, 200, 280, 130

    With .AddCallout(msoCalloutTwo, 420, 170, 170, 40)

        .TextFrame.TextRange.Text = "My oval"

        With .Callout

            .Accent = True

            .Border = False

        End With

    End With

End With

See also

Concepts

Shape Object

Other resources

Shape Object Members


HeadersFooters Methods (PowerPoint)

 Copy code hover
[image]

HeadersFooters Methods (PowerPoint)
Send feedback

Published: July 12, 2012

This object has the following methods:

Methods

Name | Description
Clear | Clears the header and footer from the specified slide or slides.


SlideShowView.CurrentShowPosition Property (PowerPoint)

 Copy code hover
[image]

SlideShowView.CurrentShowPosition Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the position of the current slide within the slide show that is showing in the specified view. Read-only.

Syntax

expression .CurrentShowPosition

expression A variable that represents a SlideShowView object.

Return Value

Long

Remarks

If the specified view contains a custom show, the CurrentShowPosition property returns the position of the current slide within the custom show, not the position of the current slide within the entire presentation.

Example

This example sets a variable to the position of the current slide in the slide show running in slide show window one.

VBA Copy code Copy code
lastSlideSeen = SlideShowWindows(1).View.CurrentShowPosition

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


Application.PresentationSync Event (PowerPoint)

 Copy code hover
[image]

Application.PresentationSync Event (PowerPoint)
See also Send feedback

Published: July 16, 2012

Occurs when the local copy of a presentation that is part of a Document Workspace is synchronized with the copy on the server. Provides important status information regarding the success or failure of the synchronization of the presentation.

Syntax

expression .PresentationSync(Pres, SyncEventType)

expression A variable that represents an Application object.

Parameters

Name | Required/Optional | Data Type | Description
Pres | Required | Presentation | The presentation that is being synchronized.
SyncEventType | Required | MsoSyncEventType | The status of the synchronization.

Remarks

The SyncEventType parameter value can be one of these MsoSyncEventType constants.

msoSyncEventDownloadInitiated

msoSyncEventDownloadSucceeded

msoSyncEventDownloadFailed

msoSyncEventUploadInitiated

msoSyncEventUploadSucceeded

msoSyncEventUploadFailed

msoSyncEventDownloadNoChange

msoSyncEventOffline

Example

The following example displays a message if the synchronization of a presentation in a Document Workspace fails.

VBA Copy code Copy code
Private Sub app_PresentationSync(ByVal Pres As Presentation, _

        ByVal SyncEventType As Office.MsoSyncEventType)

    If SyncEventType = msoSyncEventDownloadFailed Or _

            SyncEventType = msoSyncEventUploadFailed Then

        MsgBox "Synchronization failed. " & _

            "Please contact your administrator, " & vbCrLf & _

            "or try again later."

    End If

End Sub

See also

Concepts

Application Object

Other resources

Application Object Members


Slide.Comments Property (PowerPoint)

 Copy code hover
[image]

Slide.Comments Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Comments object that represents a collection of comments. Read-only.

Syntax

expression .Comments

expression A variable that represents a Slide object.

Return Value

Comments

Example

The following example adds a comment to a slide.

VBA Copy code Copy code
Sub AddNewComment()

    ActivePresentation.Slides(1).Comments.Add _

        Left:=0, Top:=0, Author:="John Doe", AuthorInitials:="jd", _

        Text:="Please check this spelling again before the next draft."

End Sub

See also

Concepts

Slide Object

Other resources

Slide Object Members


View.Player Method (PowerPoint)

 Copy code hover
[image]

View.Player Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Allows access to playback controls for the associated view in the current window.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Player(ShapeId)

expression A variable that represents a View object.

Parameters

Name | Required/Optional | Data Type | Description
ShapeId | Required | Variant | The playback control.

Return Value

Player

See also

Concepts

View Object

Other resources

View Object Members


PictureFormat.CropLeft Property (PowerPoint)

 Copy code hover
[image]

PictureFormat.CropLeft Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the number of points that are cropped off the left side of the specified picture or OLE object. Read/write.

Syntax

expression .CropLeft

expression A variable that represents a PictureFormat object.

Return Value

Single

Remarks

Cropping is calculated relative to the original size of the picture. For example, if you insert a picture that is originally 100 points wide, rescale it so that it is 200 points wide, and then set the CropLeft property to 50, 100 points (not 50) will be cropped off the left side of your picture.

Example

This example crops 20 points off the left side of shape three on myDocument. For the example to work, shape three must be either a picture or an OLE object.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes(3).PictureFormat.CropLeft = 20

This example crops the percentage specified by the user off the left side of the selected shape, regardless of whether the shape has been scaled. For the example to work, the selected shape must be either a picture or an OLE object.

VBA Copy code Copy code
percentToCrop = InputBox("What percentage do you " & _

    "want to crop off the left of this picture?")

Set shapeToCrop = ActiveWindow.Selection.ShapeRange(1)

With shapeToCrop.Duplicate

    .ScaleWidth 1, True

    .Width = origWidth

    .Delete

End With

cropPoints = origWidth * percentToCrop / 100

shapeToCrop.PictureFormat.CropLeft = cropPoints

See also

Concepts

PictureFormat Object

Other resources

PictureFormat Object Members


SlideShowView Object (PowerPoint)

 Copy code hover
[image]

SlideShowView Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the view in a slide show window.

Example

Use the View property of the SlideShowWindow object to return the SlideShowView object. The following example sets slide show window one to display the first slide in the presentation.

VBA Copy code Copy code
SlideShowWindows(1).View.First

Use the Run method of the SlideShowSettings object to create a SlideShowWindow object, and then use the View property to return the SlideShowView object the window contains. The following example runs a slide show of the active presentation, changes the pointer to a pen, and sets the pen color for the slide show to red.

VBA Copy code Copy code
With ActivePresentation.SlideShowSettings.Run.View

    .PointerColor.RGB = RGB(255, 0, 0)

    .PointerType = ppSlideShowPointerPen

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

SlideShowView Object Members


ColorFormat.Creator Property (PowerPoint)

 Copy code hover
[image]

ColorFormat.Creator Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.

Syntax

expression .Creator

expression A variable that represents a ColorFormat object.

Return Value

Long

Remarks

The Creator property is designed to be used in Microsoft Office applications for the Macintosh.

Example

This example displays a message about the creator of myObject.

VBA Copy code Copy code
Set myObject = Application.ActivePresentation.Slides(1).Shapes(1)

If myObject.Creator = &h50575054 Then

    MsgBox "This is a PowerPoint object"

Else

    MsgBox "This is not a PowerPoint object"

End If

See also

Concepts

ColorFormat Object

Other resources

ColorFormat Object Members


Shapes.AddConnector Method (PowerPoint)

 Copy code hover
[image]

Shapes.AddConnector Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Creates a connector. Returns a Shape object that represents the new connector. When a connector is added, it is not connected to anything. Use the BeginConnect and EndConnect methods to attach the beginning and end of a connector to other shapes in the document.

Syntax

expression .AddConnector(Type, BeginX, BeginY, EndX, EndY)

expression A variable that represents a Shapes object.

Parameters

Name | Required/Optional | Data Type | Description
Type | Required | MsoConnectorType | The type of connector.
BeginX | Required | Single | The horizontal position, measured in points, of the connector's starting point relative to the left edge of the slide.
BeginY | Required | Single | The vertical position, measured in points, of the connector's starting point relative to the top edge of the slide.
EndX | Required | Single | The horizontal position, measured in points, of the connector's ending point relative to the left edge of the slide.
EndY | Required | Single | The vertical position, measured in points, of the connector's ending point relative to the top edge of the slide.

Return Value

Shape

Remarks

When you attach a connector to a shape, the size and position of the connector are automatically adjusted, if necessary. Therefore, if you're going to attach a connector to other shapes, the position and dimensions you specify when adding the connector are irrelevant.

Example

This example adds two rectangles to myDocument and connects them with a curved connector. Note that when you attach the connector to the rectangles, the size and position of the connector are automatically adjusted; therefore, the position and dimensions you specify when adding the callout are irrelevant (dimensions must be nonzero).

VBA Copy code Copy code
Sub NewConnector()

    Dim shpShapes As Shapes
    Dim shpFirst As Shape
    Dim shpSecond As Shape

    Set shpShapes = ActivePresentation.Slides(1).Shapes
    Set shpFirst = shpShapes.AddShape(Type:=msoShapeRectangle, _
        Left:=100, Top:=50, Width:=200, Height:=100)
    Set shpSecond = shpShapes.AddShape(Type:=msoShapeRectangle, _
        Left:=300, Top:=300, Width:=200, Height:=100)
    With shpShapes.AddConnector(Type:=msoConnectorCurve, BeginX:=0, _
            BeginY:=0, EndX:=100, EndY:=100).ConnectorFormat
        .BeginConnect ConnectedShape:=shpFirst, ConnectionSite:=1
        .EndConnect ConnectedShape:=shpSecond, ConnectionSite:=1
        .Parent.RerouteConnections
    End With

End Sub

See also

Concepts

Shapes Object

Other resources

Shapes Object Members


LegendEntry Members (PowerPoint)

 Copy code hover
[image]

LegendEntry Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a legend entry in a chart legend.

Methods

Name | Description
Delete | Deletes the object.
Select | Selects the object.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Font | Returns the font of the specified object. Read-only ChartFont.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Height | Returns the height, in points, of the object. Read-only Double.
Index | Returns the index number of the object within the collection of similar objects. Read-only Long.
Left | Returns the distance, in points, from the left edge of the object to the left edge of the chart area. Read-only Double.
LegendKey | Returns the legend key that is associated with the entry. Read-only LegendKey.
Parent | Returns the parent for the specified object. Read-only Object.
Top | Returns the distance, in points, from the top edge of the object to the top of the first row (on a worksheet) or the top of the chart area (on a chart). Read-only Double.
Width | Returns the width, in points, of the object. Read-only Double.


TextRange.BoundWidth Property (PowerPoint)

 Copy code hover
[image]

TextRange.BoundWidth Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the width (in points) of the text bounding box for the specified text frame. Read-only.

Syntax

expression .BoundWidth

expression A variable that represents a TextRange object.

Return Value

Single

Example

This example adds a rounded rectangle to slide one in the active presentation. The rectangle has the same dimensions as the text bounding box for shape one.

VBA Copy code Copy code
With Application.ActivePresentation.Slides(1).Shapes

    Set tr = .Item(1).TextFrame.TextRange

    Set roundRect = .AddShape(msoShapeRoundedRectangle, _

        tr.BoundLeft, tr.BoundTop, tr.BoundWidth, tr.BoundHeight)

End With

With roundRect.Fill

    .ForeColor.RGB = RGB(255, 0, 128)

    .Transparency = 0.75

End With

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


DisplayUnitLabel.FormulaR1C1Local Property (PowerPoint)

 Copy code hover
[image]

DisplayUnitLabel.FormulaR1C1Local Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the formula for the object, using R1C1-style notation in the language of the user. Read/write String.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .FormulaR1C1Local

expression A variable that represents a DisplayUnitLabel object.

Remarks

If the cell contains a constant, this property returns that constant. If the cell is empty, the property returns an empty string. If the cell contains a formula, the property returns the formula as a string, in the same format in which it would be displayed in the formula bar (including the equal sign).

If you set the value or formula of a cell to a date, Microsoft PowerPoint verifies whether that cell is already formatted with one of the date or time number formats. If not, the number format is changed to the default short date number format.

If the range is a one-dimensional or two-dimensional range, you can set the formula to a Visual Basic array of the same dimensions. Similarly, you can put the formula into a Visual Basic array.

Setting the formula of a multiple-cell range fills all cells in the range with the formula.

See also

Concepts

DisplayUnitLabel Object

Other resources

DisplayUnitLabel Object Members


NamedSlideShows.Add Method (PowerPoint)

 Copy code hover
[image]

NamedSlideShows.Add Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Creates a new named slide show and adds it to the collection of named slide shows in the specified presentation. Returns a NamedSlideShow object that represents the new named slide show.

Syntax

expression .Add(Name, SafeArrayOfSlideIDs)

expression A variable that represents a NamedSlideShows object.

Parameters

Name | Required/Optional | Data Type | Description
Name | Required | String | The name of the slide show.
safeArrayOfSlideIDs | Required | Variant | Contains the unique slide IDs of the slides to be displayed in a slide show.

Return Value

NamedSlideShow

Remarks

The name you specify when you add a named slide show is the name you use as an argument to the Run method to run the named slide show.

See also

Concepts

NamedSlideShows Object

Other resources

NamedSlideShows Object Members


PpAutoSize Enumeration (PowerPoint)

 Copy code hover
[image]

PpAutoSize Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies whether the size of the specified shape is changed automatically to fit text within its boundaries.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppAutoSizeMixed | -2 | Mixed size.
ppAutoSizeNone | 0 | Does not change size.
ppAutoSizeShapeToFitText | 1 | Auto sizes the shape to fit the text.


ShapeRange.ParentGroup Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.ParentGroup Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Shape object that represents the common parent shape of a child shape or a range of child shapes.

Syntax

expression .ParentGroup

expression A variable that represents a ShapeRange object.

Return Value

Shape

Example

This example creates two shapes on the first slide in the active presentation and groups those shapes; then using one shape in the group, accesses the parent group and fills all shapes in the parent group with the same fill color. This example assumes that the first slide of the active presentation does not currently contain any shapes. If it does, you will receive an error.

VBA Copy code Copy code
Sub ParentGroup()

    Dim sldNewSlide As Slide

    Dim shpParentGroup As Shape

    'Add two shapes to active document and group

    Set sldNewSlide = ActivePresentation.Slides _

        .Add(Index:=1, Layout:=ppLayoutBlank)

    With sldNewSlide.Shapes

        .AddShape Type:=msoShapeBalloon, Left:=72, _

            Top:=72, Width:=100, Height:=100

        .AddShape Type:=msoShapeOval, Left:=110, _

            Top:=120, Width:=100, Height:=100

        .Range(Array(1, 2)).Group

    End With

    Set shpParentGroup = ActivePresentation.Slides(1).Shapes(1) _

        .GroupItems(1).ParentGroup

    shpParentGroup.Fill.ForeColor.RGB = RGB _

        (Red:=151, Green:=51, Blue:=250)

End Sub

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


AnimationBehaviors.Add Method (PowerPoint)

 Copy code hover
[image]

AnimationBehaviors.Add Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an AnimationBehavior object that represents a new animation behavior.

Syntax

expression .Add(Type, Index)

expression A variable that represents an AnimationBehaviors object.

Parameters

Name | Required/Optional | Data Type | Description
Type | Required | MsoAnimType | The type of the animation behavior.
Index | Optional | Long | The position of the animation behaviorce in relation to other animation behaviors. The default value is -1, which means that if you omit the Index parameter, the new animation behavior is added at the end of the existing animation behaviors.

Return Value

AnimationBehavior

Remarks

The Type parameter value can be one of these MsoAnimType constants.

msoAnimTypeColor

msoAnimTypeMixed

msoAnimTypeMotion

msoAnimTypeNone

msoAnimTypeProperty

msoAnimTypeRotation

msoAnimTypeScale

See also

Concepts

AnimationBehaviors Object

Other resources

AnimationBehaviors Object Members


AxisTitle.FormulaR1C1Local Property (PowerPoint)

 Copy code hover
[image]

AxisTitle.FormulaR1C1Local Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the formula for the object, using R1C1-style notation in the language of the user. Read/write.

Syntax

expression .FormulaR1C1Local

expression A variable that represents an AxisTitle object.

See also

Concepts

AxisTitle Object

Other resources

AxisTitle Object Members


AxisTitle Properties (PowerPoint)

 Copy code hover
[image]

AxisTitle Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Caption | Returns or sets a String value that represents the axis title text.
Characters | Returns a ChartCharacters object that represents a range of characters within the object text. You can use the ChartCharacters object to format characters within a text string.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Formula | Returns or sets the object's formula in A1-style notation. Read-only.
FormulaLocal | Returns or sets the formula for the object, using A1-style references in the language of the user. Read/write.
FormulaR1C1 | Returns or sets the formula for the object by using R1C1-style notation. Read/write.
FormulaR1C1Local | Returns or sets the formula for the object, using R1C1-style notation in the language of the user. Read/write.
Height | Returns the height, in points, of the object. Read-only
HorizontalAlignment | Returns or sets the horizontal alignment for the specified object. Read/write Variant.
IncludeInLayout | True if an axis title will occupy the chart layout space when a chart layout is being determined. The default is True. Read/write Boolean.
Left | Returns or sets the distance, in points, from the left edge of the object to the left edge of the chart area. Read/write Double.
Name | Returns a String value that represents the name of the object.
Orientation | Returns or sets the text orientation. Read/write Long.
Parent | Returns the parent for the specified object. Read-only Object.
Position | Returns or sets the position of the axis title on the chart. Read/write XlChartElementPosition.
ReadingOrder | Returns or sets an XlReadingOrder constant that represents the reading order for the specified object. Read/write Long.
Shadow | Returns or sets a value that determines whether the object has a shadow. Read/write Boolean.
Text | Returns or sets the text for the specified object. Read/write String.
Top | Returns or sets the distance, in points, from the top edge of the object to the top of row 1 (on a worksheet) or the top of the chart area (on a chart). Read/write Double.
VerticalAlignment | Returns or sets the vertical alignment of the specified object. Read/write Variant.
Width | Returns a Double value that represents the width, in points, of the object. Read-only.


Axis.TickLabelPosition Property (PowerPoint)

 Copy code hover
[image]

Axis.TickLabelPosition Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Describes the position of tick-mark labels on the specified axis. Read/write XlTickLabelPosition.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .TickLabelPosition

expression A variable that represents an Axis object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets tick-mark labels to the high position (above the chart) on the category axis for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.Axes(xlCategory) _

            .TickLabelPosition = xlTickLabelPositionHigh

    End If

End With

See also

Concepts

Axis Object

Other resources

Axis Object Members


SlideRange Object (PowerPoint)

 Copy code hover
[image]

SlideRange Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

A collection that represents a notes page or a slide range, which is a set of slides that can contain as little as a single slide or as much as all the slides in a presentation.

Remarks

You can include whichever slides you want — chosen from all the slides in the presentation or from all the slides in the selection — to construct a slide range. For example, you could construct a SlideRange collection that contains the first three slides in a presentation, all the selected slides in the presentation, or all the title slides in the presentation.

Just as you can work with several slides at the same time in the user interface by selecting them and applying a command, you can work with several slides at the same time programmatically by constructing a SlideRange collection and applying properties or methods to it. And just as some commands in the user interface that work on single slides aren't valid when multiple slides are selected, some properties and methods that work on a Slide object or on a SlideRange collection that contains only one slide will fail if they're applied to a SlideRange collection that contains more than one slide. In general, if you can't do something manually when more than one slide is selected (such as return the individual shapes on one of the slides), you can't do it programmatically by using a SlideRange collection that contains more than one slide.

For those operations that work in the user interface whether you have a single slide or multiple slides selected (such as copying the selection to the Clipboard or setting the slide background fill), the associated properties and methods will work on a SlideRange collection that contains more than one slide. Here are some general guidelines for how these properties and methods behave when they're applied to multiple slides.

  • Applying a method to a SlideRange collection is equivalent to applying the method to all the Slide objects in that range as a group.

  • Setting the value of a property of the SlideRange collection is equivalent to setting the value of the property in each slide in that range individually (for a property that takes an enumerated type, setting the value to the "Mixed" value has no effect).

  • A property of the SlideRange collection that returns an enumerated type returns the value of the property for an individual slide in the collection if all slides in the collection have the same value for that property. If the slides in the collection don't all have the same value for the property, the property returns the "Mixed" value.

  • A property of the SlideRange collection that returns a simple data type (such as Long, Single, or String) returns the value of the property for an individual slide in the collection if all slides in the collection have the same value for that property. If the slides in the collection don't all have the same value for the property, the property will return - 2 or generate an error. For example, using the Name property on a SlideRange object that contains multiple slides will generate an error because each slide has a different value for its Name property.

  • Some formatting properties of slides aren't set by properties and methods that apply directly to the SlideRange collection, but by properties and methods that apply to an object contained in the SlideRange collection, such as the ColorScheme object. If the contained object represents operations that can be performed on multiple objects in the user interface, you'll be able to return the object from a SlideRange collection that contains more than one slide, and its properties and methods will follow the preceding rules. For example, you can use the ColorScheme property to return the ColorScheme object that represents the color schemes used on all the slides in the specified SlideRange collection. Setting properties for this ColorScheme object will also set these properties for the ColorScheme objects on all the individual slides in the SlideRange collection.

The following examples describe how to:

  • Return a set of slides that you specify by name or index number

  • Return all or some of the selected slides in a presentation

  • Return a notes page

  • Apply properties and methods to a slide range

Example

Use Slides.Range(index), where index is the name or index number of the slide or an array that contains either names or index numbers of slides, to return a SlideRange collection that represents a set of slides in a presentation. You can use the Array function to construct an array of names or index numbers. The following example sets the background fill for slides one and three in the active presentation.

VBA Copy code Copy code
With ActivePresentation.Slides.Range(Array(1, 3))

    .FollowMasterBackground = False

    .Background.Fill.PresetGradient msoGradientHorizontal, _

         1, msoGradientLateSunset

End With

The following example sets the background fill for the slides named "Intro" and "Big Chart" in the active presentation. Note that slides are assigned automatically generated names of the form Sliden (where n is an integer) when they're created. To assign a more meaningful name to a slide, use the Name property.

VBA Copy code Copy code
With ActivePresentation.Slides.Range(Array("Intro", "Big Chart"))

    .FollowMasterBackground = False

    .Background.Fill.PresetGradient msoGradientHorizontal, _

        1, msoGradientLateSunset

End With

Although you can use the Range method to return any number of slides, it is simpler to use the Item method if you only want to return a single member of the SlideRange collection. For example, Slides(1) is simpler than Slides.Range(1).

Use the SlideRange property of the Selection object to return all the slides in the selection. The following example sets the background fill for all the selected slides in window one, assuming that there's at least one slide selected.

VBA Copy code Copy code
With Windows(1).Selection.SlideRange

    .FollowMasterBackground = False

    .Background.Fill.PresetGradient msoGradientHorizontal, _

        1, msoGradientLateSunset

End With

Use Selection.SlideRange(index), where index is the slide name or index number, to return a single slide from the selection. The following example sets the background fill for slide two in the collection of selected slides in window one, assuming that there are at least two slides selected.

VBA Copy code Copy code
With Windows(1).Selection.SlideRange(2)

    .FollowMasterBackground = False

    .Background.Fill.PresetGradient msoGradientHorizontal, _

        1, msoGradientLateSunset

End With

Use the NotesPage property to return a SlideRange collection that represents the specified notes page. The following example inserts text into placeholder two (the notes area) on the notes page for slide one in the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(1).NotesPage.Shapes _

    .Placeholders(2).TextFrame.TextRange.InsertAfter "Added Text"

See also

Concepts

PowerPoint Object Model Reference

Other resources

SlideRange Object Members


ConnectorFormat Members (PowerPoint)

 Copy code hover
[image]

ConnectorFormat Members (PowerPoint)
Send feedback

Published: July 16, 2012

Contains properties and methods that apply to connectors.

Methods

Name | Description
BeginConnect | Attaches the beginning of the specified connector to a specified shape.
BeginDisconnect | Detaches the beginning of the specified connector from the shape it is attached to.
EndConnect | Attaches the end of the specified connector to a specified shape.
EndDisconnect | Detaches the end of the specified connector from the shape it is attached to. This method doesn't alter the size or position of the connector: the end of the connector remains positioned at a connection site but is no longer connected. Use the BeginDisconnect method to detach the beginning of the connector from a shape.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
BeginConnected | Determines whether the beginning of the specified connector is connected to a shape. Read/write.
BeginConnectedShape | Returns a Shape object that represents the shape that the beginning of the specified connector is attached to. Read-only.
BeginConnectionSite | Returns an integer that specifies the connection site that the beginning of a connector is connected to. Read-only.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
EndConnected | Determines whether the end of the specified connector is connected to a shape. Read-only.
EndConnectedShape | Returns a Shape object that represents the shape that the end of the specified connector is attached to. Read-only.
EndConnectionSite | Returns an integer that specifies the connection site that the end of a connector is connected to. Read-only.
Parent | Returns the parent object for the specified object.
Type | Represents the type of connector. Read/write.


ShapeRange.Top Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.Top Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a Single that represents the distance from the top edge of the topmost shape in the shape range to the top edge of the document. Read/write.

Syntax

expression .Top

expression A variable that represents a ShapeRange object.

Return Value

Single

Example

This example arranges windows one and two horizontally; in other words, each window occupies half the available vertical space and all the available horizontal space in the application window's client area. For this example to work, there must be only two document windows open.

VBA Copy code Copy code
Windows.Arrange ppArrangeTiled

sngHeight = Windows(1).Height                     ' available height

sngWidth = Windows(1).Width + Windows(2).Width    ' available width

With Windows(1)

    .Width = sngWidth

    .Height = sngHeight / 2

    .Left = 0

End With

With Windows(2)

    .Width = sngWidth

    .Height = sngHeight / 2

    .Top = sngHeight / 2

    .Left = 0

End With

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


Walls.Creator Property (PowerPoint)

 Copy code hover
[image]

Walls.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents a Walls object.

See also

Concepts

Walls Object

Other resources

Walls Object Members


Panes.Count Property (PowerPoint)

 Copy code hover
[image]

Panes.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a Panes object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

Panes Object

Other resources

Panes Object Members


SlideRange.BackgroundStyle Property (PowerPoint)

 Copy code hover
[image]

SlideRange.BackgroundStyle Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns the background style of the specified object. Read/write.

Syntax

expression .BackgroundStyle

expression An expression that returns a SlideRange object.

Remarks

The value of the BackgroundStyle property can be one of the MsoBackgroundStyleIndex constants.

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


Sequences.Parent Property (PowerPoint)

 Copy code hover
[image]

Sequences.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a Sequences object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

Sequences Object

Other resources

Sequences Object Members


PropertyEffect.To Property (PowerPoint)

 Copy code hover
[image]

PropertyEffect.To Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns a Variant that represents the ending value of an object's property. Read/write.

Syntax

expression .To

expression A variable that represents a PropertyEffect object.

Return Value

Variant

Remarks

The default value is Empty, in which case the current position of the object is used.

Do not confuse this property with the ToX or ToY properties of the ScaleEffect and MotionEffect objects, which are only used for scaling or motion effects.

See also

Concepts

PropertyEffect Object

Other resources

PropertyEffect Object Members


Point Methods (PowerPoint)

 Copy code hover
[image]

Point Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
ApplyDataLabels | Applies data labels to a point.
ClearFormats | Clears the formatting of the object.
Copy | If the point has a picture fill, copies the picture to the Clipboard.
Delete | Deletes the object.
Paste | Pastes a picture from the Clipboard as the marker on the selected point.
PieSliceLocation | Returns the vertical or horizontal position, in points, of a point on a chart item from the top or left edge of the object to the top or left edge of the chart area.
Select | Selects the object.


TickLabels.Parent Property (PowerPoint)

 Copy code hover
[image]

TickLabels.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents a TickLabels object.

See also

Concepts

TickLabels Object

Other resources

TickLabels Object Members


Shape.UpgradeMedia Method (PowerPoint)

 Copy code hover
[image]

Shape.UpgradeMedia Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Converts a legacy media object to an updated media object.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .UpgradeMedia

expression A variable that represents a Shape object.

See also

Concepts

Shape Object

Other resources

Shape Object Members


Font.Color Property (PowerPoint)

 Copy code hover
[image]

Font.Color Property (PowerPoint)
Send feedback

Published: July 16, 2012

Returns the color of the current Font object. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Color

expression A variable that represents a Font object.


Application.SlideShowOnPrevious Event (PowerPoint)

 Copy code hover
[image]

Application.SlideShowOnPrevious Event (PowerPoint)
See also Send feedback

Published: July 16, 2012

Occurs when the user clicks Previous to move within the current slide.

Syntax

expression .SlideShowOnPrevious(Wn)

expression An expression that returns an Application object.

Parameters

Name | Required/Optional | Data Type | Description
Wn | Required | SlideShowWindow | The active slideshow window.

Remarks

To access Application object events, declare a variable to represent the Application object in the General Declarations section of your code. Then set the variable equal to the Application object for which you want to access events. For more information about using events with the Microsoft PowerPoint Application object, see How to: Use Events with the Application Object.

The SlideShowOnPrevious event does not fire when users click Previous to move from one slide to the previous one, but rather only when they click Previous to move within a given slide, for example to rerun the previous animation on the slide.

Example

This example displays a message every time a user clicks Previous to move with the current slide. The example assumes that you have already declared an Application object named App in the General Declarations section of your code, using the WithEvents keyword.

VBA Copy code Copy code
Private Sub App_SlideShowOnPrevious(ByVal Wn As SlideShowWindow)

    Debug.Print "User clicked Previous to move within the current slide."

End Sub

See also

Concepts

Application Object

Other resources

Application Object Members


FileConverter.Parent Property (PowerPoint)

 Copy code hover
[image]

FileConverter.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Object that represents the parent object of the specified FileConverter object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression Required. A variable that represents a FileConverter object.

See also

Concepts

FileConverter Object

Other resources

FileConverter Object Members


Application.DisplayDocumentInformationPanel Property (PowerPoint)

 Copy code hover
[image]

Application.DisplayDocumentInformationPanel Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets whether the Document Properties panel is displayed in the Microsoft PowerPoint user interface. Read/write.

Syntax

expression .DisplayDocumentInformationPanel

expression An expression that returns an Application object.

Return Value

Boolean

See also

Concepts

Application Object

Other resources

Application Object Members


ShapeRange.Select Method (PowerPoint)

 Copy code hover
[image]

ShapeRange.Select Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Selects the specified object.

Syntax

expression .Select(Replace)

expression A variable that represents a ShapeRange object.

Parameters

Name | Required/Optional | Data Type | Description
Replace | Optional | MsoTriState | Specifies whether the selection replaces any previous selection.

Remarks

If you try to make a selection that isn't appropriate for the view, your code will fail. For example, you can select a slide in slide sorter view but not in slide view.

The Replace parameter value can be one of these MsoTriState constants.

Constant | Description
msoFalse | The selection is added to the previous selection.
msoTrue | The default. The selection replaces any previous selection.

Example

This example selects shapes one and three on slide one in the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(1).Shapes.Range(Array(1, 3)).Select

This example adds shapes two and four on slide one in the active presentation to the previous selection.

VBA Copy code Copy code
ActivePresentation.Slides(1).Shapes.Range(Array(2, 4)).Select

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


PictureFormat Members (PowerPoint)

 Copy code hover
[image]

PictureFormat Members (PowerPoint)
Send feedback

Published: July 16, 2012

Contains properties and methods that apply to pictures and OLE objects.

Methods

Name | Description
IncrementBrightness | Changes the brightness of the picture by the specified amount.
IncrementContrast | Changes the contrast of the picture by the specified amount.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Brightness | Returns or sets the brightness of the specified picture or OLE object. Read/write.
ColorType | Returns or sets the type of color transformation applied to the specified picture or OLE object. Read/write.
Contrast | Returns or sets the contrast for the specified picture or OLE object.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
Crop | Returns or sets the number of points that are cropped off the specified picture or OLE object. Read-only.
CropBottom | Returns or sets the number of points that are cropped off the bottom of the specified picture or OLE object. Read/write.
CropLeft | Returns or sets the number of points that are cropped off the left side of the specified picture or OLE object. Read/write.
CropRight | Returns or sets the number of points that are cropped off the right side of the specified picture or OLE object. Read/write.
CropTop | Returns or sets the number of points that are cropped off the top of the specified picture or OLE object. Read/write.
Parent | Returns the parent object for the specified object.
TransparencyColor | Returns or sets the transparent color for the specified picture as a red-green-blue (RGB) value. Read/write.
TransparentBackground | Determines whether parts of the picture that are the color defined as the transparent color appear transparent. Applies to bitmaps only. Read/write.


DataLabel.FormulaR1C1Local Property (PowerPoint)

 Copy code hover
[image]

DataLabel.FormulaR1C1Local Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the formula for the object, using R1C1-style notation in the language of the user. Read/write String.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .FormulaR1C1Local

expression A variable that represents a DataLabel object.

Remarks

If the cell contains a constant, this property returns that constant. If the cell is empty, the property returns an empty string. If the cell contains a formula, the property returns the formula as a string, in the same format in which it would be displayed in the formula bar (including the equal sign).

If you set the value or formula of a cell to a date, Microsoft PowerPoint verifies whether that cell is already formatted with one of the date or time number formats. If not, the number format is changed to the default short date number format.

If the range is a one-dimensional or two-dimensional range, you can set the formula to a Visual Basic array of the same dimensions. Similarly, you can put the formula into a Visual Basic array.

Setting the formula of a multiple-cell range fills all cells in the range with the formula.

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


Application.AutoCorrect Property (PowerPoint)

 Copy code hover
[image]

Application.AutoCorrect Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an AutoCorrect object that represents the AutoCorrect functionality in Microsoft PowerPoint.

Syntax

expression .AutoCorrect

expression A variable that represents an Application object.

Return Value

AutoCorrect

Example

The following example disables display of the AutoCorrect Options and AutoLayout Options buttons.

VBA Copy code Copy code
Sub HideAutoCorrectOpButton()

    With Application.AutoCorrect

        .DisplayAutoCorrectOptions = msoFalse

        .DisplayAutoLayoutOptions = msoFalse

    End With

End Sub

See also

Concepts

Application Object

Other resources

Application Object Members


ShapeNodes Object (PowerPoint)

 Copy code hover
[image]

ShapeNodes Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

A collection of all the ShapeNode objects in the specified freeform.

Remarks

Each ShapeNode object represents either a node between segments in a freeform or a control point for a curved segment of a freeform. You can create a freeform manually or by using the BuildFreeform and ConvertToShape methods.

Example

Use the Nodes property to return the ShapeNodes collection. The following example deletes node four in shape three on myDocument. For this example to work, shape three must be a freeform with at least four nodes.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes(3).Nodes.Delete 4

Use the Insert method to create a new node and add it to the ShapeNodes collection. The following example adds a smooth node with a curved segment after node four in shape three on myDocument. For this example to work, shape three must be a freeform with at least four nodes.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(3).Nodes

    .Insert 4, msoSegmentCurve, msoEditingSmooth, 210, 100

End With

Use Nodes(index), where index is the node index number, to return a single ShapeNode object. If node one in shape three on myDocument is a corner point, the following example makes it a smooth point. For this example to work, shape three must be a freeform.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(3)

    If .Nodes(1).EditingType = msoEditingCorner Then

        .Nodes.SetEditingType 1, msoEditingSmooth

    End If

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

ShapeNodes Object Members


PrintRange.Start Property (PowerPoint)

 Copy code hover
[image]

PrintRange.Start Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of the first slide in the range of slides to be printed. Read-only.

Syntax

expression .Start

expression A variable that represents a PrintRange object.

Return Value

Integer

Example

This example displays a message that indicates the starting and ending slide numbers for print range one in the active presentation.

VBA Copy code Copy code
With ActivePresentation.PrintOptions.Ranges

    If .Count > 0 Then

        With .Item(1)

            MsgBox "Print range 1 starts on slide " & .Start & _

                " and ends on slide " & .End

        End With

    End If

End With

See also

Concepts

PrintRange Object

Other resources

PrintRange Object Members


Shapes.Creator Property (PowerPoint)

 Copy code hover
[image]

Shapes.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.

Syntax

expression .Creator

expression A variable that represents a Shapes object.

Return Value

Long

Remarks

The Creator property is designed to be used in Microsoft Office applications for the Macintosh.

Example

This example displays a message about the creator of myObject.

VBA Copy code Copy code
Set myObject = Application.ActivePresentation.Slides(1).Shapes(1)

If myObject.Creator = &h50575054 Then

    MsgBox "This is a PowerPoint object"

Else

    MsgBox "This is not a PowerPoint object"

End If

See also

Concepts

Shapes Object

Other resources

Shapes Object Members


PpMouseActivation Enumeration (PowerPoint)

 Copy code hover
[image]

PpMouseActivation Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

The action setting for a MouseClick or MouseOver event.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppMouseClick | 1 | Mouse click
ppMouseOver | 2 | Mouse over


TextFrame.Ruler Property (PowerPoint)

 Copy code hover
[image]

TextFrame.Ruler Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Ruler object that represents the ruler for the specified text. Read-only.

Syntax

expression .Ruler

expression A variable that represents a TextFrame object.

Return Value

Ruler

Example

This example sets a left-aligned tab stop at 2 inches (144 points) for the text in shape two on myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes(2).TextFrame.Ruler.TabStops _

    .Add ppTabStopLeft, 144

See also

Concepts

TextFrame Object

Other resources

TextFrame Object Members


SlideShowSettings.Run Method (PowerPoint)

 Copy code hover
[image]

SlideShowSettings.Run Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Runs a slide show of the specified presentation. Returns a SlideShowWindow object.

Syntax

expression .Run

expression A variable that represents a SlideShowSettings object.

Return Value

SlideShowWindow

Remarks

To run a custom slide show, set the RangeType property to ppShowNamedSlideShow, and set the SlideShowName property to the name of the custom show you want to run.

Example

This example starts a full-screen slide show of the active presentation, with shortcut keys disabled.

VBA Copy code Copy code
With ActivePresentation.SlideShowSettings

    .ShowType = ppShowSpeaker

    .Run.View.AcceleratorsEnabled = False

End With

This example runs the named slide show "Quick Show."

VBA Copy code Copy code
With ActivePresentation.SlideShowSettings

    .RangeType = ppShowNamedSlideShow

    .SlideShowName = "Quick Show"

    .Run

End With

See also

Concepts

SlideShowSettings Object

Other resources

SlideShowSettings Object Members


PublishObjects.Application Property (PowerPoint)

 Copy code hover
[image]

PublishObjects.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a PublishObjects object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

PublishObjects Object

Other resources

PublishObjects Object Members


LegendKey.Delete Method (PowerPoint)

 Copy code hover
[image]

LegendKey.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Delete

expression A variable that represents a LegendKey object.

Remarks

Deleting a LegendKey object deletes the entire series.

See also

Concepts

LegendKey Object

Other resources

LegendKey Object Members


RotationEffect.By Property (PowerPoint)

 Copy code hover
[image]

RotationEffect.By Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns a Single that represents the rotation of an object by the specified number of degrees; for example, a value of 180 means to rotate the object by 180 degrees. Read/write.

Syntax

expression .By

expression A variable that represents a RotationEffect object.

Remarks

The specified object will be rotated with the center of the object remaining in the same position on the screen.

If both the By and To properties are set for a rotation effect, then the value of the By property is ignored.

Floating point numbers (for example, 55.5) are valid, but negative numbers are not.

Do not confuse this property with the ByX or ByY properties of the ScaleEffect and MotionEffect objects, which are only used for scaling or motion effects.

Example

This example adds a rotation effect and changes its rotation.

VBA Copy code Copy code
Sub AddAndChangeRotationEffect()

    Dim effBlinds As Effect

    Dim tmlnShape As TimeLine

    Dim shpShape As Shape

    Dim animBehavior As AnimationBehavior

    Dim rtnEffect As RotationEffect

    'Sets shape, timing, and effect

    Set shpShape = ActivePresentation.Slides(1).Shapes(1)

    Set tmlnShape = ActivePresentation.Slides(1).TimeLine

    Set effBlinds = tmlnShape.MainSequence.AddEffect _

        (Shape:=shpShape, effectId:=msoAnimEffectBlinds)

    'Adds animation behavior and sets rotation effect

    Set animBehavior = tmlnShape.MainSequence(1).Behaviors _

        .Add(Type:=msoAnimTypeRotation)

    Set rtnEffect = animBehavior.RotationEffect

    rtnEffect.By = 270

End Sub

See also

Concepts

RotationEffect Object

Other resources

RotationEffect Object Members


DataLabel.ShowRange Property (PowerPoint)

 Copy code hover
[image]

DataLabel.ShowRange Property (PowerPoint)
Send feedback

Set to True to display the Value From Cells range field for the specified chart data label. Set to False to hide that field. Read/write Boolean.

Version information

Version Added: PowerPoint 2013

Syntax

expression .ShowRange

expression A variable that represents a DataLabel object.

Property value

BOOL


ParagraphFormat.SpaceWithin Property (PowerPoint)

 Copy code hover
[image]

ParagraphFormat.SpaceWithin Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the amount of space between base lines in the specified text, in points or lines. Read/write.

Syntax

expression .SpaceWithin

expression A variable that represents a ParagraphFormat object.

Return Value

Single

Example

This example sets line spacing to 21 points for the text in shape two on slide two in the active presentation.

VBA Copy code Copy code
With Application.ActivePresentation.Slides(2).Shapes(2)

    With .TextFrame.TextRange.ParagraphFormat

        .LineRuleWithin = False

        .SpaceWithin = 21

    End With

End With

See also

Concepts

ParagraphFormat Object

Other resources

ParagraphFormat Object Members


Broadcast.Parent Property (PowerPoint)

 Copy code hover
[image]

Broadcast.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object. Read-only.

Syntax

expression .Parent

expression A variable that represents a Broadcast object.

See also

Concepts

Broadcast Object

Other resources

Broadcast Object Members


SeriesCollection.Count Property (PowerPoint)

 Copy code hover
[image]

SeriesCollection.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the collection. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Count

expression A variable that represents a SeriesCollection object.

See also

Concepts

SeriesCollection Object

Other resources

SeriesCollection Object Members


Selection.TextRange Property (PowerPoint)

 Copy code hover
[image]

Selection.TextRange Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a TextRange object that represents the selected text. Read-only.

Syntax

expression .TextRange

expression A variable that represents a Selection object.

Return Value

TextRange

Remarks

You can construct a text range from a selection when the presentation is in slide view, normal view, outline view, notes page view, or any master view.

Example

This example makes the selected text bold in the first window.

VBA Copy code Copy code
Windows(1).Selection.TextRange.Font.Bold = True

See also

Concepts

Selection Object

Other resources

Selection Object Members


RGBColor.RGB Property (PowerPoint)

 Copy code hover
[image]

RGBColor.RGB Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the red-green-blue (RGB) value of a specified color-scheme color or extra color when used with a PpColorSchemeIndex constant. Read/write.

Syntax

expression .RGB

expression A variable that represents a RGBColor object.

Return Value

MsoRGBType

Remarks

Use the Colors method to return a RGBColor object.

The value of the RGB property can be one of these PpColorSchemeIndex constants.

ppAccent1

ppAccent2

ppAccent3

ppBackground

ppFill

ppForeground

ppShadow

ppTitle

Example

This example displays the value of the red, green, and blue components of the fill forecolor for shape one on slide one in the active document.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

c = myDocument.Shapes(1).Fill.ForeColor.RGB

redComponent = c Mod 256

greenComponent = c \ 256 Mod 256

blueComponent = c \ 65536 Mod 256

MsgBox "RGB components: " & redComponent & _

    ", " & greenComponent & ", " & blueComponent

See also

Concepts

RGBColor Object

Other resources

RGBColor Object Members


Font Properties (PowerPoint)

 Copy code hover
[image]

Font Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
AutoRotateNumbers | Returns or sets lateral compression. Read/write.
BaselineOffset | Returns or sets the baseline offset for the specified superscript or subscript characters. Read/write.
Bold | Determines whether the character format is bold. Read/write.
Color | Returns the color of the current Font object. Read-only.
Embeddable | Determines whether the specified font can be embedded in the presentation. Read-only.
Embedded | Determines whether the specified font is embedded in the presentation. Read-only.
Emboss | Determines whether the character format is embossed. Read/write.
Italic | True if the font or range is formatted as italic. Read/write Long.
Name | Returns or sets the name of the specified object. Read/write.
NameAscii | Returns or sets the font used for ASCII characters (characters with character set numbers within the range of 0 to 127). Read/write.
NameComplexScript | Returns or sets the complex script font name. Used for mixed language text. Read/write.
NameFarEast | Returns or sets the Asian font name. Read/write.
NameOther | Returns or sets the font used for characters whose character set numbers are greater than 127. Read/write.
Parent | Returns the parent object for the specified object.
Shadow | Determines whether the specified text has a shadow. Read/write.
Size | Returns or sets the character size, in points. Read/write.
Subscript | Determines whether the specified text is subscript. Read/write.
Superscript | Determines whether the specified text is superscript. Read/write.
Underline | Determines whether the specified text (for the Font object) or the font style (for the FontInfo object) is underlined. Read/write.


PpFrameColors Enumeration (PowerPoint)

 Copy code hover
[image]

PpFrameColors Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the text color for the outline pane and the background color for the outline and slide panes for Web presentations.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppFrameColorsBlackTextOnWhite | 5 | Use White text on a Black frame.
ppFrameColorsBrowserColors | 1 | Use browser colors for the pane and text.
ppFrameColorsPresentationSchemeAccentColor | 3 | Use the Presentation Scheme Accent color.
ppFrameColorsPresentationSchemeTextColor | 2 | Use the Presentation Scheme Text Color.
ppFrameColorsWhiteTextOnBlack | 4 | Use Black text on a White frame.


LegendEntries Methods (PowerPoint)

 Copy code hover
[image]

LegendEntries Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Item | Returns a single object from a collection.


SlideNavigation.Parent Property (PowerPoint)

 Copy code hover
[image]

SlideNavigation.Parent Property (PowerPoint)
Send feedback

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2013

Syntax

expression .Parent

expression A variable that represents a SlideNavigation object.


ThreeDFormat.Parent Property (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a ThreeDFormat object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


Presentation.Parent Property (PowerPoint)

 Copy code hover
[image]

Presentation.Parent Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a Presentation object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


Axis Properties (PowerPoint)

 Copy code hover
[image]

Axis Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
AxisBetweenCategories | True if the value axis crosses the category axis between categories. Read/write Boolean.
AxisGroup | Returns the type of axis group. Read-only XlAxisGroup.
AxisTitle | Returns the title of the specified axis. Read-only AxisTitle.
BaseUnit | Returns or sets the base unit for the specified category axis. Read/write XlTimeUnit.
BaseUnitIsAuto | True if Microsoft Word chooses appropriate base units for the specified category axis. The default is True. Read/write Boolean.
Border | Returns the border of the object. Read-only ChartBorder.
CategoryNames | Returns or sets all the category names as a text array for the specified axis. Read/write Variant.
CategoryType | Returns or sets the category axis type. Read/write XlCategoryType.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Crosses | Returns or sets the point on the specified axis where the other axis crosses. Read/write Long.
CrossesAt | Returns or sets the point on the value axis where the category axis crosses it. Applies only to the value axis. Read/write Double.
DisplayUnit | Returns or sets the unit label for the value axis. Read/write XlDisplayUnit, xlCustom, or xlNone.
DisplayUnitCustom | If the value of the DisplayUnit property is xlCustom, returns or sets the value of the displayed units. Read/write Double.
DisplayUnitLabel | Returns the DisplayUnitLabel object for the specified axis. Returns null if the HasDisplayUnitLabel property is set to False. Read-only.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
HasDisplayUnitLabel | True if the label specified by the DisplayUnit or DisplayUnitCustom property is displayed on the specified axis. The default is True. Read/write Boolean.
HasMajorGridlines | True if the axis has major gridlines. Read/write Boolean.
HasMinorGridlines | True if the axis has minor gridlines. Read/write Boolean.
HasTitle | True if the axis or chart has a visible title. Read/write Boolean.
Height | Returns the height, in points, of the object. Read-only Double.
Left | Returns the distance, in points, from the left edge of the object to the left edge of the chart area. Read-only Double.
LogBase | Returns or sets the base of the logarithm when you are using log scales. Read/write Double.
MajorGridlines | Returns the major gridlines for the specified axis. Read-only Gridlines.
MajorTickMark | Returns or sets the type of major tick mark for the specified axis. Read/write XlTickMark.
MajorUnit | Returns or sets the major units for the value axis. Read/write Double.
MajorUnitIsAuto | True if Microsoft Word calculates the major units for the value axis. Read/write Boolean.
MajorUnitScale | Returns or sets the major unit scale value for the category axis when the CategoryType property is set to xlTimeScale. Read/write XlTimeUnit.
MaximumScale | Returns or sets the maximum value on the value axis. Read/write Double.
MaximumScaleIsAuto | True if Microsoft Word calculates the maximum value for the value axis. Read/write Boolean.
MinimumScale | Returns or sets the minimum value on the value axis. Read/write Double.
MinimumScaleIsAuto | True if Microsoft Word calculates the minimum value for the value axis. Read/write Boolean.
MinorGridlines | Returns the minor gridlines for the specified axis. Read-only Gridlines.
MinorTickMark | Returns or sets the type of minor tick mark for the specified axis. Read/write XlTickMark.
MinorUnit | Returns or sets the minor units on the value axis. Read/write Double.
MinorUnitIsAuto | True if Microsoft Word calculates minor units for the value axis. Read/write Boolean.
MinorUnitScale | Returns or sets the minor unit scale value for the category axis when the CategoryType property is set to xlTimeScale. Read/write XlTimeUnit.
Parent | Returns the parent for the specified object. Read-only Object.
ReversePlotOrder | True if Microsoft Word plots data points from last to first. Read/write Boolean.
ScaleType | Returns or sets the value axis scale type. Read/write XlScaleType.
TickLabelPosition | Describes the position of tick-mark labels on the specified axis. Read/write XlTickLabelPosition.
TickLabels | Returns the tick-mark labels for the specified axis. Read-only TickLabels.
TickLabelSpacing | Returns or sets the number of categories or series between tick-mark labels. Read/write Long.
TickLabelSpacingIsAuto | Returns or sets a value that indicates whether the tick label spacing is automatic. Read/write Boolean.
TickMarkSpacing | Returns or sets the number of categories or series between tick marks. Read/write Long.
Top | Returns the distance, in points, from the top edge of the object to the top of row 1 (on a worksheet) or the top of the chart area (on a chart). Read-only Double.
Type | Returns the axis type. Read-only XlAxisType.
Width | Returns the width, in points, of the object. Read-only Double.


PrintRanges Members (PowerPoint)

 Copy code hover
[image]

PrintRanges Members (PowerPoint)
Send feedback

Published: July 16, 2012

A collection of all the PrintRange objects in the specified presentation. Each PrintRange object represents a range of consecutive slides or pages to be printed.

Methods

Name | Description
Add | Returns a PrintRange object that represents a new print range to be added to the PrintRanges collection.
ClearAll | Clears all the print ranges from the PrintRanges collection. Use the Add method of the PrintRanges collection to add print ranges to the collection.
Item | Returns a single PrintRange object from the specified PrintRanges collection.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


LegendEntry.Parent Property (PowerPoint)

 Copy code hover
[image]

LegendEntry.Parent Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents a LegendEntry object.

See also

Concepts

LegendEntry Object

Other resources

LegendEntry Object Members


Chart.SaveChartTemplate Method (PowerPoint)

 Copy code hover
[image]

Chart.SaveChartTemplate Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Saves a custom chart template to the list of available chart templates.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .SaveChartTemplate(FileName)

expression A variable that represents a Chart object.

Parameters

Name | Required/Optional | Data Type | Description
FileName | Required | String | The name of the chart template.

Remarks

By default, this method saves the active chart to the user's chart template directory. If a UNC or URL is specified, the chart will be saved to the specified location instead.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example adds a new chart template based on the first chart of the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SaveChartTemplate _

            FileName:="Presentation Chart"

    End If

End With

See also

Concepts

Chart Object

Other resources

Chart Object Members


Trendline.InterceptIsAuto Property (PowerPoint)

 Copy code hover
[image]

Trendline.InterceptIsAuto Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if the point where the trendline crosses the value axis is automatically determined by the regression. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .InterceptIsAuto

expression A variable that represents a Trendline object.

Remarks

Setting the Intercept property sets this property to False.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets Microsoft Word to automatically determine the trendline intercept point for the first chart in the active document. You should run the example on a 2-D column chart that contains a single series that has a trendline.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).Trendlines(1) _

            .InterceptIsAuto = True

    End If

End With

See also

Concepts

Trendline Object

Other resources

Trendline Object Members


Floor.Application Property (PowerPoint)

 Copy code hover
[image]

Floor.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents a Floor object.

See also

Concepts

Floor Object

Other resources

Floor Object Members


AnimationSettings.DimColor Property (PowerPoint)

 Copy code hover
[image]

AnimationSettings.DimColor Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a ColorFormat object that represents the color of the specified shape after it is been built. Read-only.

Syntax

expression .DimColor

expression A variable that represents a AnimationSettings object.

Return Value

ColorFormat

Remarks

If you don't get the effect you expect, check your other build settings. You won't see the effect of the DimColor property unless the TextLevelEffect property of the AnimationSettings object is set to something other than ppAnimateLevelNone, the AfterEffect property is set to ppAfterEffectDim, and the Animate property is set to True. In addition, if the specified shape is the only item or the last item to be built on the slide, the shape won't be dimmed. To change the build order of the shapes on a slide, use the AnimationOrder property.

Example

This example adds a slide that contains both a title and a three-item list to the active presentation, sets the title and list to be dimmed after being built, and sets the color that each of them will be dimmed to.

VBA Copy code Copy code
With ActivePresentation.Slides.Add(2, ppLayoutText).Shapes

    With .Item(1)

        .TextFrame.TextRange.Text = "Sample title"

        With .AnimationSettings

            .TextLevelEffect = ppAnimateByAllLevels

            .AfterEffect = ppAfterEffectDim

            .DimColor.SchemeColor = ppShadow

            .Animate = True

        End With

    End With

    With .Item(2)

        .TextFrame.TextRange.Text = "Item one" _

            & Chr(13) & "Item two"

        With .AnimationSettings

            .TextLevelEffect = ppAnimateByFirstLevel

            .AfterEffect = ppAfterEffectDim

            .DimColor.RGB = RGB(100, 150, 130)

            .Animate = True

        End With

    End With

End With

See also

Concepts

AnimationSettings Object

Other resources

AnimationSettings Object Members


ThreeDFormat.BevelTopInset Property (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.BevelTopInset Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the top bevel inset for the specified ThreeDFormat object, in points. Read/write.

Syntax

expression .BevelTopInset

expression A variable that represents a ThreeDFormat object.

Return Value

Single

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


ProtectedViewWindow.SourceName Property (PowerPoint)

 Copy code hover
[image]

ProtectedViewWindow.SourceName Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the source name of the current ProtectedViewWindow object. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .SourceName

expression A variable that represents a ProtectedViewWindow object.

See also

Concepts

ProtectedViewWindow Object

Other resources

ProtectedViewWindow Object Members


RulerLevel Object (PowerPoint)

 Copy code hover
[image]

RulerLevel Object (PowerPoint)
See also Send feedback

Published: July 12, 2012

Contains first-line indent and hanging indent information for an outline level.

Remarks

The RulerLevel object is a member of the RulerLevels collection. The RulerLevels collection contains a RulerLevel object for each of the five available outline levels.

Example

Use RulerLevels(index), where index is the outline level, to return a single RulerLevel object. The following example sets the first-line indent and hanging indent for outline level one in body text on the slide master for the active presentation.

VBA Copy code Copy code
With ActivePresentation.SlideMaster _

        .TextStyles(ppBodyStyle).Ruler.Levels(1)

    .FirstMargin = 9

    .LeftMargin = 54

End With

The following example sets the first-line indent and hanging indent for outline level one in shape two on slide one in the active presentation.

VBA Copy code Copy code
With ActivePresentation.SlideMaster.Shapes(2) _

        .TextFrame.Ruler.Levels(1)

    .FirstMargin = 9

    .LeftMargin = 54

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

RulerLevel Object Members


Master.Delete Method (PowerPoint)

 Copy code hover
[image]

Master.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the specified Master object.

Syntax

expression .Delete

expression A variable that represents a Master object.

See also

Concepts

Master Object

Other resources

Master Object Members


ShapeRange.ZOrderPosition Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.ZOrderPosition Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the position of the specified shape in the z-order. Read-only.

Syntax

expression .ZOrderPosition

expression A variable that represents a ShapeRange object.

Return Value

Long

Remarks

Shapes(1) returns the shape at the back of the z-order, and Shapes(Shapes.Count) returns the shape at the front of the z-order.

To set the shape's position in the z-order, use the ZOrder method.

A shape's position in the z-order corresponds to the shape's index number in the Shapes collection. For example, if there are four shapes on the slide, the expression myDocument.Shapes(1) returns the shape at the back of the z-order, and the expression myDocument.Shapes(4) returns the shape at the front of the z-order.

Whenever you add a new shape to a collection, it is added to the front of the z-order by default.

Example

This example adds an oval to myDocument and then places the oval second from the back in the z-order if there is at least one other shape on the slide.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddShape(msoShapeOval, 100, 100, 100, 300)

    While .ZOrderPosition > 2

        .ZOrder msoSendBackward

    Wend

End With

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


BulletFormat Members (PowerPoint)

 Copy code hover
[image]

BulletFormat Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents bullet formatting.

Methods

Name | Description
Picture | Sets the graphics file to be used for bullets in a bulleted list when the Type property of the BulletFormat object is set to ppBulletPicture.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Character | Returns or sets the Unicode character value that is used for bullets in the specified text. Read/write.
Font | Returns a Font object that represents character formatting. Read-only.
Number | Returns the bullet number of a paragraph when the Type property of the BulletFormat object is set to ppBulletNumbered. Read-only.
Parent | Returns the parent object for the specified object.
RelativeSize | Returns or sets the bullet size relative to the size of the first text character in the paragraph. Read/write.
StartValue | Returns or sets the beginning value of a bulleted list when the Type property of the BulletFormat object is set to ppBulletNumbered. Read/write.
Style | Returns or sets the bullet style. Read/write.
Type | Represents the type of bullet. Read/write.
UseTextColor | Determines whether the specified bullets are set to the color of the first text character in the paragraph. Read/write.
UseTextFont | Determines whether the specified bullets are set to the font of the first text character in the paragraph. Read/write.


ProtectedViewWindows.Item Method (PowerPoint)

 Copy code hover
[image]

ProtectedViewWindows.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single ProtectedViewWindow object from the specified ProtectedViewWindows collection.

Syntax

expression .Item(Index)

expression A variable that represents a ProtectedViewWindows object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Integer | The index number of the single ProtectedViewWindow object in the collection to be returned.

Return Value

ProtectedViewWindow

See also

Concepts

ProtectedViewWindows Object

Other resources

ProtectedViewWindows Object Members


Font.AutoRotateNumbers Property (PowerPoint)

 Copy code hover
[image]

Font.AutoRotateNumbers Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets lateral compression. Read/write.

Syntax

expression .AutoRotateNumbers

expression A variable that represents an Font object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | Half-width numbers are not compressed in lateral columns.
msoTrue | Displays half-width numbers within vertical text in two-character lateral columns.

Example

This example sets the text direction of shape three on the first slide to vertical text, and sets lateral column compression.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(3).TextFrame

    .Orientation = msoTextOrientationVerticalFarEast

    .TextRange.Font.AutoRotateNumbers = msoTrue

End With

See also

Concepts

Font Object

Other resources

Font Object Members


Axis.ReversePlotOrder Property (PowerPoint)

 Copy code hover
[image]

Axis.ReversePlotOrder Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if Microsoft Word plots data points from last to first. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ReversePlotOrder

expression A variable that represents an Axis object.

Remarks

You cannot use this property on radar charts.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example plots data points from last to first on the value axis for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.Axes(xlValue).ReversePlotOrder = True

    End If

End With

See also

Concepts

Axis Object

Other resources

Axis Object Members


OLEFormat Methods (PowerPoint)

 Copy code hover
[image]

OLEFormat Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Activate | Activates the specified object.
DoVerb | Requests that an OLE object perform one of its verbs.


Chart.Application Property (PowerPoint)

 Copy code hover
[image]

Chart.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents a Chart object.

See also

Concepts

Chart Object

Other resources

Chart Object Members


CalloutFormat.Drop Property (PowerPoint)

 Copy code hover
[image]

CalloutFormat.Drop Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

For callouts with an explicitly set drop value, this property returns the vertical distance (in points) from the edge of the text bounding box to the place where the callout line attaches to the text box. Read-only.

Syntax

expression .Drop

expression A variable that represents a CalloutFormat object.

Return Value

Single

Remarks

The distance is measured from the top of the text box unless the AutoAttach property is set to True and the text box is to the left of the origin of the callout line (the place that the callout points to). In this case the drop distance is measured from the bottom of the text box.

Use the CustomDrop method to set the value of this property.

The value of this property accurately reflects the position of the callout line attachment to the text box only if the callout has an explicitly set drop value — that is, if the value of the DropType property is msoCalloutDropCustom.

Example

This example replaces the custom drop for shape one on myDocument with one of two preset drops, depending on whether the custom drop value is greater than or less than half the height of the callout text box. For the example to work, shape one must be a callout.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(1).Callout

    If .DropType = msoCalloutDropCustom Then

        If .Drop < .Parent.Height / 2 Then

            .PresetDrop msoCalloutDropTop

        Else

            .PresetDrop msoCalloutDropBottom

        End If

    End If

End With

See also

Concepts

CalloutFormat Object

Other resources

CalloutFormat Object Members


CustomLayout.TimeLine Property (PowerPoint)

 Copy code hover
[image]

CustomLayout.TimeLine Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a TimeLine object that represents the animation timeline for the slide associated with the specified custom layout. Read-only.

Syntax

expression .TimeLine

expression A variable that represents a CustomLayout object.

Return Value

TimeLine

See also

Concepts

CustomLayout Object

Other resources

CustomLayout Object Members


CustomerData Properties (PowerPoint)

 Copy code hover
[image]

CustomerData Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified CustomerData object. Read-only.
Count | Returns the number of CustomXMLPart objects in the CustomerData collection. Read-only.
Parent | Returns the parent object of the specified CustomerData object. Read-only.


Application.ProtectedViewWindowOpen Event (PowerPoint)

 Copy code hover
[image]

Application.ProtectedViewWindowOpen Event (PowerPoint)
See also Send feedback

Published: July 16, 2012

Occurs when a protected view window is opened.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .ProtectedViewWindowOpen(ProtViewWindow, )

expression A variable that represents an Application object.

Parameters

Name | Required/Optional | Data Type | Description
ProtViewWindow | Required | ProtectedViewWindow | The protected view window that is opened.

Return Value

Nothing

See also

Concepts

Application Object

Other resources

Application Object Members


XlDataLabelPosition Enumeration (PowerPoint)

 Copy code hover
[image]

XlDataLabelPosition Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies where the data label is positioned.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlLabelPositionAbove | 0 | The data label is positioned above the data point.
xlLabelPositionBelow | 1 | The data label is positioned below the data point.
xlLabelPositionBestFit | 5 | Word sets the position of the data label.
xlLabelPositionCenter | -4108 | The data label is centered on the data point or is inside a bar or pie chart.
xlLabelPositionCustom | 7 | The data label is in a custom position.
xlLabelPositionInsideBase | 4 | The data label is positioned inside the data point at the bottom edge.
xlLabelPositionInsideEnd | 3 | The data label is positioned inside the data point at the top edge.
xlLabelPositionLeft | -4131 | The data label is positioned to the left of the data point.
xlLabelPositionMixed | 6 | Data labels are in multiple positions.
xlLabelPositionOutsideEnd | 2 | The data label is positioned outside the data point at the top edge.
xlLabelPositionRight | -4152 | The data label is positioned to the right of the data point.


Table.Columns Property (PowerPoint)

 Copy code hover
[image]

Table.Columns Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Columns collection that represents all the columns in a table. Read-only.

Syntax

expression .Columns

expression A variable that represents a Table object.

Return Value

Columns

Remarks

For information about returning a single member of a collection, see Returning an Object from a Collection.

Example

This example displays the shape number, the slide number, and the number of columns in the first table of the active presentation.

VBA Copy code Copy code
Dim ColCount As Integer

Dim sl As Integer

Dim sh As Integer

With ActivePresentation

    For sl = 1 To .Slides.Count

        For sh = 1 To .Slides(sl).Shapes.Count

            If .Slides(sl).Shapes(sh).HasTable Then

                ColCount = .Slides(sl).Shapes(sh) _

                    .Table.Columns.Count

                MsgBox "Shape " & sh & " on slide " & sl & _

                    " contains the first table and has " & _

                    ColCount & " columns."

                Exit Sub

            End If

        Next

    Next

End With

This example tests the selected shape to see if it contains a table. If it does, the code sets the width of column one to 72 points (one inch).

VBA Copy code Copy code
With ActiveWindow.Selection.ShapeRange

    If .HasTable = True Then

       .Table.Columns(1).Width = 72

    End If

End With

See also

Concepts

Table Object

Other resources

Table Object Members


Legend.Application Property (PowerPoint)

 Copy code hover
[image]

Legend.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents a Legend object.

See also

Concepts

Legend Object

Other resources

Legend Object Members


Player.Stop Method (PowerPoint)

 Copy code hover
[image]

Player.Stop Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Stops the media playing in the specified object.

Syntax

expression .Stop

expression A variable that represents a Player object.

See also

Concepts

Player Object

Other resources

Player Object Members


Series.HasErrorBars Property (PowerPoint)

 Copy code hover
[image]

Series.HasErrorBars Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if the series has error bars. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .HasErrorBars

expression A variable that represents a Series object.

Remarks

This property is not available for 3-D charts.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example removes error bars from series one for the first chart in the active document. You should run the example on a 2-D line chart that has error bars for series one.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).HasErrorBars = False

    End If

End With

See also

Concepts

Series Object

Other resources

Series Object Members


Borders.Count Property (PowerPoint)

 Copy code hover
[image]

Borders.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a Borders object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

Borders Object

Other resources

Borders Object Members


FillFormat.Patterned Method (PowerPoint)

 Copy code hover
[image]

FillFormat.Patterned Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets the specified fill to a pattern.

Syntax

expression .Patterned(Pattern)

expression A variable that represents a FillFormat object.

Parameters

Name | Required/Optional | Data Type | Description
Pattern | Required | MsoPatternType | The pattern to be used for the specified fill. See Reamrks for possible values.

Remarks

Use the BackColor and ForeColor properties to set the colors used in the pattern.

The value of the Pattern parameter can be one of these MsoPatternType constants.

msoPattern10Percent

msoPattern20Percent

msoPattern25Percent

msoPattern30Percent

msoPattern40Percent

msoPattern50Percent

msoPattern5Percent

msoPattern60Percent

msoPattern70Percent

msoPattern75Percent

msoPattern80Percent

msoPattern90Percent

msoPatternDarkDownwardDiagonal

msoPatternDarkHorizontal

msoPatternDarkUpwardDiagonal

msoPatternDashedDownwardDiagonal

msoPatternDashedHorizontal

msoPatternDashedUpwardDiagonal

msoPatternDashedVertical

msoPatternDiagonalBrick

msoPatternDivot

msoPatternDottedDiamond

msoPatternDottedGrid

msoPatternHorizontalBrick

msoPatternLargeCheckerBoard

msoPatternLargeConfetti

msoPatternLargeGrid

msoPatternLightDownwardDiagonal

msoPatternLightHorizontal

msoPatternLightUpwardDiagonal

msoPatternLightVertical

msoPatternMixed

msoPatternNarrowHorizontal

msoPatternNarrowVertical

msoPatternOutlinedDiamond

msoPatternPlaid

msoPatternShingle

msoPatternSmallCheckerBoard

msoPatternSmallConfetti

msoPatternSmallGrid

msoPatternSolidDiamond

msoPatternSphere

msoPatternTrellis

msoPatternWave

msoPatternWeave

msoPatternWideDownwardDiagonal

msoPatternWideUpwardDiagonal

msoPatternZigZag

msoPatternDarkVertical

Example

This example adds an oval with a patterned fill to myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddShape(msoShapeOval, 60, 60, 80, 40).Fill

    .ForeColor.RGB = RGB(128, 0, 0)

    .BackColor.RGB = RGB(0, 0, 255)

    .Patterned msoPatternDarkVertical

End With

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


Fonts.Replace Method (PowerPoint)

 Copy code hover
[image]

Fonts.Replace Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Replaces a font in the Fonts collection.

Syntax

expression .Replace(Original, Replacement)

expression A variable that represents a Fonts object.

Parameters

Name | Required/Optional | Data Type | Description
Original | Required | String | The name of the font to replace.
Replacement | Required | String | The name of the replacement font.

Example

This example replaces the Times New Roman font with the Courier font in the active presentation.

VBA Copy code Copy code
Application.ActivePresentation.Fonts _

    .Replace Original:="Times New Roman", Replacement:="Courier"

See also

Concepts

Fonts Object

Other resources

Fonts Object Members


PageSetup.SlideWidth Property (PowerPoint)

 Copy code hover
[image]

PageSetup.SlideWidth Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the slide width, in points. Read/write.

Syntax

expression .SlideWidth

expression A variable that represents a PageSetup object.

Return Value

Single

Example

This example sets the slide height to 8.5 inches and the slide width to 11 inches for the active presentation.

VBA Copy code Copy code
With Application.ActivePresentation.PageSetup

    .SlideWidth = 11 * 72

    .SlideHeight = 8.5 * 72

End With

See also

Concepts

PageSetup Object

Other resources

PageSetup Object Members


PrintOptions.OutputType Property (PowerPoint)

 Copy code hover
[image]

PrintOptions.OutputType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a value that indicates which component (slides, handouts, notes pages, or an outline) of the presentation is to be printed. Read/write.

Syntax

expression .OutputType

expression A variable that represents an PrintOptions object.

Return Value

PpPrintOutputType

Remarks

The value of the OutputType property can be one of these PpPrintOutputType constants.

ppPrintOutputBuildSlides

ppPrintOutputFourSlideHandouts

ppPrintOutputNineSlideHandouts

ppPrintOutputNotesPages

ppPrintOutputOneSlideHandouts

ppPrintOutputOutline

ppPrintOutputSixSlideHandouts

ppPrintOutputSlides

ppPrintOutputThreeSlideHandouts

ppPrintOutputTwoSlideHandouts

Example

This example prints handouts of the active presentation with six slides to a page.

VBA Copy code Copy code
With ActivePresentation

    .PrintOptions.OutputType = ppPrintOutputSixSlideHandouts

    .PrintOut

End With

See also

Concepts

PrintOptions Object

Other resources

PrintOptions Object Members


PrintRange.Delete Method (PowerPoint)

 Copy code hover
[image]

PrintRange.Delete Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Deletes the specified PrintRange object.

Syntax

expression .Delete

expression A variable that represents a PrintRange object.

See also

Concepts

PrintRange Object

Other resources

PrintRange Object Members


SlideShowView.GetClickIndex Method (PowerPoint)

 Copy code hover
[image]

SlideShowView.GetClickIndex Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the index number of the current mouse click for an animation that is actively playing on a slide or has just finished.

Syntax

expression .GetClickIndex

expression A variable that represents a SlideShowView object.

Return Value

Long

Remarks

Use the GetClickCount method to return the number of mouse clicks that are defined for a slide.

If a slide has no animations or if a user has not advanced yet to an animation, the GetClickIndex method returns 0. If a slide has an animation that runs automatically and the user moves to the previous page, the GetClickIndex method returns msoClickStateBeforeAutomaticAnimations.

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


ActionSetting.SlideShowName Property (PowerPoint)

 Copy code hover
[image]

ActionSetting.SlideShowName Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the name of the custom slide show to run in response to a mouse action on the shape during a slide show. Read/write.

Syntax

expression .SlideShowName

expression A variable that represents an ActionSetting object.

Return Value

String

See also

Concepts

ActionSetting Object

Other resources

ActionSetting Object Members


Floor.Name Property (PowerPoint)

 Copy code hover
[image]

Floor.Name Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the name of the object. Read-only String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Name

expression A variable that represents a Floor object.

See also

Concepts

Floor Object

Other resources

Floor Object Members


FillFormat.PresetTexture Property (PowerPoint)

 Copy code hover
[image]

FillFormat.PresetTexture Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the preset texture for the specified fill. Read-only.

Syntax

expression .PresetTexture

expression A variable that represents a FillFormat object.

Return Value

MsoPresetTexture

Remarks

The value of the PresetTexture property can be one of these MsoPresetTexture constants.

msoPresetTextureMixed

msoTextureBlueTissuePaper

msoTextureBouquet

msoTextureBrownMarble

msoTextureCanvas

msoTextureCork

msoTextureDenim

msoTextureFishFossil

msoTextureGranite

msoTextureGreenMarble

msoTextureMediumWood

msoTextureNewsprint

msoTextureOak

msoTexturePaperBag

msoTexturePapyrus

msoTextureParchment

msoTexturePinkTissuePaper

msoTexturePurpleMesh

msoTextureRecycledPaper

msoTextureSand

msoTextureStationery

msoTextureWalnut

msoTextureWaterDroplets

msoTextureWhiteMarble

msoTextureWovenMat

Example

This example adds a rectangle to the myDocument and sets its preset texture to match that of shape two. For the example to work, shape two must have a preset textured fill.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    presetTexture2 = .Item(2).Fill.PresetTexture

    .AddShape(msoShapeRectangle, 100, 0, 40, 80).Fill _

        .PresetTextured presetTexture2

End With

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


SlideShowView.FirstAnimationIsAutomatic Method (PowerPoint)

 Copy code hover
[image]

SlideShowView.FirstAnimationIsAutomatic Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns True if the current slide has an initial animation that runs automically.

Syntax

expression .FirstAnimationIsAutomatic

expression A variable that represents a SlideShowView object.

Return Value

Boolean

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


ShapeRange.Fill Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.Fill Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a FillFormat object that contains fill formatting properties for the specified shape. Read-only.

Syntax

expression .Fill

expression A variable that represents a ShapeRange object.

Return Value

FillFormat

Example

This example adds a rectangle to myDocument and then sets the foreground color, background color, and gradient for the rectangle's fill.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes _

        .AddShape(msoShapeRectangle, 90, 90, 90, 50).Fill

    .ForeColor.RGB = RGB(128, 0, 0)

    .BackColor.RGB = RGB(170, 170, 170)

    .TwoColorGradient msoGradientHorizontal, 1

End With

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


AxisTitle.Width Property (PowerPoint)

 Copy code hover
[image]

AxisTitle.Width Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Double value that represents the width, in points, of the object. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Width

expression A variable that represents an AxisTitle object.

Return Value

Double

See also

Concepts

AxisTitle Object

Other resources

AxisTitle Object Members


AddIn.Registered Property (PowerPoint)

 Copy code hover
[image]

AddIn.Registered Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the specified add-in is registered in the Windows registry. Read/write.

Syntax

expression .Registered

expression A variable that represents a AddIn object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified add-in is not registered in the Windows registry.
msoTrue | The specified add-in is registered in the Windows registry.

Example

This example registers the add-in named "MyTools" in the Windows registry.

VBA Copy code Copy code
Application.Addins("MyTools").Registered = msoTrue

See also

Concepts

AddIn Object

Other resources

AddIn Object Members


Shape.Apply Method (PowerPoint)

 Copy code hover
[image]

Shape.Apply Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Applies to the specified shape formatting that's been copied by using the PickUp method.

Syntax

expression .Apply

expression A variable that represents a Shape object.

Example

This example copies the formatting of shape one on myDocument, and then applies the copied formatting to shape two.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument

    .Shapes(1).PickUp

    .Shapes(2).Apply

End With

See also

Concepts

Shape Object

Other resources

Shape Object Members


ColorScheme.Application Property (PowerPoint)

 Copy code hover
[image]

ColorScheme.Application Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a ColorScheme object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

ColorScheme Object

Other resources

ColorScheme Object Members


SectionProperties Properties (PowerPoint)

 Copy code hover
[image]

SectionProperties Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object. Read-only.


Master.TextStyles Property (PowerPoint)

 Copy code hover
[image]

Master.TextStyles Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a TextStyles collection that represents three text styles — title text, body text, and default text — for the specified slide master. Read-only.

Syntax

expression .TextStyles

expression A variable that represents a Master object.

Return Value

TextStyles

Remarks

For information about returning a single member of a collection, see Returning an Object from a Collection.

Example

This example sets the font name and font size for level-one body text on slides in the active presentation.

VBA Copy code Copy code
With ActivePresentation.SlideMaster_

        .TextStyles(ppBodyStyle).Levels(1)

    With .Font

        .Name = "arial"

        .Size = 36

    End With

End With

See also

Concepts

Master Object

Other resources

Master Object Members


TextFrame2.Orientation Property (PowerPoint)

 Copy code hover
[image]

TextFrame2.Orientation Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets text orientation. Read/write.

Syntax

expression .Orientation

expression An expression that returns a TextFrame2 object.

Return Value

MsoTextOrientation

Remarks

The value of the Orientation property can be one of these MsoTextOrientation constants.

msoTextOrientationDownward

msoTextOrientationHorizontal

msoTextOrientationHorizontalRotatedFarEast

msoTextOrientationMixed

msoTextOrientationUpward

msoTextOrientationVertical

msoTextOrientationVerticalFarEast

Note Note

Some of these constants may not be available to you, depending on the language support (U.S. English, for example) that you've selected or installed.

Example

This example shows how to orient the text horizontally in shape one on slide one in the active presentation.

VBA Copy code Copy code
Public Sub Orientation_Example()

    Dim pptSlide As Slide

    Set pptSlide = ActivePresentation.Slides(1)

    pptSlide.Shapes(1).TextFrame2.Orientation = msoTextOrientationHorizontal

End Sub

See also

Concepts

TextFrame2 Object

Other resources

TextFrame2 Object Members


FillFormat.TextureVerticalScale Property (PowerPoint)

 Copy code hover
[image]

FillFormat.TextureVerticalScale Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the vertical scaling factor for the texture fill. Read/write.

Syntax

expression .TextureVerticalScale

expression An expression that returns a FillFormat object.

Return Value

Single

Remarks

The setting of the TextureVerticalScale property corresponds to the setting of the Scale Y box under Tiling Options on the Fill pane of the Format Picture dialog box in the Microsoft PowerPoint user interface (under Drawing Tools, on the Format Tab, in the Shape Styles group, click Format Shape.)

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


Slides.Parent Property (PowerPoint)

 Copy code hover
[image]

Slides.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a Slides object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

Slides Object

Other resources

Slides Object Members


ChartData Properties (PowerPoint)

 Copy code hover
[image]

ChartData Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
IsLinked | True if the data for the chart is linked to an external Microsoft Excel workbook. Read-only Boolean.
Workbook | Returns the workbook that contains the chart data associated with the chart. Read-only Object.


Guides Object (PowerPoint)

 Copy code hover
[image]

Guides Object (PowerPoint)
Send feedback

A collection of Guide objects in a presentation or custom layout.

Version information

Version Added: PowerPoint 2013


PublishObjects Methods (PowerPoint)

 Copy code hover
[image]

PublishObjects Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Item | Returns a single PublishObject object from the specified PublishObjects collection.


Columns Properties (PowerPoint)

 Copy code hover
[image]

Columns Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


ShapeNodes.Parent Property (PowerPoint)

 Copy code hover
[image]

ShapeNodes.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a ShapeNodes object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

ShapeNodes Object

Other resources

ShapeNodes Object Members


Font.Emboss Property (PowerPoint)

 Copy code hover
[image]

Font.Emboss Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the character format is embossed. Read/write.

Syntax

expression .Emboss

expression A variable that represents an Font object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The character format is not embossed.
msoTriStateMixed | The specified text range contains both embossed and unembossed characters.
msoTrue | The character format is embossed.

Example

This example sets the title text on slide one to embossed.

VBA Copy code Copy code
Application.ActivePresentation.Slides(1).Shapes.Title _

    .TextFrame.TextRange.Font.Emboss = msoTrue

See also

Concepts

Font Object

Other resources

Font Object Members


ChartGroup.Creator Property (PowerPoint)

 Copy code hover
[image]

ChartGroup.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents a ChartGroup object.

See also

Concepts

ChartGroup Object

Other resources

ChartGroup Object Members


PlaySettings.Application Property (PowerPoint)

 Copy code hover
[image]

PlaySettings.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a PlaySettings object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

PlaySettings Object

Other resources

PlaySettings Object Members


SlideShowView.State Property (PowerPoint)

 Copy code hover
[image]

SlideShowView.State Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the state of the slide show. Read/write.

Syntax

expression .State

expression A variable that represents a SlideShowView object.

Return Value

PpSlideShowState

Remarks

The value of the State property can be one of these PpSlideShowState constants.

ppSlideShowBlackScreen

ppSlideShowDone

ppSlideShowPaused

ppSlideShowRunning

ppSlideShowWhiteScreen

Example

This example sets the view state in slide show window one to a black screen.

VBA Copy code Copy code
SlideShowWindows(1).View.State = ppSlideShowBlackScreen

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


ChartFont.Size Property (PowerPoint)

 Copy code hover
[image]

ChartFont.Size Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the size of the font. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Size

expression A variable that represents a ChartFont object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the font size for the title of the first chart in the active document to 12 points.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.Title.Characters.Font.Size = 12

    End If

End With

See also

Concepts

ChartFont Object

Other resources

ChartFont Object Members


Shapes.HasTitle Property (PowerPoint)

 Copy code hover
[image]

Shapes.HasTitle Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns whether the collection of objects on the specified slide contains a title placeholder. Read-only.

Syntax

expression .HasTitle

expression A variable that represents a Shapes object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The collection of objects on the specified slide does not contain a title placeholder.
msoTrue | The collection of objects on the specified slide contains a title placeholder.

Example

This example restores the title placeholder to slide one in the active presentation if this placeholder has been deleted. The text of the restored title is "Restored title."

VBA Copy code Copy code
With ActivePresentation.Slides(1)

    If .Layout <> ppLayoutBlank Then

        With .Shapes

            If Not .HasTitle Then

                .AddTitle.TextFrame.TextRange _

                    .Text = "Restored title"

            End If

        End With

    End If

End With

See also

Concepts

Shapes Object

Other resources

Shapes Object Members


UpBars.Name Property (PowerPoint)

 Copy code hover
[image]

UpBars.Name Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the name of the object. Read-only String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Name

expression A variable that represents an UpBars object.

See also

Concepts

UpBars Object

Other resources

UpBars Object Members


Slide.MoveToSectionStart Method (PowerPoint)

 Copy code hover
[image]

Slide.MoveToSectionStart Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Moves the current slide to the start of the specified section.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .MoveToSectionStart(toSection)

expression A variable that represents a Slide object.

Parameters

Name | Required/Optional | Data Type | Description
toSection | Required | [INT] | The section to move to.

See also

Concepts

Slide Object

Other resources

Slide Object Members


Panes.Application Property (PowerPoint)

 Copy code hover
[image]

Panes.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a Panes object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

Panes Object

Other resources

Panes Object Members


Master.Height Property (PowerPoint)

 Copy code hover
[image]

Master.Height Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the height of the specified object, in points. Read-only.

Syntax

expression .Height

expression A variable that represents a Master object.

Return Value

Single

Remarks

The Height property of a Shape object returns or sets the height of the forward-facing surface of the specified shape. This measurement doesn't include shadows or 3-D effects.

Example

This example sets the height of document window two to half the height of the application window.

VBA Copy code Copy code
Windows(2).Height = Application.Height / 2

This example sets the height for row two in the specified table to 100 points (72 points per inch).

VBA Copy code Copy code
ActivePresentation.Slides(2).Shapes(5).Table.Rows(2).Height = 100

See also

Concepts

Master Object

Other resources

Master Object Members


Application.ActiveWindow Property (PowerPoint)

 Copy code hover
[image]

Application.ActiveWindow Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a DocumentWindow object that represents the active document window. Read-only.

Syntax

expression .ActiveWindow

expression A variable that represents an Application object.

Return Value

DocumentWindow

Example

This example minimizes the active window.

VBA Copy code Copy code
Application.ActiveWindow.WindowState = ppWindowMinimized

See also

Concepts

Application Object

Other resources

Application Object Members


MsoAnimFilterEffectType Enumeration (PowerPoint)

 Copy code hover
[image]

MsoAnimFilterEffectType Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Constants that specify the type of animation filter effect, passed to and returned by the Type property of the FilterEffect object.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
msoAnimFilterEffectTypeBarn | 1 | Barn
msoAnimFilterEffectTypeBlinds | 2 | Blinds
msoAnimFilterEffectTypeBox | 3 | Box
msoAnimFilterEffectTypeCheckerboard | 4 | Checkerboard
msoAnimFilterEffectTypeCircle | 5 | Circle
msoAnimFilterEffectTypeDiamond | 6 | Diamond
msoAnimFilterEffectTypeDissolve | 7 | Dissolve
msoAnimFilterEffectTypeFade | 8 | Fade
msoAnimFilterEffectTypeImage | 9 | Image
msoAnimFilterEffectTypeNone | 0 | No effect
msoAnimFilterEffectTypePixelate | 10 | Pixelate
msoAnimFilterEffectTypePlus | 11 | Plus
msoAnimFilterEffectTypeRandomBar | 12 | Random bars
msoAnimFilterEffectTypeSlide | 13 | Slide
msoAnimFilterEffectTypeStretch | 14 | Stretch
msoAnimFilterEffectTypeStrips | 15 | Strips
msoAnimFilterEffectTypeWedge | 16 | Wedge
msoAnimFilterEffectTypeWheel | 17 | Wheel
msoAnimFilterEffectTypeWipe | 18 | Wipe


SlideShowSettings.LoopUntilStopped Property (PowerPoint)

 Copy code hover
[image]

SlideShowSettings.LoopUntilStopped Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether specified slide show loops continuously until the user presses ESC. Read/write.

Syntax

expression .LoopUntilStopped

expression A variable that represents a SlideShowSettings object.

Remarks

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

Constant | Description
msoFalse | The specified slide show does not loop continuously.
msoTrue | The specified slide show loops continuously until the user presses ESC.

Example

This example starts a slide show of the active presentation that will automatically advance the slides (using the stored timings) and will loop continuously through the presentation until the user presses ESC.

VBA Copy code Copy code
With ActivePresentation.SlideShowSettings

    .AdvanceMode = ppSlideShowUseSlideTimings

    .LoopUntilStopped = msoTrue

    .Run

End With

See also

Concepts

SlideShowSettings Object

Other resources

SlideShowSettings Object Members


TextFrame.AutoSize Property (PowerPoint)

 Copy code hover
[image]

TextFrame.AutoSize Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a value that indicates whether the size of the specified shape is changed automatically to fit text within its boundaries. Read/write.

Syntax

expression .AutoSize

expression A variable that represents an TextFrame object.

Return Value

PpAutoSize

Remarks

The value of the AutoSize property can be one of these PpAutoSize constants.

ppAutoSizeMixed

ppAutoSizeNone

ppAutoSizeShapeToFitText

Example

This example adjusts the size of the title bounding box on slide one to fit the title text.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(1)

    If .TextFrame.TextRange.Characters.Count < 50 Then

        .TextFrame.AutoSize = ppAutoSizeShapeToFitText

    End If

End With

See also

Concepts

TextFrame Object

Other resources

TextFrame Object Members


SlideRange.ApplyTheme Method (PowerPoint)

 Copy code hover
[image]

SlideRange.ApplyTheme Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Applies a theme or design template to the specified range of slides.

Syntax

expression .ApplyTheme(themeName)

expression A variable that represents a SlideRange object.

Parameters

Name | Required/Optional | Data Type | Description
themeName | Required | String | The path and name of the theme file (.thmx) or design template file (.pot) to apply to the SlideRange object.

Example

This example applies a saved theme to the specified range of slides:

VBA Copy code Copy code
ActivePresentation.Slides.Range(Array(1, 3)).ApplyTheme "C:\Program Files\Microsoft Office\Templates\MyTheme.thmx"

This example applies a saved design template to the specified range of slides:

VBA Copy code Copy code
ActivePresentation.Slides.Range(Array(1, 3)).ApplyTheme "C:\Program Files\Microsoft Office\Templates\MyTheme.pot"

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


TabStops Properties (PowerPoint)

 Copy code hover
[image]

TabStops Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
DefaultSpacing | Returns or sets the default tab-stop spacing for the specified text, in points. Read/write.
Parent | Returns the parent object for the specified object.


Player.Play Method (PowerPoint)

 Copy code hover
[image]

Player.Play Method (PowerPoint)
Send feedback

Begins playback for the specified media.

Version information

Version Added: PowerPoint 2013

Syntax

expression .Play

expression A variable that represents a Player object.

Return value

VOID


Coauthoring Properties (PowerPoint)

 Copy code hover
[image]

Coauthoring Properties (PowerPoint)
Send feedback

Published: July 12, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
FavorServerEditsDuringMerge | Gets or sets whether the merged document favors server-side edits when conflicts occur. Read/write.
MergeMode | Returns True if the application is in merge mode. Read-only.
Parent | Returns the parent object for the specified object. Read-only.
PendingUpdates | Returns True if merge-mode updates are pending. Read-only.


HeadersFooters.Application Property (PowerPoint)

 Copy code hover
[image]

HeadersFooters.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a HeadersFooters object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

HeadersFooters Object

Other resources

HeadersFooters Object Members


ShapeNodes Members (PowerPoint)

 Copy code hover
[image]

ShapeNodes Members (PowerPoint)
Send feedback

Published: July 16, 2012

A collection of all the ShapeNode objects in the specified freeform.

Methods

Name | Description
Delete | Deletes a shape node.
Insert | Inserts a new segment after the specified node of the freeform.
Item | Returns a single ShapeNode object from the specified ShapeNodes collection.
SetEditingType | Sets the editing type of the specified node.
SetPosition | Sets the location of the node specified by Index. Note that, depending on the editing type of the node, this method may affect the position of adjacent nodes.
SetSegmentType | Sets the segment type of the segment that follows the specified node.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
Parent | Returns the parent object for the specified object.


AnimationSettings.AdvanceMode Property (PowerPoint)

 Copy code hover
[image]

AnimationSettings.AdvanceMode Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets a value that indicates whether the specified shape animation advances only when clicked or automatically after a specified amount of time. Read/write.

Syntax

expression .AdvanceMode

expression A variable that represents an AnimationSettings object.

Remarks

If your shape doesn't become animated, make sure that the TextLevelEffect property is set to a value other than ppAnimateLevelNone and that the Animate property is set to True.

The value of the AdvanceMode property can be one of these PpAdvanceMode constants.

ppAdvanceModeMixed

ppAdvanceOnClick

ppAdvanceOnTime

Example

This example sets shape two on slide one in the active presentation to become animated automatically after five seconds.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(2).AnimationSettings

    .AdvanceMode = ppAdvanceOnTime

    .AdvanceTime = 5

    .TextLevelEffect = ppAnimateByAllLevels

    .Animate = True

End With

See also

Concepts

AnimationSettings Object

Other resources

AnimationSettings Object Members


Walls.Select Method (PowerPoint)

 Copy code hover
[image]

Walls.Select Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Selects the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Select

expression A variable that represents a Walls object.

See also

Concepts

Walls Object

Other resources

Walls Object Members


XlAxisCrosses Enumeration (PowerPoint)

 Copy code hover
[image]

XlAxisCrosses Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the point on the specified axis where the other axis crosses.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlAxisCrossesAutomatic | -4105 | Word sets the axis crossing point.
xlAxisCrossesCustom | -4114 | The CrossesAt property specifies the axis crossing point.
xlAxisCrossesMaximum | 2 | The axis crosses at the maximum value.
xlAxisCrossesMinimum | 4 | The axis crosses at the minimum value.


Guide.Parent Property (PowerPoint)

 Copy code hover
[image]

Guide.Parent Property (PowerPoint)
Send feedback

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2013

Syntax

expression .Parent

expression A variable that represents a Guide object.


Point.Select Method (PowerPoint)

 Copy code hover
[image]

Point.Select Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Selects the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Select

expression A variable that represents a Point object.

See also

Concepts

Point Object

Other resources

Point Object Members


Shape.Shadow Property (PowerPoint)

 Copy code hover
[image]

Shape.Shadow Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a ShadowFormat object that contains shadow formatting properties for the specified shape. Read-only.

Syntax

expression .Shadow

expression A variable that represents a Shape object.

Example

This example adds a shadowed rectangle to slide one in the active presentation. The blue, embossed shadow is offset 3 points to the right of and 2 points down from the rectangle.

VBA Copy code Copy code
Set myShap = Application.ActivePresentation.Slides(1).Shapes

With myShap.AddShape(msoShapeRectangle, 10, 10, 150, 90).Shadow

    .Type = msoShadow17

    .ForeColor.RGB = RGB(0, 0, 128)

    .OffsetX = 3

    .OffsetY = 2

End With

See also

Concepts

Shape Object

Other resources

Shape Object Members


MsoClickState Enumeration (PowerPoint)

 Copy code hover
[image]

MsoClickState Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Constants that specify the point in a slide show to navigate to, relative to the animations included in the show, passed to the GotoClick method of the SlideShowView object, and returned by the GetClickIndex method of that object.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
msoClickStateAfterAllAnimations | -2 | After all animations.
msoClickStateBeforeAutomaticAnimations | -1 | Before automatic animations.


FreeformBuilder.Application Property (PowerPoint)

 Copy code hover
[image]

FreeformBuilder.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a FreeformBuilder object.

Return Value

Object

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

FreeformBuilder Object

Other resources

FreeformBuilder Object Members


DataLabels.HorizontalAlignment Property (PowerPoint)

 Copy code hover
[image]

DataLabels.HorizontalAlignment Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the horizontal alignment for the specified object. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .HorizontalAlignment

expression A variable that represents a DataLabels object.

Remarks

You can set the value of this property to one of the following XlConstants constants:

  • xlCenter

  • xlDistributed

  • xlJustify

  • xlLeft

  • xlRight

Some of these constants may not be available to you, depending on the language support (for example, U.S. English) that you have selected or installed.

See also

Concepts

DataLabels Object

Other resources

DataLabels Object Members


Series.Name Property (PowerPoint)

 Copy code hover
[image]

Series.Name Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the name of the object. Read/write String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Name

expression A variable that represents a Series object.

See also

Concepts

Series Object

Other resources

Series Object Members


ChartTitle.Delete Method (PowerPoint)

 Copy code hover
[image]

ChartTitle.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Delete

expression A variable that represents a ChartTitle object.

See also

Concepts

ChartTitle Object

Other resources

ChartTitle Object Members


Row.Application Property (PowerPoint)

 Copy code hover
[image]

Row.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a Row object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

Row Object

Other resources

Row Object Members


ChartArea.Format Property (PowerPoint)

 Copy code hover
[image]

ChartArea.Format Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Format

expression A variable that represents a ChartArea object.

See also

Concepts

ChartArea Object

Other resources

ChartArea Object Members


PpWindowState Enumeration (PowerPoint)

 Copy code hover
[image]

PpWindowState Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Constants that specify the window state, passed to and returned by the WindowState property of the DocumentWindow object.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppWindowMaximized | 3 | Maximized
ppWindowMinimized | 2 | Minimized
ppWindowNormal | 1 | Normal


Point.Width Property (PowerPoint)

 Copy code hover
[image]

Point.Width Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the width, in points, of the object. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Width

expression A variable that represents a Point object.

Return Value

Double

See also

Concepts

Point Object

Other resources

Point Object Members


ShapeRange.ScaleWidth Method (PowerPoint)

 Copy code hover
[image]

ShapeRange.ScaleWidth Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Scales the width of the shapes in the range by a specified factor.

Syntax

expression .ScaleWidth(Factor, RelativeToOriginalSize, fScale)

expression A variable that represents a ShapeRange object.

Parameters

Name | Required/Optional | Data Type | Description
Factor | Required | Single | Specifies the ratio between the width of the shapes after you resize them and the current or original width. For example, to make all the shapes in the range 50 percent larger, specify 1.5 for this parameter.
RelativeToOriginalSize | Required | MsoTriState | Specifies whether shapes are scaled relative to their current or original size.
fScale | Optional | MsoScaleFrom | The parts of the shapes that retain their positions when the shapes are scaled.

Remarks

For pictures and OLE objects, you can indicate whether you want to scale the shapes relative to the original size or relative to the current size. Shapes other than pictures and OLE objects are always scaled relative to their current width.

The RelativeToOriginalSize parameter value can be one of the following MsoTriState constants. You can specify msoTrue for this parameter only if the specified shapes are pictures or OLE objects.

Constant | Description
msoFalse | Scales the shape relative to its current size.
msoTrue | Scales the shape relative to its original size.

The fScale parameter value can be one of the following MsoScaleFrom constants. The default is msoScaleFromTopLeft.

msoScaleFromBottomRight

msoScaleFromMiddle

msoScaleFromTopLeft

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


DataLabels.ShowCategoryName Property (PowerPoint)

 Copy code hover
[image]

DataLabels.ShowCategoryName Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True to display the category name for the data labels on a chart. False to hide the name. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ShowCategoryName

expression A variable that represents a DataLabels object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example shows the category name for the data labels of the first series on the first chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).DataLabels. _

            ShowCategoryName = True

    End If

End With

See also

Concepts

DataLabels Object

Other resources

DataLabels Object Members


Guide Members (PowerPoint)

 Copy code hover
[image]

Guide Members (PowerPoint)
Send feedback

Represents a drawing guide in the presentation or custom layout.

Methods

Name | Description
Delete | Removes the drawing guide from the presentation or custom layout.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Color | Returns a ColorFormat object that represents the color of the drawing guide. Read-only.
Orientation | Returns the orientation of the drawing guide (horizontal or vertical) as a constant from the PpGuideOrientation enumeration. Read-only.
Parent | Returns the parent for the specified object. Read-only Object.
Position | Returns or sets a Single that represents the position of the drawing guide along the x- or y-axis. Read/write.


Selection.Delete Method (PowerPoint)

 Copy code hover
[image]

Selection.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the specified Selection object.

Syntax

expression .Delete

expression A variable that represents a Selection object.

See also

Concepts

Selection Object

Other resources

Selection Object Members


ShapeRange.Child Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.Child Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

MsoTrue if the shape is a child shape or if all shapes in a shape range are child shapes of the same parent. Read-only.

Syntax

expression .Child

expression A variable that represents a ShapeRange object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The shape is not a child shape or, if a shape range, all child shapes do not belong to the same parent.
msoTrue | The shape is a child shape or, if a shape range, all child shapes belong to the same parent.

Example

This example selects the first shape in the canvas, and if the selected shape is a child shape, fills the shape with the specified color. This example assumes that the first shape in the active presentation is a drawing canvas that contains multiple shapes.

VBA Copy code Copy code
Sub FillChildShape()

    'Select the first shape in the drawing canvas

    ActivePresentation.Slides(1).Shapes(1).CanvasItems(1).Select

    'Fill selected shape if it is a child shape

    With ActiveWindow.Selection

        If .ShapeRange.Child = msoTrue Then

            .ShapeRange.Fill.ForeColor.RGB = RGB(Red:=100, Green:=0, Blue:=200)

        Else

            MsgBox "This shape is not a child shape."

        End If

    End With

End Sub

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


LegendKey.MarkerBackgroundColorIndex Property (PowerPoint)

 Copy code hover
[image]

LegendKey.MarkerBackgroundColorIndex Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the marker background color as an index into the current color palette, or as one of the following XlColorIndex constants: xlColorIndexAutomatic or xlColorIndexNone. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .MarkerBackgroundColorIndex

expression A variable that represents a LegendKey object.

Remarks

This property applies only to line, scatter, and radar charts.

See also

Concepts

LegendKey Object

Other resources

LegendKey Object Members


Timing.Application Property (PowerPoint)

 Copy code hover
[image]

Timing.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a Timing object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

Timing Object

Other resources

Timing Object Members


Presentation.NotesMaster Property (PowerPoint)

 Copy code hover
[image]

Presentation.NotesMaster Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Master object that represents the notes master. Read-only.

Syntax

expression .NotesMaster

expression A variable that represents a Presentation object.

Return Value

Master

Example

This example sets the header and footer text for the notes master for the active presentation.

VBA Copy code Copy code
With Application.ActivePresentation. NotesMaster.HeadersFooters
    .Header.Text = "Employee Guidelines"
    .Footer.Text = "Volcano Coffee"
End With

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


RulerLevels Object (PowerPoint)

 Copy code hover
[image]

RulerLevels Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

A collection of all the RulerLevel objects on the specified ruler.

Remarks

Each RulerLevel object represents the first-line and left indent for text at a particular outline level. This collection always contains five members — one for each of the available outline levels.

Example

Use the Levels property to return the RulerLevels collection. The following example sets the margins for the five outline levels in body text in the active presentation.

VBA Copy code Copy code
With ActivePresentation.SlideMaster.TextStyles(ppBodyStyle).Ruler

    .Levels(1).FirstMargin = 0

    .Levels(1).LeftMargin = 40

    .Levels(2).FirstMargin = 60

    .Levels(2).LeftMargin = 100

    .Levels(3).FirstMargin = 120

    .Levels(3).LeftMargin = 160

    .Levels(4).FirstMargin = 180

    .Levels(4).LeftMargin = 220

    .Levels(5).FirstMargin = 240

    .Levels(5).LeftMargin = 280

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

RulerLevels Object Members


DataLabel.Height Property (PowerPoint)

 Copy code hover
[image]

DataLabel.Height Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the height, in points, of the object. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Height

expression A variable that represents a DataLabel object.

Return Value

Double

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


OLEFormat.ObjectVerbs Property (PowerPoint)

 Copy code hover
[image]

OLEFormat.ObjectVerbs Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a ObjectVerbs collection that contains all the OLE verbs for the specified OLE object. Read-only.

Syntax

expression .ObjectVerbs

expression A variable that represents an OLEFormat object.

Return Value

ObjectVerbs

Example

This example displays all the available verbs for the OLE object contained in shape one on slide two in the active presentation. For this example to work, shape one must be a shape that represents an OLE object.

VBA Copy code Copy code
With ActivePresentation.Slides(2).Shapes(1).OLEFormat

    For Each v In .ObjectVerbs

        MsgBox v

    Next

End With

This example specifies that the OLE object represented by shape one on slide two in the active presentation will open when it is clicked during a slide show if "Open" is one of the OLE verbs for that object. For this example to work, shape one must be a shape that represents an OLE object.

VBA Copy code Copy code
With ActivePresentation.Slides(2).Shapes(1)

    For Each sVerb In .OLEFormat.ObjectVerbs

        If sVerb = "Open" Then

            With .ActionSettings(ppMouseClick)

                .Action = ppActionOLEVerb

                .ActionVerb = sVerb

            End With

            Exit For

        End If

    Next

End With

See also

Concepts

OLEFormat Object

Other resources

OLEFormat Object Members


CalloutFormat.Accent Property (PowerPoint)

 Copy code hover
[image]

CalloutFormat.Accent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether a vertical accent bar separates the callout text from the callout line. Read/write.

Syntax

expression .Accent

expression A variable that represents an CalloutFormat object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | A vertical accent bar does not separate the callout text from the callout line.
msoTrue | A vertical accent bar separates the callout text from the callout line.

Example

This example adds to myDocument an oval and a callout that points to the oval. The callout text won't have a border, but it will have a vertical accent bar that separates the text from the callout line.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    .AddShape msoShapeOval, 180, 200, 280, 130

    With .AddCallout(msoCalloutTwo, 420, 170, 170, 40)

        .TextFrame.TextRange.Text = "My oval"

        With .Callout

            .Accent = msoTrue

            .Border = msoFalse

        End With

    End With

End With

See also

Concepts

CalloutFormat Object

Other resources

CalloutFormat Object Members


DisplayUnitLabel.Height Property (PowerPoint)

 Copy code hover
[image]

DisplayUnitLabel.Height Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the height, in points, of the object. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Height

expression A variable that represents a DisplayUnitLabel object.

Return Value

Double

See also

Concepts

DisplayUnitLabel Object

Other resources

DisplayUnitLabel Object Members


TableStyle.Id Property (PowerPoint)

 Copy code hover
[image]

TableStyle.Id Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a string that identifies the table style. Read-only.

Syntax

expression .Id

expression A variable that represents a TableStyle object.

Return Value

String

See also

Concepts

TableStyle Object

Other resources

TableStyle Object Members


Shape.Cut Method (PowerPoint)

 Copy code hover
[image]

Shape.Cut Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the specified object and places it on the Clipboard.

Syntax

expression .Cut

expression A variable that represents a Shape object.

Example

This example deletes shapes one and two from slide one in the active presentation, places copies of them on the Clipboard, and then pastes the copies onto slide two.

VBA Copy code Copy code
With ActivePresentation

    .Slides(1).Shapes.Range(Array(1, 2)).Cut

    .Slides(2).Shapes.Paste

End With

See also

Concepts

Shape Object

Other resources

Shape Object Members


PrintOptions Members (PowerPoint)

 Copy code hover
[image]

PrintOptions Members (PowerPoint)
Send feedback

Published: July 16, 2012

Contains print options for a presentation.

Properties

Name | Description
ActivePrinter | Returns the name of the active printer. Read-only.
Application | Returns an Application object that represents the creator of the specified object.
Collate | Determines whether a complete copy of the specified presentation is printed before the first page of the next copy is printed. Read/write.
FitToPage | Determines whether the slides will be scaled to fill the page they're printed on. Read/write.
FrameSlides | Determines whether a thin frame is placed around the border of the printed slides. Read/write.
HandoutOrder | Returns or sets the page layout order in which slides appear on printed handouts that show multiple slides on one page. Read/write.
HighQuality | Indicates whether to print in high quality. Read/write.
NumberOfCopies | Returns or sets the number of copies of a presentation to be printed. Read/write.
OutputType | Returns or sets a value that indicates which component (slides, handouts, notes pages, or an outline) of the presentation is to be printed. Read/write.
Parent | Returns the parent object for the specified object.
PrintColorType | Returns or sets the way the specified document will be printed: in black and white, in pure black and white (also referred to as high contrast), or in color. Read/write.
PrintComments | Sets or returns whether comments will be printed. Read/write.
PrintFontsAsGraphics | Determines whether TrueType fonts are printed as graphics. Read/write.
PrintHiddenSlides | Determines whether hidden slides in the specified presentation will be printed. Read/write.
PrintInBackground | Determines whether the specified presentation is printed in the background. Read/write.
Ranges | Returns the PrintRanges object, which represents the ranges of slides in the presentation to be printed. Read-only.
RangeType | Returns or sets the type of print range for the presentation. Read/write.
sectionIndex | Returns the index of the selected section in the PrintOptions object. Read/write.
SlideShowName | Returns or sets the name of the custom slide show to print. Read/write .


ColorSchemes Methods (PowerPoint)

 Copy code hover
[image]

ColorSchemes Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Add | Adds a color scheme to the collection of available schemes. Returns a ColorScheme object that represents the added color scheme.
Item | Returns a single ColorScheme object from the specified ColorSchemes collection.


Panes Members (PowerPoint)

 Copy code hover
[image]

Panes Members (PowerPoint)
Send feedback

Published: July 16, 2012

A collection of Pane objects that represent the slide, outline, and notes panes in the document window for normal view, or the single pane of any other view in the document window.

Methods

Name | Description
Item | Returns a single Pane object from the specified Panes collection.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


TextEffectFormat.Parent Property (PowerPoint)

 Copy code hover
[image]

TextEffectFormat.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a TextEffectFormat object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

TextEffectFormat Object

Other resources

TextEffectFormat Object Members


CategoryCollection.Application Property (PowerPoint)

 Copy code hover
[image]

CategoryCollection.Application Property (PowerPoint)
Send feedback

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2013

Syntax

expression .Application

expression A variable that represents a CategoryCollection object.


AnimationSettings.AnimateBackground Property (PowerPoint)

 Copy code hover
[image]

AnimationSettings.AnimateBackground Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

If the specified object is an AutoShape, specifies if the shape is animated separately from the text it contains. Read/write.

Syntax

expression .AnimateBackground

expression A variable that represents an AnimationSettings object.

Remarks

Use the TextLevelEffect and TextUnitEffect properties to control the animation of text attached to the specified shape.

If the specified shape is a graph object, the property value is msoTrue if the background (the axes and gridlines) of the specified graph object is animated. The property applies only to AutoShapes with text that can be built in more than one step or to graph objects.

If this property is set to msoTrue and the TextLevelEffect property is set to ppAnimateByAllLevels, the shape and its text are animated simultaneously. If this property is set to msoTrue and the TextLevelEffect property is set to anything other than ppAnimateByAllLevels, the shape is animated immediately before the text is animated.

The effects of setting this property are not apparent unless the specified shape is animated. For a shape to be animated, the TextLevelEffect property for the shape must be set to something other than ppAnimateLevelNone, and either the Animate property must be set to msoTrue, or the EntryEffect property must be set to a constant other than ppEffectNone.

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

Constant | Description
msoFalse | The specified shape is not animated separately from the text it contains.
msoTrue | The specified shape is animated separately from the text it contains.

Example

This example creates a rectangle that contains text. The example then specifies that the shape should fly in from the lower right, that the text should be built from first-level paragraphs, and that the shape should be animated separately from the text it contains. In this example, the EntryEffect property turns on animation.

VBA Copy code Copy code
Sub AnimateTextBox()

    With ActivePresentation.Slides(1).Shapes.AddShape _

            (Type:=msoShapeRectangle, Left:=50, Top:=200, _

            Width:=200, Height:=200)

        .TextFrame.TextRange = "Reason 1" & Chr(13) & _

        "Reason 2" & Chr(13) & "Reason 3"

        With .AnimationSettings

            .EntryEffect = ppEffectFlyFromBottomRight

            .TextLevelEffect = ppAnimateByFirstLevel

            .TextUnitEffect = ppAnimateByParagraph

            .AnimateBackground = msoTrue

        End With

    End With

End Sub

See also

Concepts

AnimationSettings Object

Other resources

AnimationSettings Object Members


NamedSlideShows.Parent Property (PowerPoint)

 Copy code hover
[image]

NamedSlideShows.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a NamedSlideShows object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

NamedSlideShows Object

Other resources

NamedSlideShows Object Members


SlideShowTransition.AdvanceOnTime Property (PowerPoint)

 Copy code hover
[image]

SlideShowTransition.AdvanceOnTime Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the specified slide advances automatically after a specified amount of time has elapsed. Read/write.

Syntax

expression .AdvanceOnTime

expression A variable that represents an SlideShowTransition object.

Return Value

MsoTriState

Remarks

Use the AdvanceTime property to specify the number of seconds after which the slide automatically advances. Set the AdvanceMode property of the SlideShowSettings object to ppSlideShowUseSlideTimings to put the slide interval settings into effect for the entire slide show.

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

Constant | Description
msoFalse | The specified slide does not advance automatically after a specified amount of time has elapsed.
msoTrue | The specified slide advances automatically after a specified amount of time has elapsed.

Example

This example sets slide one in the active presentation to advance after five seconds have passed or when the mouse is clicked — whichever occurs first.

VBA Copy code Copy code
With ActivePresentation.Slides(1).SlideShowTransition

    .AdvanceOnClick = msoTrue

    .AdvanceOnTime = msoTrue

    .AdvanceTime = 5

End With

See also

Concepts

SlideShowTransition Object

Other resources

SlideShowTransition Object Members


Master.SlideShowTransition Property (PowerPoint)

 Copy code hover
[image]

Master.SlideShowTransition Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a SlideShowTransition object that represents the special effects for the specified slide transition. Read-only.

Syntax

expression .SlideShowTransition

expression A variable that represents a Master object.

Return Value

SlideShowTransition

Example

This example sets slide two in the active presentation to advance automatically after 5 seconds during a slide show and to play a dog bark sound at the slide transition.

VBA Copy code Copy code
With ActivePresentation.Slides(2).SlideShowTransition

    .AdvanceOnTime = True

    .AdvanceTime = 5

    .SoundEffect.ImportFromFile "c:\windows\media\dogbark.wav"

End With

ActivePresentation.SlideShowSettings.AdvanceMode = _

    ppSlideShowUseSlideTimings

See also

Concepts

Master Object

Other resources

Master Object Members


Cell.Shape Property (PowerPoint)

 Copy code hover
[image]

Cell.Shape Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Shape object that represents a shape in a table cell. Read-only.

Syntax

expression .Shape

expression A variable that represents a Cell object.

Return Value

Shape

Example

This example creates a 3x3 table in a new presentation and inserts a four-pointed star into the first cell of the table.

VBA Copy code Copy code
With Presentations.Add

    With .Slides.Add(1, ppLayoutBlank)

        .Shapes.AddTable(3, 3).Select

        .Shapes(1).Table.Cell(1, 1).Shape.AutoShapeType = msoShape4pointStar

    End With

End With

See also

Concepts

Cell Object

Other resources

Cell Object Members


DataTable.HasBorderVertical Property (PowerPoint)

 Copy code hover
[image]

DataTable.HasBorderVertical Property (PowerPoint)
See also Send feedback

True if the chart data table has vertical cell borders. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .HasBorderVertical

expression A variable that represents a DataTable object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example causes the data table for the first chart in the active document to be displayed with an outline border and no cell borders.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart

            .HasDataTable = True

            With .DataTable

                .HasBorderHorizontal = False

                .HasBorderVertical = False

                .HasBorderOutline = True

            End With

        End With

    End If

End With

See also

Concepts

DataTable Object

Other resources

DataTable Object Members


Slide.HeadersFooters Property (PowerPoint)

 Copy code hover
[image]

Slide.HeadersFooters Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a HeadersFooters collection that represents the header, footer, date and time, and slide number associated with the slide, slide master, or range of slides. Read-only.

Syntax

expression .HeadersFooters

expression A variable that represents a Slide object.

Return Value

HeadersFooters

Example

This example sets the footer text and the date and time format for the notes master in the active presentation and sets the date and time to be updated automatically.

VBA Copy code Copy code
With ActivePresentation.NotesMaster.HeadersFooters

    .Footer.Text = "Regional Sales"

    With .DateAndTime

        .UseFormat = True

        .Format = ppDateTimeHmmss

    End With

End With

See also

Concepts

Slide Object

Other resources

Slide Object Members


Shape.HasSmartArt Property (PowerPoint)

 Copy code hover
[image]

Shape.HasSmartArt Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns True if the current Shape object contains a SmartArt diagram. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .HasSmartArt

expression A variable that represents a Shape object.

Return Value

Boolean

See also

Concepts

Shape Object

Other resources

Shape Object Members


ThreeDFormat.Application Property (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a ThreeDFormat object.

Return Value

Object

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


Player.Parent Property (PowerPoint)

 Copy code hover
[image]

Player.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object. Read-only.

Syntax

expression .Parent

expression A variable that represents a Player object.

See also

Concepts

Player Object

Other resources

Player Object Members


SlideShowWindows.Parent Property (PowerPoint)

 Copy code hover
[image]

SlideShowWindows.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a SlideShowWindows object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

SlideShowWindows Object

Other resources

SlideShowWindows Object Members


MediaBookmarks.Item Method (PowerPoint)

 Copy code hover
[image]

MediaBookmarks.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the specified MediaBookmark.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Item(Index)

expression A variable that represents a MediaBookmarks object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | [INT] | The position of the MediaBookmark.

Return Value

MediaBookmark

See also

Concepts

MediaBookmarks Object

Other resources

MediaBookmarks Object Members


MotionEffect.Path Property (PowerPoint)

 Copy code hover
[image]

MotionEffect.Path Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a String that represents the path followed by a MotionEffect object. Read-only.

Syntax

expression .Path

expression A variable that represents a MotionEffect object.

Return Value

String

Remarks

The String returned for a MotionEffect object is a specific path that the motion effect follows between From and To, using the same syntax as the VML path description.

See also

Concepts

MotionEffect Object

Other resources

MotionEffect Object Members


Application Object (PowerPoint)

 Copy code hover
[image]

Application Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the entire Microsoft PowerPoint application.

Remarks

The Application object contains:

  • Application-wide settings and options (the name of the active printer, for example).

  • Properties that return top-level objects, such as ActivePresentation, and Windows.

When you are writing code that will run from PowerPoint, you can use the following properties of the Application object without the object qualifier: ActivePresentation, ActiveWindow, AddIns, Presentations, SlideShowWindows, Windows.

For example, instead of writing Application.ActiveWindow.Height = 200, you can write ActiveWindow.Height = 200.

Example

Use the Application property to return the Application object. The following example returns the path to the program file.

VBA Copy code Copy code
Dim MyPath As String

MyPath = Application.Path

The following example creates a PowerPoint Application object in another application, starts PowerPoint (if it is not already running), and opens an existing presentation named "Ex_a2a.ppt".

VBA Copy code Copy code
Set ppt = New Powerpoint.Application

ppt.Visible = True

ppt.Presentations.Open "c:\My Documents\ex_a2a.ppt"

See also

Concepts

PowerPoint Object Model Reference

Other resources

Application Object Members


Presentation.Signatures Property (PowerPoint)

 Copy code hover
[image]

Presentation.Signatures Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a SignatureSet object that represents a collection of digital signatures. Read-only.

Syntax

expression .Signatures

expression A variable that represents a Presentation object.

Return Value

SignatureSet

Example

The following line of code displays the number of digital signatures.

VBA Copy code Copy code
Sub DisplayNumberOfSignatures

    MsgBox "Number of digital signatures: " & _

        ActivePresentation.Signatures.Count

End Sub

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


ScaleEffect.ToY Property (PowerPoint)

 Copy code hover
[image]

ScaleEffect.ToY Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a Single that represents the ending height of a ScaleEffect object, specified as a percentage of the screen width. Read/write.

Syntax

expression .ToY

expression A variable that represents a ScaleEffect object.

Return Value

Single

Remarks

The default value of this property is Empty, in which case the current position of the object is used.

Use this property in conjunction with the FromY property to resize or jump from one position to another.

Do not confuse this property with the To property of the ColorEffect , RotationEffect , or PropertyEffect objects, which is used to set or change colors, rotations, or other properties of an animation behavior, respectively.

Example

The following example adds an animation path and sets the starting and ending horizontal and vertical positions.

VBA Copy code Copy code
Sub AddMotionPath()

    Dim effCustom As Effect

    Dim animMotion As AnimationBehavior

    Dim shpRectangle As Shape

    'Adds shape and sets effect and animation properties

    Set shpRectangle = ActivePresentation.Slides(1).Shapes _

        .AddShape(Type:=msoShapeRectangle, Left:=100, _

        Top:=100, Width:=50, Height:=50)

    Set effCustom = ActivePresentation.Slides(1).TimeLine.MainSequence _

        .AddEffect(Shape:=shpRectangle, effectId:=msoAnimEffectCustom)

    Set animMotion = effCustom.Behaviors.Add(msoAnimTypeMotion)

    'Sets starting and ending horizontal and vertical positions

    With animMotion.MotionEffect

        .FromX = 0

        .FromY = 0

        .ToX = 50

        .ToY = 50

    End With

End Sub

See also

Concepts

ScaleEffect Object

Other resources

ScaleEffect Object Members


ThreeDFormat.FieldOfView Property (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.FieldOfView Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the camera field of view for the specified ThreeDFormat object, in degrees. Read/write.

Syntax

expression .FieldOfView

expression A variable that represents a ThreeDFormat object.

Return Value

Single

Remarks

The FieldOfView property controls the amount of perspective that is applied to a scene, between 0 and 180 degrees.

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


CalloutFormat.DropType Property (PowerPoint)

 Copy code hover
[image]

CalloutFormat.DropType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a value that indicates where the callout line attaches to the callout text box. Read-only.

Syntax

expression .DropType

expression A variable that represents a CalloutFormat object.

Return Value

MsoCalloutDropType

Remarks

If the callout drop type is msoCalloutDropCustom, the values of the Drop and AutoAttach properties and the relative positions of the callout text box and callout line origin (the place that the callout points to) are used to determine where the callout line attaches to the text box.

This property is read-only. Use the PresetDrop method to set the value of this property.

The value returned by the DropType property can be one of these MsoCalloutDropType constants.

msoCalloutDropBottom

msoCalloutDropCenter

msoCalloutDropCustom

msoCalloutDropMixed

msoCalloutDropTop

Example

This example checks to determine whether shape three on myDocument is a callout with a custom drop. If it is, the code replaces the custom drop with one of two preset drops, depending on whether the custom drop value is greater than or less than half the height of the callout text box.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(3)

    If .Type = msoCallout Then

        With .Callout

            If .DropType = msoCalloutDropCustom Then

                If .Drop < .Parent.Height / 2 Then

                    .PresetDrop msoCalloutDropTop

                Else

                    .PresetDrop msoCalloutDropBottom

                End If

            End If

        End With

    End If

End With

See also

Concepts

CalloutFormat Object

Other resources

CalloutFormat Object Members


Columns.Parent Property (PowerPoint)

 Copy code hover
[image]

Columns.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a Columns object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

Columns Object

Other resources

Columns Object Members


Shape.Delete Method (PowerPoint)

 Copy code hover
[image]

Shape.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the specified Shape object.

Syntax

expression .Delete

expression A variable that represents a Shape object.

Example

This example deletes all freeform shapes from slide one in the active presentation.

VBA Copy code Copy code
With Application.ActivePresentation.Slides(1).Shapes

    For intShape = .Count To 1 Step -1

        With .Item(intShape)

            If .Type = msoFreeform Then .Delete

        End With

    Next

End With

See also

Concepts

Shape Object

Other resources

Shape Object Members


TextEffectFormat.Tracking Property (PowerPoint)

 Copy code hover
[image]

TextEffectFormat.Tracking Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the ratio of the horizontal space allotted to each character in the specified text to the width of the character. Read/write.

Syntax

expression .Tracking

expression A variable that represents a TextEffectFormat object.

Return Value

Single

Remarks

The Tracking property value can be from 0 (zero) through 5. (Large values for this property specify ample space between characters; values less than 1 can produce character overlap.)

The following table gives the values of the Tracking property that correspond to the settings available in the user interface.

User interface setting | Equivalent Tracking property value
Very Tight | 0.99925
Tight | 0.999925
Normal | 1.0
Loose | 1.003
Very Loose | 1.006

See also

Concepts

TextEffectFormat Object

Other resources

TextEffectFormat Object Members


ParagraphFormat.Alignment Property (PowerPoint)

 Copy code hover
[image]

ParagraphFormat.Alignment Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the alignment for each paragraph in the specified paragraph format. Read/write.

Syntax

expression .Alignment

expression A variable that represents a ParagraphFormat object.

Remarks

The value of the Alignment property can be one of these PpParagraphAlignment constants.

ppAlignCenter

ppAlignDistribute

ppAlignJustify

ppAlignJustifyLow

ppAlignLeft

ppAlignmentMixed

ppAlignRight

ppAlignThaiDistribute

Example

This example left aligns the paragraphs in shape two on slide one in the active presentation.

VBA Copy code Copy code
Application.ActivePresentation.Slides(1).Shapes(2) _

    .TextFrame.TextRange.ParagraphFormat.Alignment = ppAlignLeft

See also

Concepts

ParagraphFormat Object

Other resources

ParagraphFormat Object Members


SlideShowView.Last Method (PowerPoint)

 Copy code hover
[image]

SlideShowView.Last Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets the specified slide show view to display the last slide in the presentation.

Syntax

expression .Last

expression A variable that represents a SlideShowView object.

Remarks

If you use the Last method to switch from one slide to another during a slide show, when you return to the original slide, its animation picks up where it left off.

Example

This example sets slide show window one to display the last slide in the presentation.

Copy code Copy code
SlideShowWindows(1).View.Last

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


ProtectedViewWindow.Left Property (PowerPoint)

 Copy code hover
[image]

ProtectedViewWindow.Left Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the distance in points from the left edge of the specified window to the left edge of the application window's client area. Read/write.

Syntax

expression .Left

expression A variable that represents a ProtectedViewWindow object.

Remarks

Setting this property to a very large positive or negative value may position the window completely off the desktop.

See also

Concepts

ProtectedViewWindow Object

Other resources

ProtectedViewWindow Object Members


Hyperlinks.Application Property (PowerPoint)

 Copy code hover
[image]

Hyperlinks.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a Hyperlinks object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

Hyperlinks Object

Other resources

Hyperlinks Object Members


GroupShapes.Count Property (PowerPoint)

 Copy code hover
[image]

GroupShapes.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a GroupShapes object.

Return Value

[INT]

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

GroupShapes Object

Other resources

GroupShapes Object Members


Series.Parent Property (PowerPoint)

 Copy code hover
[image]

Series.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents a Series object.

See also

Concepts

Series Object

Other resources

Series Object Members


AddIns.Parent Property (PowerPoint)

 Copy code hover
[image]

AddIns.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents an AddIns object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

AddIns Object

Other resources

AddIns Object Members


Application.PresentationOpen Event (PowerPoint)

 Copy code hover
[image]

Application.PresentationOpen Event (PowerPoint)
See also Send feedback

Published: July 16, 2012

Occurs after an existing presentation is opened, as it is added to the Presentations collection.

Syntax

expression .PresentationOpen(Pres)

expression An expression that returns a Application object.

Parameters

Name | Required/Optional | Data Type | Description
Pres | Required | Presentation | The presentation that is opened.

Remarks

For information about using events with the Application object, see How to: Use Events with the Application Object.

If your Visual Studio solution includes the Microsoft.Office.Interop.PowerPoint reference, this event maps to the following types:

  • Microsoft.Office.Interop.PowerPoint.EApplication_PresentationOpenEventHandler (the PresentationOpen delegate.)

  • Microsoft.Office.Interop.PowerPoint.EApplication_Event.PresentationOpen (the PresentationOpen event.)

Example

This example modifies the background color for color scheme three, applies the modified color scheme to the presentation that was just opened, and displays the presentation in slide view.

VBA Copy code Copy code
Private Sub App_PresentationOpen(ByVal Pres As Presentation)
    With Pres
        Set CS3 = .ColorSchemes(3)
        CS3.Colors(ppBackground).RGB = RGB(240, 115, 100)
        With Windows(1)
            .Selection.SlideRange.ColorScheme = CS3
            .ViewType = ppViewSlide
        End With
    End With
End Sub

See also

Concepts

Application Object

Other resources

Application Object Members


DataLabels.Format Property (PowerPoint)

 Copy code hover
[image]

DataLabels.Format Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Format

expression A variable that represents a DataLabels object.

See also

Concepts

DataLabels Object

Other resources

DataLabels Object Members


FillFormat.PictureEffects Property (PowerPoint)

 Copy code hover
[image]

FillFormat.PictureEffects Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an object that represents the picture or texture fill for the specified fill format. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .PictureEffects

expression A variable that represents a FillFormat object.

Return Value

PictureEffects

Remarks

A picture or texture fill can be specified in the formatting for various elements (shapes) in a chart. For example, you can use the Format Data Series dialog box to format the columns in a Column chart to a picture or texture fill. In this case, the PictureEffects property returns a PictureEffects collection that corresponds to the settings associated with the Picture or texture fill option in the Fill category of the Format Data Series dialog box.

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


ResampleMediaTask.Shape Property (PowerPoint)

 Copy code hover
[image]

ResampleMediaTask.Shape Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the shape that is associated with the specified media asset. Read-only.

Syntax

expression .Shape

expression A variable that represents a ResampleMediaTask object.

Return Value

Shape

See also

Concepts

ResampleMediaTask Object

Other resources

ResampleMediaTask Object Members


Floor.PictureType Property (PowerPoint)

 Copy code hover
[image]

Floor.PictureType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a value that specifies how pictures are displayed on the walls and faces of a 3-D chart. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .PictureType

expression A variable that represents a Floor object.

Remarks

You can set this property to one of the following XlChartPictureType constants: xlStack or xlStretch.

See also

Concepts

Floor Object

Other resources

Floor Object Members


Timing.RewindAtEnd Property (PowerPoint)

 Copy code hover
[image]

Timing.RewindAtEnd Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents whether an object returns to its beginning position after an animation has ended. Read/write.

Syntax

expression .RewindAtEnd

expression A variable that represents a Timing object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The object does not return to its beginning position after an animation has ended.
msoTrue | The object returns to its beginning position after an animation has ended.

Example

The following example adds a shape and an animation to the shape, then instructs the shape to return to its beginning position after the animation has ended.

VBA Copy code Copy code
Sub AddShapeSetTiming()

    Dim effDiamond As Effect

    Dim shpRectangle As Shape

    'Adds shape and sets animation effect

    Set shpRectangle = ActivePresentation.Slides(1).Shapes _

        .AddShape(Type:=msoShapeRectangle, Left:=100, _

        Top:=100, Width:=50, Height:=50)

    Set effDiamond = ActivePresentation.Slides(1).TimeLine.MainSequence _

        .AddEffect(Shape:=shpRectangle, effectId:=msoAnimEffectPathDiamond)

    'Sets duration of animation and returns shape to its original position

    With effDiamond.Timing

        .Duration = 3

        .RewindAtEnd = msoTrue

    End With

End Sub

See also

Concepts

Timing Object

Other resources

Timing Object Members


SeriesLines.Name Property (PowerPoint)

 Copy code hover
[image]

SeriesLines.Name Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the name of the object. Read-only String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Name

expression A variable that represents a SeriesLines object.

See also

Concepts

SeriesLines Object

Other resources

SeriesLines Object Members


FullSeriesCollection Object (PowerPoint)

 Copy code hover
[image]

FullSeriesCollection Object (PowerPoint)
Send feedback

Represents the full collection of all chart series, both filtered and unfiltered.

Version information

Version Added: PowerPoint 2013


Broadcast.IsBroadcasting Property (PowerPoint)

 Copy code hover
[image]

Broadcast.IsBroadcasting Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Indicates whether the file is in the Broadcast Documents library. Read-only.

Syntax

expression .IsBroadcasting

expression A variable that represents a Broadcast object.

See also

Concepts

Broadcast Object

Other resources

Broadcast Object Members


Shape.ConnectionSiteCount Property (PowerPoint)

 Copy code hover
[image]

Shape.ConnectionSiteCount Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of connection sites on the specified shape. Read-only.

Syntax

expression .ConnectionSiteCount

expression A variable that represents a Shape object.

Return Value

Long

Example

This example adds two rectangles to myDocument and joins them with two connectors. The beginnings of both connectors attach to connection site one on the first rectangle; the ends of the connectors attach to the first and last connection sites of the second rectangle.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

Set s = myDocument.Shapes

Set firstRect = s.AddShape(msoShapeRectangle, 100, 50, 200, 100)

Set secondRect = s.AddShape(msoShapeRectangle, 300, 300, 200, 100)

lastsite = secondRect.ConnectionSiteCount

With s.AddConnector(msoConnectorCurve, 0, 0, 100, 100) _

        .ConnectorFormat

    .BeginConnect ConnectedShape:=firstRect, ConnectionSite:=1

    .EndConnect ConnectedShape:=secondRect, ConnectionSite:=1

End With

With s.AddConnector(msoConnectorCurve, 0, 0, 100, 100) _

        .ConnectorFormat

    .BeginConnect ConnectedShape:=firstRect, ConnectionSite:=1

    .EndConnect ConnectedShape:=secondRect, _

        ConnectionSite:=lastsite

End With

See also

Concepts

Shape Object

Other resources

Shape Object Members


MsoAnimAdditive Enumeration (PowerPoint)

 Copy code hover
[image]

MsoAnimAdditive Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies whether the current animation behavior is combined with other running animations.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
msoAnimAdditiveAddBase | 1 | Uses the animation behavior of the base animations.
msoAnimAdditiveAddSum | 2 | Adds together the animation behavior of multiple animations.


TableStyle Object (PowerPoint)

 Copy code hover
[image]

TableStyle Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the current table style.

Remarks

Use the Name property to return the name of the table style.

Use the Id property to return the numeric identifier of the table style.

See also

Concepts

PowerPoint Object Model Reference

Other resources

TableStyle Object Members


ConnectorFormat.Application Property (PowerPoint)

 Copy code hover
[image]

ConnectorFormat.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a ConnectorFormat object.

Return Value

Object

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

ConnectorFormat Object

Other resources

ConnectorFormat Object Members


MediaFormat.VideoCompressionType Property (PowerPoint)

 Copy code hover
[image]

MediaFormat.VideoCompressionType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a String that represents the video compression format of the media. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .VideoCompressionType

expression An expression that returns a MediaFormat object.

Return Value

String

See also

Concepts

MediaFormat Object

Other resources

MediaFormat Object Members


LeaderLines Object (PowerPoint)

 Copy code hover
[image]

LeaderLines Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents leader lines on a chart. Leader lines connect data labels to data points.

Version Information

Version Added: PowerPoint 2007

Remarks

This object is not a collection; there is no object that represents a single leader line.

This object applies only to pie charts.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

Use the LeaderLines property to return the LeaderLines object. The following example adds data labels and blue leader lines to series one on the first chart in the active document. If no leader lines are visible, this example code will fail. In this situation, you can manually drag one of the data labels away from the pie chart to make a leader line show up.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.SeriesCollection(1)

            .HasDataLabels = True

            .DataLabels.Position = xlLabelPositionBestFit

            .HasLeaderLines = True

            .LeaderLines.Border.ColorIndex = 5

        End With

    End If

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

LeaderLines Object Members


Designs.Clone Method (PowerPoint)

 Copy code hover
[image]

Designs.Clone Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Creates a copy of a Design object.

Syntax

expression .Clone(pOriginal, Index)

expression A variable that represents a Designs object.

Parameters

Name | Required/Optional | Data Type | Description
pOriginal | Required | Design | Design object. The original design.
Index | Optional | Long | The index location in the Designs collection into which the design will be copied. If Index is omitted, the cloned design is added to the end of the Designs collection.

Return Value

Design

Example

This example creates a design and clones the newly created design.

VBA Copy code Copy code
Sub CloneDesign()

    Dim dsnDesign1 As Design

    Dim dsnDesign2

    Set dsnDesign1 = ActivePresentation.Designs _

        .Add(designName:="Design1")

    Set dsnDesign2 = ActivePresentation.Designs _

        .Clone(pOriginal:=dsnDesign1, Index:=1)

End Sub

See also

Concepts

Designs Object

Other resources

Designs Object Members


NamedSlideShow.Delete Method (PowerPoint)

 Copy code hover
[image]

NamedSlideShow.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the specified NamedSlideShow object.

Syntax

expression .Delete

expression A variable that represents a NamedSlideShow object.

See also

Concepts

NamedSlideShow Object

Other resources

NamedSlideShow Object Members


Hyperlink.EmailSubject Property (PowerPoint)

 Copy code hover
[image]

Hyperlink.EmailSubject Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the text string of the hyperlink subject line. The subject line is appended to the Internet address (URL) of the hyperlink. Read/write.

Syntax

expression .EmailSubject

expression A variable that represents an Hyperlink object.

Return Value

String

Remarks

This property is commonly used with e-mail hyperlinks. The value of this property takes precedence over any e-mail subject specified in the Address property of the same Hyperlink object.

Example

This example sets the e-mail subject line of the first hyperlink on slide one in the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(1).Hyperlinks(1) _

    .EmailSubject = "Quote Request"

See also

Concepts

Hyperlink Object

Other resources

Hyperlink Object Members


DisplayUnitLabel.Creator Property (PowerPoint)

 Copy code hover
[image]

DisplayUnitLabel.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents a DisplayUnitLabel object.

See also

Concepts

DisplayUnitLabel Object

Other resources

DisplayUnitLabel Object Members


Axis.MinorTickMark Property (PowerPoint)

 Copy code hover
[image]

Axis.MinorTickMark Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the type of minor tick mark for the specified axis. Read/write XlTickMark.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .MinorTickMark

expression A variable that represents an Axis object.

Remarks

MinorTickMark can be one of the following XlTickMark constants:

  • xlTickMarkInside

  • xlTickMarkOutside

  • xlTickMarkCross

  • xlTickMarkNone

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the minor tick marks for the value axis of the first chart in the active document to be inside the axis.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.Axes(xlValue).MinorTickMark = xlTickMarkInside

    End If

End With

See also

Concepts

Axis Object

Other resources

Axis Object Members


Selection Properties (PowerPoint)

 Copy code hover
[image]

Selection Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
ChildShapeRange | Returns a ShapeRange object that represents the child shapes of a selection.
HasChildShapeRange | True if the selection contains child shapes. Read-only.
Parent | Returns the parent object for the specified object.
ShapeRange | Returns a ShapeRange object that represents all the slide objects that have been selected on the specified slide. Read-only.
SlideRange | Returns a SlideRange object that represents a range of selected slides. Read-only.
TextRange | Returns a TextRange object that represents the selected text. Read-only.
TextRange2 | Returns the TextRange2 object of the current Selection object. Read-only.
Type | Represents the type of objects in a selection. Read-only.


ScaleEffect.FromX Property (PowerPoint)

 Copy code hover
[image]

ScaleEffect.FromX Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns a Single that represents the starting width or horizontal position of a ScaleEffect object, specified as a percent of the screen width. Read/write.

Syntax

expression .FromX

expression A variable that represents a ScaleEffect object.

Return Value

Single

Remarks

The default value of this property is Empty, in which case the current position of the object is used.

Use this property in conjunction with the ToX property to resize or jump from one position to another.

Do not confuse this property with the From property of the ColorEffect , RotationEffect , or PropertyEffect objects, which is used to set or change colors, rotations, or other properties of an animation behavior, respectively.

Example

The following example adds a motion path and sets the starting and ending horizontal and vertical positions.

VBA Copy code Copy code
Sub AddMotionPath()

    Dim effCustom As Effect

    Dim animMotion As AnimationBehavior

    Dim shpRectangle As Shape

    'Adds shape and sets effect and animation properties

    Set shpRectangle = ActivePresentation.Slides(1).Shapes _

        .AddShape(Type:=msoShapeRectangle, Left:=100, _

        Top:=100, Width:=50, Height:=50)

    Set effCustom = ActivePresentation.Slides(1).TimeLine.MainSequence _

        .AddEffect(Shape:=shpRectangle, effectId:=msoAnimEffectCustom)

    Set animMotion = effCustom.Behaviors.Add(msoAnimTypeMotion)

    'Sets starting and ending horizontal and vertical positions

    With animMotion.MotionEffect

        .FromX = 0

        .FromY = 0

        .ToX = 50

        .ToY = 50

    End With

End Sub

See also

Concepts

ScaleEffect Object

Other resources

ScaleEffect Object Members


TextRange.BoundLeft Property (PowerPoint)

 Copy code hover
[image]

TextRange.BoundLeft Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the distance (in points) from the left edge of the text bounding box for the specified text frame to the left edge of the slide. Read-only.

Syntax

expression .BoundLeft

expression A variable that represents a TextRange object.

Return Value

Single

Example

This example adds a rounded rectangle to slide one in the active presentation. The rectangle has the same dimensions as the text bounding box for shape one.

VBA Copy code Copy code
With Application.ActivePresentation.Slides(1).Shapes

    Set tr = .Item(1).TextFrame.TextRange

    Set roundRect = .AddShape(msoShapeRoundedRectangle, _

        tr.BoundLeft, tr.BoundTop, tr.BoundWidth, tr.BoundHeight)

End With

With roundRect.Fill

    .ForeColor.RGB = RGB(255, 0, 128)

    .Transparency = 0.75

End With

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


LegendEntry.Left Property (PowerPoint)

 Copy code hover
[image]

LegendEntry.Left Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the distance, in points, from the left edge of the object to the left edge of the chart area. Read-only Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Left

expression A variable that represents a LegendEntry object.

See also

Concepts

LegendEntry Object

Other resources

LegendEntry Object Members


FreeformBuilder Members (PowerPoint)

 Copy code hover
[image]

FreeformBuilder Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents the geometry of a freeform while it is being built.

Methods

Name | Description
AddNodes | Inserts a new segment at the end of the freeform that's being created, and adds the nodes that define the segment. You can use this method as many times as you want to add nodes to the freeform you're creating. When you finish adding nodes, use the ConvertToShape method to create the freeform you've just defined. To add nodes to a freeform after it is been created, use the Insert method of the ShapeNodes collection.
ConvertToShape | Creates a shape that has the geometric characteristics of the specified FreeformBuilder object. Returns a Shape object that represents the new shape.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
Parent | Returns the parent object for the specified object.


ThreeDFormat.BevelBottomInset Property (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.BevelBottomInset Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the bottom bevel inset for the specified ThreeDFormat object, in points. Read/write.

Syntax

expression .BevelBottomInset

expression A variable that represents a ThreeDFormat object.

Return Value

Single

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


Slide.Tags Property (PowerPoint)

 Copy code hover
[image]

Slide.Tags Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Tags object that represents the tags for the specified object. Read-only.

Syntax

expression .Tags

expression A variable that represents a Slide object.

Return Value

Tags

Example

Note Note

Tag values are added and stored in uppercase text. You should perform tests on tag values using uppercase text, as shown in the second example.

This example adds a tag named "REGION" and a tag named "PRIORITY" to slide one in the active presentation.

VBA Copy code Copy code
With Application.ActivePresentation.Slides(1).Tags

    .Add "Region", "East"     'Adds "Region" tag with value "East"

    .Add "Priority", "Low"    'Adds "Priority" tag with value "Low"

End With

This example searches through the tags for each slide in the active presentation. If there's a tag named "PRIORITY," a message box displays the tag value. If the object doesn't have a tag named "PRIORITY," the example adds this tag with the value "Unknown."

VBA Copy code Copy code
For Each s In Application.ActivePresentation.Slides

    With s.Tags

        found = False

        For i = 1 To .Count

          If .Name(i) = "PRIORITY" Then

              found = True

              slNum = .Parent.SlideIndex

              MsgBox "Slide " & slNum & " Priority: " & .Value(i)

          End If

        Next

        If Not found Then

          slNum = .Parent.SlideIndex

          .Add "Priority", "Unknown"

          MsgBox "Slide " & slNum & " Priority tag added: Unknown"

        End If

    End With

Next

See also

Concepts

Slide Object

Other resources

Slide Object Members


Shapes.Placeholders Property (PowerPoint)

 Copy code hover
[image]

Shapes.Placeholders Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Placeholders collection that represents the collection of all the placeholders on a slide. Read-only.

Syntax

expression .Placeholders

expression A variable that represents a Shapes object.

Return Value

Placeholders

Remarks

Each placeholder in the Placeholders collection can contain text, a chart, a table, an organizational chart, or another object.

Example

This example adds a slide to the active presentation and then adds text to both the title (which is the first placeholder on the slide) and the subtitle.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With ActivePresentation.Slides _

        .Add(1, ppLayoutTitle).Shapes.Placeholders

    .Item(1).TextFrame.TextRange.Text = "This is the title text"

    .Item(2).TextFrame.TextRange.Text = "This is subtitle text"

End With

See also

Concepts

Shapes Object

Other resources

Shapes Object Members


Shapes.AddPicture2 Method (PowerPoint)

 Copy code hover
[image]

Shapes.AddPicture2 Method (PowerPoint)
See also Send feedback

Creates a picture from an existing file. Returns a Shape object that represents the new picture.

Syntax

expression .AddPicture2(FileName, LinkToFile, SaveWithDocument, Left, Top, Width, Height, compress)

expression A variable that represents a Shapes object.

Parameters

Name | Required/Optional | Data Type | Description
FileName | Required | String | The file from which the OLE object is to be created.
LinkToFile | Required | MsoTriState | Determines whether the picture will be linked to the file from which it was created.
SaveWithDocument | Required | MsoTriState | Determines whether the linked picture will be saved with the document into which it is inserted. This argument must be msoTrue if LinkToFile is msoFalse.
Left | Required | Single | The position, measured in points, of the left edge of the picture relative to the left edge of the slide.
Top | Required | Single | The position, measured in points, of the top edge of the picture relative to the top edge of the slide.
Width | Optional | Single | The width of the picture, measured in points.
Height | Optional | Single | The height of the picture, measured in points.
compress | Optional | MsoPictureCompress | Determines whether the picture should be compressed when inserted.

Return Value

Shape

See also

Concepts

Shapes Object

Other resources

Shapes Object Members


SlideRange.MoveToSectionStart Method (PowerPoint)

 Copy code hover
[image]

SlideRange.MoveToSectionStart Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Moves the current position to the start of the specified section in the SlideRange object.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .MoveToSectionStart(toSection)

expression A variable that represents a SlideRange object.

Parameters

Name | Required/Optional | Data Type | Description
toSection | Required | [INT] | The section to move to.

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


LegendKey Methods (PowerPoint)

 Copy code hover
[image]

LegendKey Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
ClearFormats | Clears the formatting of the object.
Delete | Deletes the object.


MediaFormat.Muted Property (PowerPoint)

 Copy code hover
[image]

MediaFormat.Muted Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns whether audio playback of the media is muted. Read/write

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Muted

expression An expression that returns a MediaFormat object.

Return Value

Boolean

See also

Concepts

MediaFormat Object

Other resources

MediaFormat Object Members


Research Methods (PowerPoint)

 Copy code hover
[image]

Research Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
IsResearchService | Indicates whether the GUID specified in the ServiceID parameter corresponds to a currently configured research service.
Query | Specifies a research query.
SetLanguagePair | Sets the languages for the translation service.


TextEffectFormat.FontBold Property (PowerPoint)

 Copy code hover
[image]

TextEffectFormat.FontBold Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the font in the specified WordArt is bold. Read/write.

Syntax

expression .FontBold

expression A variable that represents a TextEffectFormat object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The font in the specified WordArt is not bold.
msoTrue | The font in the specified WordArt is bold.

Example

This example sets the font to bold for shape three on myDocument if the shape is WordArt.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(3)

    If .Type = msoTextEffect Then

        .TextEffect.FontBold = msoTrue

    End If

End With

See also

Concepts

TextEffectFormat Object

Other resources

TextEffectFormat Object Members


ChartCharacters Properties (PowerPoint)

 Copy code hover
[image]

ChartCharacters Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Caption | Returns the text of this range of characters. Read-only String.
Count | Returns the number of objects in the collection. Read-only Long.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Font | Returns the font of the specified object. Read-only ChartFont.
Parent | Returns the parent for the specified object. Read-only Object.
PhoneticCharacters | Returns or sets the phonetic text for the object. Read/write String.
Text | Returns or sets the text for the specified object. Read/write String.


TextStyles.Item Method (PowerPoint)

 Copy code hover
[image]

TextStyles.Item Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a single text style from the specified TextStyles collection.

Syntax

expression .Item(Type)

expression A variable that represents a TextStyles object.

Parameters

Name | Required/Optional | Data Type | Description
Type | Required | PpTextStyleType | The text style type.

Return Value

TextStyle

Remarks

The Item method is the default member for a collection. For example, the following two lines of code are equivalent:

ActivePresentation.Slides.Item(1)

ActivePresentation.Slides(1)

The Type parameter value can be one of these PpTextStyleType constants.

ppBodyStyle

ppDefaultStyle

ppTitleStyle

See also

Concepts

TextStyles Object

Other resources

TextStyles Object Members


Shape.ZOrder Method (PowerPoint)

 Copy code hover
[image]

Shape.ZOrder Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Moves the specified shape in front of or behind other shapes in the collection (that is, changes the shape's position in the z-order).

Syntax

expression .ZOrder(ZOrderCmd)

expression A variable that represents a Shape object.

Parameters

Name | Required/Optional | Data Type | Description
ZOrderCmd | Required | MsoZOrderCmd | Specifies where to move the specified shape relative to the other shapes.

Remarks

The ZOrderCmd parameter value can be one of these MsoZOrderCmd constants.

msoBringForward

msoBringInFrontOfText

msoBringToFront

msoSendBackward

msoSendBehindText

msoSendToBack

The msoBringInFrontOfText and msoSendBehindText constants should be used only in Microsoft Office Word.

Use the ZOrderPosition property to determine a shape's current position in the z-order.

Example

This example adds an oval to myDocument and then places the oval second from the back in the z-order if there is at least one other shape on the slide.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddShape(msoShapeOval, 100, 100, 100, 300)

    While .ZOrderPosition > 2

        .ZOrder msoSendBackward

    Wend

End With

See also

Concepts

Shape Object

Other resources

Shape Object Members


TextFrame Object (PowerPoint)

 Copy code hover
[image]

TextFrame Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the text frame in a Shape object. Contains the text in the text frame and the properties and methods that control the alignment and anchoring of the text frame.

Example

Use the TextFrame property to return a TextFrame object. The following example adds a rectangle to myDocument, adds text to the rectangle, and then sets the margins for the text frame.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes _

        .AddShape(msoShapeRectangle, 0, 0, 250, 140).TextFrame

    .TextRange.Text = "Here is some test text"

    .MarginBottom = 10

    .MarginLeft = 10

    .MarginRight = 10

    .MarginTop = 10

End With

Use the HasTextFrame property to determine whether a shape has a text frame, and use the HasText property to determine whether the text frame contains text, as shown in the following example.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

For Each s In myDocument.Shapes

    If s.HasTextFrame Then

        With s.TextFrame

            If .HasText Then MsgBox .TextRange.Text

        End With

    End If

Next

See also

Concepts

PowerPoint Object Model Reference

Other resources

TextFrame Object Members


PlotArea.InsideLeft Property (PowerPoint)

 Copy code hover
[image]

PlotArea.InsideLeft Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the distance, in points, from the chart edge to the inside left edge of the plot area. Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .InsideLeft

expression A variable that represents a PlotArea object.

Remarks

The plot area used for this measurement does not include the axis labels. The Left property for the plot area uses the bounding rectangle that includes the axis labels.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example draws a dotted rectangle around the inside of the plot area for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart

            Set pa = .PlotArea

                With .Shapes.AddShape(msoShapeRectangle, _

                    pa.InsideLeft, pa.InsideTop, _

                    pa.InsideWidth, pa.InsideHeight)

                .Fill.Transparency = 1

                .Line.DashStyle = msoLineDashDot

            End With

        End With

    End If

End With

See also

Concepts

PlotArea Object

Other resources

PlotArea Object Members


ChartData.ActivateChartDataWindow Method (PowerPoint)

 Copy code hover
[image]

ChartData.ActivateChartDataWindow Method (PowerPoint)
Send feedback

Opens a Microsoft Excel 2013 data grid window that contains the full source data for the specified chart.

Version information

Version Added: PowerPoint 2013

Syntax

expression .ActivateChartDataWindow

expression A variable that represents a ChartData object.

Return value

VOID

Remarks

If the data grid window is already open, this method has no effect.

The ActivateChartDataWindow method differs from the ChartData.Activate method in that the former opens the chart in an Excel window within Word, with the Excel ribbon unavailable, whereas the latter opens a full version of Excel, with the ribbon available.


Presentation.EnsureAllMediaUpgraded Method (PowerPoint)

 Copy code hover
[image]

Presentation.EnsureAllMediaUpgraded Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Ensures that all media is up to date in a Presentation object.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .EnsureAllMediaUpgraded

expression A variable that represents a Presentation object.

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


Pane.Activate Method (PowerPoint)

 Copy code hover
[image]

Pane.Activate Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Activates the specified object.

Syntax

expression .Activate

expression A variable that represents a Pane object.

See also

Concepts

Pane Object

Other resources

Pane Object Members


Presentation.PrintOptions Property (PowerPoint)

 Copy code hover
[image]

Presentation.PrintOptions Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a PrintOptions object that represents print options that are saved with the specified presentation. Read-only.

Syntax

expression .PrintOptions

expression A variable that represents a Presentation object.

Return Value

PrintOptions

Example

This example causes hidden slides in the active presentation to be printed, and it scales the printed slides to fit the paper size.

VBA Copy code Copy code
With Application.ActivePresentation

    With .PrintOptions

        .PrintHiddenSlides = True

        .FitToPage = True

    End With

    .PrintOut

End With

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


Cell.Selected Property (PowerPoint)

 Copy code hover
[image]

Cell.Selected Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns True if the specified table cell is selected. Read-only.

Syntax

expression .Selected

expression A variable that represents a Cell object.

Return Value

Boolean

Example

This example puts a border around the first cell in the specified table if the cell is selected.

VBA Copy code Copy code
Sub IsCellSelected()

    Dim celSelected As Cell

    Set celSelected = ActivePresentation.Slides(1).Shapes(1) _

        .Table.Columns(1).Cells(1)

    If celSelected.Selected Then

        With celSelected

            .Borders(ppBorderTop).DashStyle = msoLineRoundDot

            .Borders(ppBorderBottom).DashStyle = msoLineRoundDot

            .Borders(ppBorderLeft).DashStyle = msoLineRoundDot

            .Borders(ppBorderRight).DashStyle = msoLineRoundDot

        End With

    End If

End Sub

See also

Concepts

Cell Object

Other resources

Cell Object Members


TextEffectFormat Methods (PowerPoint)

 Copy code hover
[image]

TextEffectFormat Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
ToggleVerticalText | Switches the text flow in the specified WordArt from horizontal to vertical, or vice versa.


LineFormat.BeginArrowheadWidth Property (PowerPoint)

 Copy code hover
[image]

LineFormat.BeginArrowheadWidth Property (PowerPoint)
See also Send feedback

Returns or sets the width of the arrowhead at the beginning of the specified line. Read/write.

Syntax

expression .BeginArrowheadWidth

expression A variable that represents a LineFormat object.

Return Value

MsoArrowheadWidth

Remarks

The value of the BeginArrowheadWidth property can be one of these MsoArrowheadWidth constants

msoArrowheadNarrow

msoArrowheadWide

msoArrowheadWidthMedium

msoArrowheadWidthMixed

Example

This example adds a line to myDocument. There's a short, narrow oval on the line's starting point and a long, wide triangle on its endpoint.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddLine(100, 100, 200, 300).Line

    .BeginArrowheadLength = msoArrowheadShort

    .BeginArrowheadStyle = msoArrowheadOval

    .BeginArrowheadWidth = msoArrowheadNarrow

    .EndArrowheadLength = msoArrowheadLong

    .EndArrowheadStyle = msoArrowheadTriangle

    .EndArrowheadWidth = msoArrowheadWide

End With

See also

Concepts

LineFormat Object

Other resources

LineFormat Object Members


Row Methods (PowerPoint)

 Copy code hover
[image]

Row Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Delete | Deletes the specified Row object.
Select | Selects the specified object.


XlPieSliceLocation Enumeration (PowerPoint)

 Copy code hover
[image]

XlPieSliceLocation Enumeration (PowerPoint)
Send feedback

Specifies which position on the slice to return the coordinate of.

Version Information

Version Added: Excel 2010

Name | Value | Description
xlCenterPoint | 5 | The center point of a pie slice.
xlInnerCenterPoint | 8 | The innermost center point of a doughnut slice.
xlInnerClockwisePoint | 7 | The innermost point of the most clockwise radius of a doughnut slice.
xlInnerCounterClockwisePoint | 9 | The innermost point of the most counterclockwise radius of a doughnut slice.
xlMidClockwiseRadiusPoint | 4 | The midpoint of the most clockwise radius of a slice.
xlMidCounterClockwiseRadiusPoint | 6 | The midpoint of the most counterclockwise radius of a slice.
xlOuterCenterPoint | 2 | The outer center point of the circumference of a slice.
xlOuterClockwisePoint | 3 | The outermost clockwise point of the circumference of a slice.
xlOuterCounterClockwisePoint | 1 | The outermost counterclockwise point of the circumference of a slice.


FileConverter.Extensions Property (PowerPoint)

 Copy code hover
[image]

FileConverter.Extensions Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the file name extensions associated with the specified FileConverter object. Read-only String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Extensions

expression A variable that represents a FileConverter object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

This example displays the name and file name extensions for the first file converter.

VBA Copy code Copy code
Dim fcTemp As FileConverter

Set fcTemp = FileConverters(1)

MsgBox "The file name extensions for " & fcTemp.FormatName _

    & " files are: " & fcTemp.Extensions

See also

Concepts

FileConverter Object

Other resources

FileConverter Object Members


FreeformBuilder.AddNodes Method (PowerPoint)

 Copy code hover
[image]

FreeformBuilder.AddNodes Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Inserts a new segment at the end of the freeform that's being created, and adds the nodes that define the segment. You can use this method as many times as you want to add nodes to the freeform you're creating. When you finish adding nodes, use the ConvertToShape method to create the freeform you've just defined. To add nodes to a freeform after it is been created, use the Insert method of the ShapeNodes collection.

Syntax

expression .AddNodes(SegmentType, EditingType, X1, Y1, X2, Y2, X3, Y3)

Parameters

Name | Required/Optional | Data Type | Description
SegmentType | Required | MsoSegmentType | The type of segment to be added.
EditingType | Required | MsoEditingType | The editing property of the vertex. If SegmentType is msoSegmentLine, EditingType must be msoEditingAuto.
X1 | Required | Single | If the EditingType of the new segment is msoEditingAuto, this argument specifies the horizontal distance (in points) from the upper-left corner of the document to the endpoint of the new segment. If the EditingType of the new node is msoEditingCorner, this argument specifies the horizontal distance (in points) from the upper-left corner of the document to the first control point for the new segment.
Y1 | Required | Single | If the EditingType of the new segment is msoEditingAuto, this argument specifies the vertical distance (in points) from the upper-left corner of the document to the endpoint of the new segment. If the EditingType of the new node is msoEditingCorner, this argument specifies the vertical distance (in points) from the upper-left corner of the document to the first control point for the new segment.
X2 | Optional | Single | If the EditingType of the new segment is msoEditingCorner, this argument specifies the horizontal distance (in points) from the upper-left corner of the document to the second control point for the new segment. If the EditingType of the new segment is msoEditingAuto, don't specify a value for this argument.
Y2 | Optional | Single | If the EditingType of the new segment is msoEditingCorner, this argument specifies the vertical distance (in points) from the upper-left corner of the document to the second control point for the new segment. If the EditingType of the new segment is msoEditingAuto, don't specify a value for this argument.
X3 | Optional | Single | If the EditingType of the new segment is msoEditingCorner, this argument specifies the horizontal distance (in points) from the upper-left corner of the document to the endpoint of the new segment. If the EditingType of the new segment is msoEditingAuto, don't specify a value for this argument.
Y3 | Optional | Single | If the EditingType of the new segment is msoEditingCorner, this argument specifies the vertical distance (in points) from the upper-left corner of the document to the endpoint of the new segment. If the EditingType of the new segment is msoEditingAuto, don't specify a value for this argument.

Example

This example adds a freeform with five vertices to the first slide in the active presentation.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)
With myDocument.Shapes.BuildFreeform(msoEditingCorner, 360, 200)
    .AddNodes SegmentType:=msoSegmentCurve, EditingType:=msoEditingCorner, _
        X1:=380, Y1:=230, X2:=400, Y2:=250, X3:=450, Y3:=300
    .AddNodes SegmentType:=msoSegmentCurve, EditingType:=msoEditingAuto, _
        X1:=480, Y1:=200
    .AddNodes SegmentType:=msoSegmentLine, EditingType:=msoEditingAuto, _
        X1:=480, Y1:=400
    .AddNodes SegmentType:=msoSegmentLine, EditingType:=msoEditingAuto, _
        X1:=360, Y1:=200
    .ConvertToShape
End With

See also

Concepts

FreeformBuilder Object

Other resources

FreeformBuilder Object Members


Application.PresentationClose Event (PowerPoint)

 Copy code hover
[image]

Application.PresentationClose Event (PowerPoint)
See also Send feedback

Published: July 16, 2012

Occurs immediately before any open presentation closes, as it is removed from the Presentations collection.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .PresentationClose(Pres)

expression An expression that returns a Application object.

Parameters

Name | Required/Optional | Data Type | Description
Pres | Required | Presentation | The presentation that is being closed.

Example

This example saves a copy of the active presentation as an HTML file, with the same name and within the same folder.

VBA Copy code Copy code
Private Sub App_PresentationClose(ByVal Pres As Presentation)

    FindNum = InStr(1, Pres.FullName, ".")

    HTMLName = Mid(Pres.FullName, 1, FindNum - 1) _

        & ".htm"

    Pres.SaveCopyAs HTMLName, ppSaveAsHTML

End Sub

See also

Concepts

Application Object

Other resources

Application Object Members


ColorEffect.Application Property (PowerPoint)

 Copy code hover
[image]

ColorEffect.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a ColorEffect object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

ColorEffect Object

Other resources

ColorEffect Object Members


ProtectedViewWindow.SourcePath Property (PowerPoint)

 Copy code hover
[image]

ProtectedViewWindow.SourcePath Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the source path of the current ProtectedViewWindow object. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .SourcePath

expression A variable that represents a ProtectedViewWindow object.

See also

Concepts

ProtectedViewWindow Object

Other resources

ProtectedViewWindow Object Members


Application.Height Property (PowerPoint)

 Copy code hover
[image]

Application.Height Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets the height of the specified object, in points. Read/write.

Syntax

expression .Height

expression A variable that represents an Application object.

Return Value

Single

Remarks

The Height property of a Shape object returns or sets the height of the forward-facing surface of the specified shape. This measurement doesn't include shadows or 3-D effects.

Example

This example sets the height of document window two to half the height of the application window.

VBA Copy code Copy code
Windows(2).Height = Application.Height / 2

This example sets the height for row two in the specified table to 100 points (72 points per inch).

VBA Copy code Copy code
ActivePresentation.Slides(2).Shapes(5).Table.Rows(2).Height = 100

See also

Concepts

Application Object

Other resources

Application Object Members


PictureFormat.IncrementBrightness Method (PowerPoint)

 Copy code hover
[image]

PictureFormat.IncrementBrightness Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Changes the brightness of the picture by the specified amount.

Syntax

expression .IncrementBrightness(Increment)

expression A variable that represents an PictureFormat object.

Parameters

Name | Required/Optional | Data Type | Description
Increment | Required | Single | Specifies how much to change the value of the Brightness property for the picture. A positive value makes the picture brighter; a negative value makes the picture darker.

Remarks

Use the Brightness property to set the absolute brightness of the picture.

You cannot adjust the brightness of a picture past the upper or lower limit for the Brightness property. For example, if the Brightness property is initially set to 0.9 and you specify 0.3 for the Increment argument, the resulting brightness level will be 1.0, which is the upper limit for the Brightness property, instead of 1.2.

Example

This example creates a duplicate of shape one on myDocument and then moves and darkens the duplicate. For the example to work, shape one must be either a picture or an OLE object.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(1).Duplicate

    .PictureFormat.IncrementBrightness -0.2

    .IncrementLeft 50

    .IncrementTop 50

End With

See also

Concepts

PictureFormat Object

Other resources

PictureFormat Object Members


TextFrame2.MarginTop Property (PowerPoint)

 Copy code hover
[image]

TextFrame2.MarginTop Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the distance (in points) between the top of the text frame and the top of the inscribed rectangle of the shape that contains the text. Read/write.

Syntax

expression .MarginTop

expression An expression that returns a TextFrame2 object.

Return Value

Single

Example

The following example adds a rectangle to a slide, adds text to the rectangle, and then sets the margins for the text frame.

VBA Copy code Copy code
Public Sub MarginTop_Example()

    Set pptSlide = ActivePresentation.Slides(1)

    With pptSlide.Shapes.AddShape(msoShapeRectangle, 0, 0, 250, 140).TextFrame2

        .TextRange.Text = "Here is some sample text"

        .MarginBottom = 10

        .MarginLeft = 10

        .MarginRight = 10

        .MarginTop = 10

    End With

End Sub

See also

Concepts

TextFrame2 Object

Other resources

TextFrame2 Object Members


Shapes.AddTextEffect Method (PowerPoint)

 Copy code hover
[image]

Shapes.AddTextEffect Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Creates a WordArt object. Returns a Shape object that represents the new WordArt object.

Syntax

expression .AddTextEffect(PresetTextEffect, Text, FontName, FontSize, FontBold, FontItalic, Left, Top)

expression A variable that represents a Shapes object.

Parameters

Name | Required/Optional | Data Type | Description
PresetTextEffect | Required | MsoPresetTextEffect | The preset text effect.
Text | Required | String | The text in the WordArt.
FontName | Required | String | The name of the font used in the WordArt.
FontSize | Required | Single | The size (in points) of the font used in the WordArt.
FontBold | Required | MsoTriState | Determines whether the font used in the WordArt is set to bold.
FontItalic | Required | MsoTriState | Determines whether the font used in the WordArt is set to italic.
Left | Required | Single | The position, measured in points, of the left edge of the WordArt's bounding box relative to the left edge of the slide.
Top | Required | Single | The position, measured in points, of the top edge of the WordArt's bounding box relative to the top edge of the slide.

Return Value

Shape

Remarks

When you add WordArt to a document, the height and width of the WordArt are automatically set based on the size and amount of text you specify.

Example

This example adds WordArt that contains the text "Test" to myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)
Set newWordArt = myDocument.Shapes _
    .AddTextEffect(PresetTextEffect:=msoTextEffect1, _
    Text:="Test", FontName:="Arial Black", FontSize:=36, _
    FontBold:=msoFalse, FontItalic:=msoFalse, Left:=10, Top:=10)

See also

Concepts

Shapes Object

Other resources

Shapes Object Members


Presentation.SendFaxOverInternet Method (PowerPoint)

 Copy code hover
[image]

Presentation.SendFaxOverInternet Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sends a presentation as a fax to the specified recipients.

Syntax

expression .SendFaxOverInternet(Recipients, Subject, ShowMessage)

expression A variable that represents a Presentation object.

Parameters

Name | Required/Optional | Data Type | Description
Recipients | Optional | Variant | A String that represents the fax numbers and e-mail addresses of the people to whom to send the fax. Separate multiple recipients with a semicolon.
Subject | Optional | Variant | A String that represents the subject line for the faxed presentation.
ShowMessage | Optional | Variant | Whether to display the fax message before sending it. True displays the fax message before sending it. False sends the fax without displaying the fax message.

Remarks

Using the SendFaxOverInternet method requires that the fax service be enabled on a user's computer.

The format used for specifying fax numbers in the Recipients parameter is either recipientsfaxnumber@usersfaxprovider or recipientsname@recipientsfaxnumber. You can access the user's fax provider information by using the following registry path:

HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Common\Services\Fax

Use the FaxAddress key value under the above registry path to determine the format to use for a user.

Example

The following example sends a fax to the fax service provider, who will fax the message to the recipient.

VBA Copy code Copy code
ActivePresentation.SendFaxOverInternet _

    "14255550101@consolidatedmessenger.com", _

    "For your review", True

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


PrintRanges.Count Property (PowerPoint)

 Copy code hover
[image]

PrintRanges.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a PrintRanges object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

PrintRanges Object

Other resources

PrintRanges Object Members


Gridlines.Format Property (PowerPoint)

 Copy code hover
[image]

Gridlines.Format Property (PowerPoint)
Send feedback

Published: July 16, 2012

Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Format

expression A variable that represents a GridLines object.


PrintRanges.Application Property (PowerPoint)

 Copy code hover
[image]

PrintRanges.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a PrintRanges object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

PrintRanges Object

Other resources

PrintRanges Object Members


Presentation.ColorSchemes Property (PowerPoint)

 Copy code hover
[image]

Presentation.ColorSchemes Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

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

Syntax

expression .ColorSchemes

expression A variable that represents a Presentation object.

Return Value

ColorSchemes

Example

This example sets the background color for color scheme three in the active presentation and then applies the color scheme to all slides in the presentation that are based on the slide master.

VBA Copy code Copy code
With ActivePresentation

    Set cs1 = .ColorSchemes(3)

    cs1.Colors(ppBackground).RGB = RGB(128, 128, 0)

    .SlideMaster.ColorScheme = cs1

End With

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


UpBars Methods (PowerPoint)

 Copy code hover
[image]

UpBars Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Delete | Deletes the object.
Select | Selects the object.


Application.PresentationCloseFinal Event (PowerPoint)

 Copy code hover
[image]

Application.PresentationCloseFinal Event (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents closing the final Presentation object.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .PresentationCloseFinal(Pres, )

expression A variable that represents an Application object.

Parameters

Name | Required/Optional | Data Type | Description
Pres | Required | Presentation | The Presentation object.

Return Value

Nothing

See also

Concepts

Application Object

Other resources

Application Object Members


Shape.SetShapesDefaultProperties Method (PowerPoint)

 Copy code hover
[image]

Shape.SetShapesDefaultProperties Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Applies the formatting for the specified shape to the default shape. Shapes created after this method has been used will have this formatting applied to them by default.

Syntax

expression .SetShapesDefaultProperties

expression A variable that represents a Shape object.

Example

This example adds a rectangle to myDocument, formats the rectangle's fill, applies the rectangle's formatting to the default shape, and then adds another smaller rectangle to the document. The second rectangle has the same fill as the first one.

VBA Copy code Copy code
Set mydocument = ActivePresentation.Slides(1)

With mydocument.Shapes

    With .AddShape(msoShapeRectangle, 5, 5, 80, 60)

        With .Fill

            .ForeColor.RGB = RGB(0, 0, 255)

            .BackColor.RGB = RGB(0, 204, 255)

            .Patterned msoPatternHorizontalBrick

        End With

    ' Sets formatting for default shapes

        .SetShapesDefaultProperties

    End With

' New shape has default formatting

    .AddShape msoShapeRectangle, 90, 90, 40, 30

End With

See also

Concepts

Shape Object

Other resources

Shape Object Members


DataLabels.NumberFormat Property (PowerPoint)

 Copy code hover
[image]

DataLabels.NumberFormat Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the format code for the object. Read/write String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .NumberFormat

expression A variable that represents a DataLabels object.

Remarks

The format code is the same string as the Format Codes option in the Format Cells dialog box. The Format function uses different format code strings than do the NumberFormat and NumberFormatLocal properties.

See also

Concepts

DataLabels Object

Other resources

DataLabels Object Members


ChartCategory Members (PowerPoint)

 Copy code hover
[image]

ChartCategory Members (PowerPoint)
Send feedback

Represents all chart categories in the document, whether visible (unfiltered) or not.

Properties

Name | Description
IsFiltered | Returns or sets a Boolean that determines whether the specified chart category is filtered out from the chart. Read-write.
Name | Returns or sets a String that represents the name of a chart category. Read/write.
Parent | Returns the parent for the specified object. Read-only Object.


TextRange.Paragraphs Method (PowerPoint)

 Copy code hover
[image]

TextRange.Paragraphs Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a TextRange object that represents the specified subset of text paragraphs.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Paragraphs(Start, Length)

expression An expression that returns a TextRange object.

Parameters

Name | Required/Optional | Data Type | Description
Start | Optional | Long | The first paragraph in the returned range.
Length | Optional | Long | The number of paragraphs to be returned.

Return Value

TextRange

Remarks

For information about counting or looping through the paragraphs in a text range, see the TextRange object.

If both Start and Length are omitted, the returned range starts with the first paragraph and ends with the last paragraph in the specified range.

If Start is specified but Length is omitted, the returned range contains one paragraph.

If Length is specified but Start is omitted, the returned range starts with the first paragraph in the specified range.

If Start is greater than the number of paragraphs in the specified text, the returned range starts with the last paragraph in the specified range.

If Length is greater than the number of paragraphs from the specified starting paragraph to the end of the text, the returned range contains all those paragraphs.

Example

This example formats as italic the first two lines of the second paragraph in shape two on slide one in the active presentation.

VBA Copy code Copy code
Application.ActivePresentation.Slides(1).Shapes(2) _

    .TextFrame.TextRange.Paragraphs(2) _

    .Lines(1, 2).Font.Italic = True

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


ShapeNode.SegmentType Property (PowerPoint)

 Copy code hover
[image]

ShapeNode.SegmentType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a value that indicates whether the segment associated with the specified node is straight or curved. Read-only.

Syntax

expression .SegmentType

expression A variable that represents a ShapeNode object.

Return Value

MsoSegmentType

Remarks

This property is read-only. Use the SetSegmentType method to set the value of this property.

The value returned by the SegmentType property can be one of these MsoSegmentType constants. The SegmentType property returns msoSegmentCurve if the specified node is a control point for a curved segment.

msoSegmentCurve

msoSegmentLine

Example

This example changes all straight segments to curved segments in shape three on myDocument. Shape three must be a freeform drawing.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(3).Nodes

    n = 1

    While n <= .Count

        If .Item(n).SegmentType = msoSegmentLine Then

            .SetSegmentType n, msoSegmentCurve

        End If

        n = n + 1

    Wend

End With

See also

Concepts

ShapeNode Object

Other resources

ShapeNode Object Members


LineFormat.Weight Property (PowerPoint)

 Copy code hover
[image]

LineFormat.Weight Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the thickness of the specified line, in points. Read/write.

Syntax

expression .Weight

expression A variable that represents a LineFormat object.

Return Value

Single

Example

This example adds a green dashed line two points thick to myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddLine(10, 10, 250, 250).Line

    .DashStyle = msoLineDashDotDot

    .ForeColor.RGB = RGB(0, 255, 255)

    .Weight = 2

End With

See also

Concepts

LineFormat Object

Other resources

LineFormat Object Members


Master Properties (PowerPoint)

 Copy code hover
[image]

Master Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Background | Returns a ShapeRange object that represents the slide background.
BackgroundStyle | Sets or returns the background style of the specified object. Read/write.
ColorScheme | Returns or sets the ColorScheme object that represents the scheme colors for the specified slide, slide range, or slide master. Read/write.
CustomerData | Returns a CustomerData object. Read-only.
CustomLayouts | Returns a CustomLayouts object that represents the custom layouts associated with the presentation design of the specified Master object. Read-only.
Design | Returns a Design object representing a design.
Guides | Returns a Guides collection that represents all of the drawing guides associated with the slide master, title master, handout master, notes master, or design master.
HeadersFooters | Returns a HeadersFooters collection that represents the header, footer, date and time, and slide number associated with the slide, slide master, or range of slides. Read-only.
Height | Returns or sets the height of the specified object, in points. Read-only.
Hyperlinks | Returns a Hyperlinks collection that represents all the hyperlinks on the specified slide. Read-only.
Name | Returns or sets the name of the specified object. Read/write.
Parent | Returns the parent object for the specified object.
Shapes | Returns a Shapes collection that represents all the elements that have been placed or inserted on the specified slide, slide master, or range of slides. Read-only.
SlideShowTransition | Returns a SlideShowTransition object that represents the special effects for the specified slide transition. Read-only.
TextStyles | Returns a TextStyles collection that represents three text styles — title text, body text, and default text — for the specified slide master. Read-only.
Theme | Returns a Theme object that represents the theme used by the specified slide master, title master, handout master, notes master, or design master. Read-only.
TimeLine | Returns a TimeLine object that represents the animation timeline for the slide. Read-only.
Width | Returns the width of the specified object, in points. Read-only.


ShapeRange.AlternativeText Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.AlternativeText Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the alternative text associated with a shape in a Web presentation. Read/write.

Syntax

expression .AlternativeText

expression A variable that represents a ShapeRange object.

Return Value

String

Example

The following example sets the alternative text for the selected shape in the active window. The selected shape is a picture of a mallard duck.

VBA Copy code Copy code
ActiveWindow.Selection.ShapeRange.AlternativeText = "This is a mallard duck."

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


RulerLevels.Count Property (PowerPoint)

 Copy code hover
[image]

RulerLevels.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a RulerLevels object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

RulerLevels Object

Other resources

RulerLevels Object Members


PlaceholderFormat.ContainedType Property (PowerPoint)

 Copy code hover
[image]

PlaceholderFormat.ContainedType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the type of the shape that contains the specified placeholder format. Read-only.

Syntax

expression .ContainedType

expression An expression that returns a PlaceholderFormat object.

Return Value

MsoShapeType

Remarks

The value returned by the ContainedType property can be one of the MsoShapeType constants.

See also

Concepts

PlaceholderFormat Object

Other resources

PlaceholderFormat Object Members


TabStops.Parent Property (PowerPoint)

 Copy code hover
[image]

TabStops.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a TabStops object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

TabStops Object

Other resources

TabStops Object Members


PictureFormat.ColorType Property (PowerPoint)

 Copy code hover
[image]

PictureFormat.ColorType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the type of color transformation applied to the specified picture or OLE object. Read/write.

Syntax

expression .ColorType

expression A variable that represents a PrintOptions object.

Return Value

MsoPictureColorType

Remarks

The value of the ColorType property can be one of these MsoPictureColorType constants.

msoPictureAutomatic

msoPictureBlackAndWhite

msoPictureGrayscale

msoPictureMixed

msoPictureWatermark

Example

This example sets the color transformation to grayscale for shape one on myDocument. Shape one must be either a picture or an OLE object.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes(1).PictureFormat.ColorType = msoPictureGrayScale

See also

Concepts

PictureFormat Object

Other resources

PictureFormat Object Members


LineFormat.EndArrowheadWidth Property (PowerPoint)

 Copy code hover
[image]

LineFormat.EndArrowheadWidth Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the width of the arrowhead at the end of the specified line. Read/write.

Syntax

expression .EndArrowheadWidth

expression A variable that represents an LineFormat object.

Return Value

MsoArrowheadWidth

Remarks

The EndArrowheadWidth property value can be one of these MsoArrowheadWidth constants.

msoArrowheadNarrow

msoArrowheadWide

msoArrowheadWidthMedium

msoArrowheadWidthMixed

Example

This example adds a line to myDocument. There's a short, narrow oval on the line's starting point and a long, wide triangle on its endpoint.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddLine(100, 100, 200, 300).Line

    .BeginArrowheadLength = msoArrowheadShort

    .BeginArrowheadStyle = msoArrowheadOval

    .BeginArrowheadWidth = msoArrowheadNarrow

    .EndArrowheadLength = msoArrowheadLong

    .EndArrowheadStyle = msoArrowheadTriangle

    .EndArrowheadWidth = msoArrowheadWide

End With

See also

Concepts

LineFormat Object

Other resources

LineFormat Object Members


ScaleEffect Properties (PowerPoint)

 Copy code hover
[image]

ScaleEffect Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
ByX | Sets or returns a Single that represents scaling or moving an object horizontally by a specified percentage of the screen width, depending on whether it used in conjunction with a ScaleEffect or MotionEffect object, respectively. For example, a value of 50 for a motion effect means to move the object half the screen width to the right. Read/write.
ByY | Sets or returns a Single that represents scaling or moving an object vertically by a specified percentage of the screen width, depending on whether it is used in conjunction with a ScaleEffect or MotionEffect object, respectively. Read/write.
FromX | Sets or returns a Single that represents the starting width or horizontal position of a ScaleEffect object, specified as a percent of the screen width. Read/write.
FromY | Returns or sets a Single that represents the starting height of a ScaleEffect object, specified as a percentage of the screen width. Read/write.
Parent | Returns the parent object for the specified object.
ToX | Sets or returns a Single that represents the ending width of a ScaleEffect object, specified as a percent of the screen width. Read/write.
ToY | Returns or sets a Single that represents the ending height of a ScaleEffect object, specified as a percentage of the screen width. Read/write.


DisplayUnitLabel.Text Property (PowerPoint)

 Copy code hover
[image]

DisplayUnitLabel.Text Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the text for the specified object. Read/write String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Text

expression A variable that represents a DisplayUnitLabel object.

See also

Concepts

DisplayUnitLabel Object

Other resources

DisplayUnitLabel Object Members


Hyperlink.Parent Property (PowerPoint)

 Copy code hover
[image]

Hyperlink.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a Hyperlink object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

Hyperlink Object

Other resources

Hyperlink Object Members


Pane.ViewType Property (PowerPoint)

 Copy code hover
[image]

Pane.ViewType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the type of view for the specified pane. Read-only.

Syntax

expression .ViewType

expression A variable that represents a Pane object.

Return Value

PpViewType

Remarks

The value of the ViewType property can be one of these PpViewType constants.

ppViewHandoutMaster

ppViewMasterThumbnails

ppViewNormal

ppViewNotesMaster

ppViewNotesPage

ppViewOutline

ppViewPrintPreview

ppViewSlide

ppViewSlideMaster

ppViewSlideSorter

ppViewThumbnails

ppViewTitleMaster

Example

If the view in the active pane is slide view, this example makes the notes pane the active pane. The notes pane is the third member of the Panes collection.

VBA Copy code Copy code
With ActiveWindow

    If .ActivePane.ViewType = ppViewSlide Then

        .Panes(3).Activate

    End If

End With

See also

Concepts

Pane Object

Other resources

Pane Object Members


Shape.Reflection Property (PowerPoint)

 Copy code hover
[image]

Shape.Reflection Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the reflection format for the specified shape. Read-only.

Syntax

expression .Reflection

expression A variable that represents a Shape object.

Return Value

MsoReflectionType

See also

Concepts

Shape Object

Other resources

Shape Object Members


CellRange Properties (PowerPoint)

 Copy code hover
[image]

CellRange Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Borders | Returns a Borders collection that represents the borders and diagonal lines for the specified Cell object or CellRange collection. Read-only.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


SectionProperties Object (PowerPoint)

 Copy code hover
[image]

SectionProperties Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Contains properties and methods for manipulating sections in a presentation.

Remarks

You can use the SectionProperties property of the Presentation object to get a SectionProperties object.

See also

Concepts

PowerPoint Object Model Reference

Other resources

SectionProperties Object Members


Comment.Collapsed Property (PowerPoint)

 Copy code hover
[image]

Comment.Collapsed Property (PowerPoint)
Send feedback

Returns whether the replies to a comment are shown (expanded) or hidden (collapsed). Ready-only.

Version information

Version Added: PowerPoint 2013

Syntax

expression .Collapsed

expression A variable that represents a Comment object.

Property value

BOOL


ChartGroup.Has3DShading Property (PowerPoint)

 Copy code hover
[image]

ChartGroup.Has3DShading Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if a chart group has three-dimensional shading. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Has3DShading

expression A variable that represents a ChartGroup object.

Remarks

Setting Has3DShading to False removes the 3-D shading effect from the chart (rendering it as flat). Setting Has3DShading to True sets the chart content to the default.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example adds 3-D shading to the first chart group of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.ChartGroups(1).Has3DShading = True

    End If

End With

See also

Concepts

ChartGroup Object

Other resources

ChartGroup Object Members


SeriesCollection Object (PowerPoint)

 Copy code hover
[image]

SeriesCollection Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a collection of all the Series objects in the specified chart or chart group.

Version Information

Version Added: PowerPoint 2007

Remarks

Use the SeriesCollection method to return the SeriesCollection collection.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

Use the Extend method to extend an existing series. The following example adds the data in cells C6:C10 in the chart's worksheet to an existing series in the series collection of the chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection.Extend "='Sheet1'!$C$6:$C$10"

    End If

End With

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

Use the Add method to create a new series and add it to the chart. The following example adds the data from cells D1:D5 in the chart's worksheet as a new series to the chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection.Add "='Sheet1'!$D$1:$D$5"

    End If

End With

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

Use SeriesCollection(Index), where Index is the series index number or name, to return a single Series object. The following example sets the color of the interior for the first series in embedded chart one the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).Interior.Color = RGB(255, 0, 0)

    End If

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

SeriesCollection Object Members


ShapeRange.HasTextFrame Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.HasTextFrame Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns whether the specified shape has a text frame. Read-only.

Syntax

expression .HasTextFrame

expression A variable that represents a ShapeRange object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified shape does not have a text frame and therefore cannot contain text.
msoTrue | The specified shape has a text frame and can therefore contain text.

Example

This example extracts text from all shapes on the first slide that contain text frames, and then it stores the names of these shapes and the text they contain in an array.

VBA Copy code Copy code
Dim shpTextArray() As Variant

Dim numShapes, numAutoShapes, i As Long

Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    numShapes = .Count

    If numShapes > 1 Then

    numTextShapes = 0

        ReDim shpTextArray(1 To 2, 1 To numShapes)

        For i = 1 To numShapes

            If .Item(i).HasTextFrame Then

                numTextShapes = numTextShapes + 1

                shpTextArray(numTextShapes, 1) = .Item(i).Name

                shpTextArray(numTextShapes, 2) = .Item(i) _

                    .TextFrame.TextRange.Text

            End If

        Next

        ReDim Preserve shpTextArray(1 To 2, 1 To numTextShapes)

    End If

End With

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


ProtectedViewWindows Members (PowerPoint)

 Copy code hover
[image]

ProtectedViewWindows Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a collection of ProtectedViewWindow objects.

Methods

Name | Description
Item | Returns a single ProtectedViewWindow object from the specified ProtectedViewWindows collection.
Open | Open and return a ProtectedViewWindow object from the ProtectedViewWindows collection.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object. Read-only.


Panes Properties (PowerPoint)

 Copy code hover
[image]

Panes Properties (PowerPoint)
Send feedback

Published: July 12, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


ColorFormat Properties (PowerPoint)

 Copy code hover
[image]

ColorFormat Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Brightness | Returns or sets the brightness of the specified picture or OLE object. The value for this property must be a number from 0.0 (dimmest) to 1.0 (brightest). Read/write Single.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
ObjectThemeColor | Returns or sets the theme color of the specified ColorFormat object. Read/Write.
Parent | Returns the parent object for the specified object.
RGB | Returns or sets the red-green-blue (RGB) value of the specified color. Read/write.
SchemeColor | Returns or sets the color in the applied color scheme that's associated with the specified object. Read/write.
TintAndShade | Sets or returns the lightening or darkening of the the color of a specified shape. Read/write.
Type | Represents the type of color. Read-only.


SlideShowSettings.ShowType Property (PowerPoint)

 Copy code hover
[image]

SlideShowSettings.ShowType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the show type for the specified slide show. Read/write.

Syntax

expression .ShowType

expression A variable that represents a SlideShowSettings object.

Return Value

PpSlideShowType

Remarks

The value of the ShowType property can be one of these PpSlideShowType constants.

ppShowTypeKiosk

ppShowTypeSpeaker

ppShowTypeWindow

Example

This example runs a slide show of the active presentation in a window, starting with slide two and ending with slide four. The new slide show window is placed in the upper-left corner of the screen, and its width and height are both 300 points.

VBA Copy code Copy code
With ActivePresentation.SlideShowSettings

    .RangeType = ppShowSlideRange

    .StartingSlide = 2

    .EndingSlide = 4

    .ShowType = ppShowTypeWindow

    With .Run

        .Left = 0

        .Top = 0

        .Width = 300

        .Height = 300

    End With

End With

See also

Concepts

SlideShowSettings Object

Other resources

SlideShowSettings Object Members


Axis.DisplayUnit Property (PowerPoint)

 Copy code hover
[image]

Axis.DisplayUnit Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets the unit label for the value axis. Read/write XlDisplayUnit, xlCustom, or xlNone.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .DisplayUnit

expression A variable that represents an Axis object.

Remarks

Using unit labels when charting large values makes your tick-mark labels easier to read. For example, if you label your value axis in units of hundreds, thousands, or millions, you can use smaller numeric values at the tick marks on the axis.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the units displayed on the value axis of the first chart in the active document to hundreds.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.Axes(xlValue)

            .DisplayUnit = xlHundreds

            .HasTitle = True

            .AxisTitle.Caption = "Rebate Amounts"

        End With

    End If

End With

See also

Concepts

Axis Object

Other resources

Axis Object Members


Floor Members (PowerPoint)

 Copy code hover
[image]

Floor Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents the floor of a 3-D chart.

Methods

Name | Description
ClearFormats | Clears the formatting of the object.
Paste | Pastes a picture from the Clipboard on the floor of the specified chart.
Select | Selects the object.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Name | Returns the name of the object. Read-only String.
Parent | Returns the parent for the specified object. Read-only Object.
PictureType | Returns or sets a value that specifies how pictures are displayed on the walls and faces of a 3-D chart. Read/write Variant.
Thickness | Returns or sets the thickness of the floor. Read/write Long.


TableStyle Members (PowerPoint)

 Copy code hover
[image]

TableStyle Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents the current table style.

Properties

Name | Description
Id | Returns a string that identifies the table style. Read-only.
Name | Returns the name of the table style. Read-only.


FullSeriesCollection Members (PowerPoint)

 Copy code hover
[image]

FullSeriesCollection Members (PowerPoint)
Send feedback

Represents the full collection of all chart series, both filtered and unfiltered.

Methods

Name | Description
Item | Returns an individual Series object from the collection.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Count | Returns a Long that represents the number of full series in the collection. Read-only.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
Parent | Returns the parent for the specified object. Read-only Object.


PrintOptions.NumberOfCopies Property (PowerPoint)

 Copy code hover
[image]

PrintOptions.NumberOfCopies Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets the number of copies of a presentation to be printed. Read/write.

Syntax

expression .NumberOfCopies

expression A variable that represents a PrintOptions object.

Return Value

Long

Remarks

Specifying a value for the Copies argument of the PrintOut method sets the value of this property. The default value is 1.

Example

This example prints three collated copies of the active presentation.

VBA Copy code Copy code
With ActivePresentation.PrintOptions

    .NumberOfCopies = 3

    .Collate = True

    .Parent.PrintOut

End With

See also

Concepts

PrintOptions Object

Other resources

PrintOptions Object Members


Points Members (PowerPoint)

 Copy code hover
[image]

Points Members (PowerPoint)
Send feedback

Published: July 16, 2012

A collection of all the Point objects in the specified series in a chart.

Methods

Name | Description
Item | Returns a single object from a collection.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Count | Returns the number of objects in the collection. Read-only Long.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Parent | Returns the parent for the specified object. Read-only Object.


MotionEffect.ByY Property (PowerPoint)

 Copy code hover
[image]

MotionEffect.ByY Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns a Single that represents scaling or moving an object vertically by a specified percentage of the screen width, depending on whether it is used in conjunction with a ScaleEffect or MotionEffect object, respectively. Read/write.

Syntax

expression .ByY

expression A variable that represents a MotionEffect object.

Return Value

Single

Remarks

Negative numbers move the object horizontally to the left. Floating point numbers (for example, 55.5) are allowed.

To scale or move an object horizontally, use the ByX property.

If both the ByX and ByY properties are set, then the object is scaled or moves both horizontally and vertically.

Do not confuse this property with the By property of the ColorEffect , RotationEffect , or PropertyEffect objects, which is used to set colors, rotations, or other properties of an animation behavior, respectively.

Example

The following example adds an animation path; then sets the horizontal and vertical movement of the shape.

VBA Copy code Copy code
Sub AddMotionPath()

    Dim effCustom As Effect

    Dim animBehavior As AnimationBehavior

    Dim shpRectangle As Shape

    'Adds rectangle and sets effect and animation

    Set shpRectangle = ActivePresentation.Slides(1).Shapes _

        .AddShape(Type:=msoShapeRectangle, Left:=300, _

        Top:=300, Width:=300, Height:=150)

    Set effCustom = ActivePresentation.Slides(1).TimeLine _

        .MainSequence.AddEffect(Shape:=shpRectangle, _

         effectId:=msoAnimEffectCustom)

    Set animBehavior = effCustom.Behaviors.Add(msoAnimTypeMotion)

    'Specifies animation motion

    With animBehavior.MotionEffect

        .ByX = 50

        .ByY = 50

    End With

End Sub

See also

Concepts

MotionEffect Object

Other resources

MotionEffect Object Members


Font.Name Property (PowerPoint)

 Copy code hover
[image]

Font.Name Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the name of the specified object. Read/write.

Syntax

expression .Name

expression A variable that represents a Font object.

Return Value

String

Remarks

You can use the object's name in conjunction with the Item method to return a reference to the object if the Item method for the collection that contains the object takes a Variant argument. For example, if the value of the Name property for a shape is Rectangle 2, then .Shapes("Rectangle 2") will return a reference to that shape.

See also

Concepts

Font Object

Other resources

Font Object Members


AnimationSettings.TextUnitEffect Property (PowerPoint)

 Copy code hover
[image]

AnimationSettings.TextUnitEffect Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Indicates whether the text in the specified shape is animated paragraph by paragraph, word by word, or letter by letter. Read/write.

Syntax

expression .TextUnitEffect

expression A variable that represents an AnimationSettings object.

Return Value

PpTextUnitEffect

Remarks

The value of the TextUnitEffect property can be one of these PpTextUnitEffect constants.

ppAnimateByCharacter

ppAnimateByParagraph

ppAnimateByWord

ppAnimateUnitMixed

For the TextUnitEffect property setting to take effect, the TextLevelEffect property for the specified shape must have a value other than ppAnimateLevelNone or ppAnimateByAllLevels, and the Animate property must be set to True.

Example

This example adds a title slide and title text to the active presentation and sets the title to be built letter by letter.

VBA Copy code Copy code
With ActivePresentation.Slides.Add(Index:=1, _

    Layout:=ppLayoutTitleOnly).Shapes(1)

    .TextFrame.TextRange.Text = "Sample title"

    With .AnimationSettings

        .Animate = True

        .TextLevelEffect = ppAnimateByFirstLevel

        .TextUnitEffect = ppAnimateByCharacter

        .EntryEffect = ppEffectFlyFromLeft

    End With

End With

See also

Concepts

AnimationSettings Object

Other resources

AnimationSettings Object Members


ShapeRange.Rotation Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.Rotation Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the number of degrees the specified shape is rotated around the z-axis. Read/write.

Syntax

expression .Rotation

expression A variable that represents a ShapeRange object.

Return Value

Single

Remarks

A positive value indicates clockwise rotation; a negative value indicates counterclockwise rotation.

To set the rotation of a three-dimensional shape around the x-axis or the y-axis, use the RotationX property or the RotationY property of the ThreeDFormat object.

Example

This example matches the rotation of all shapes on myDocument to the rotation of shape one.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    sh1Rotation = .Item(1).Rotation

    For o = 1 To .Count

        .Item(o).Rotation = sh1Rotation

    Next

End With

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


TextStyleLevels Members (PowerPoint)

 Copy code hover
[image]

TextStyleLevels Members (PowerPoint)
Send feedback

Published: July 16, 2012

A collection of all the outline text levels. This collection always contains five members, each of which is represented by a TextStyleLevel object.

Methods

Name | Description
Item | Returns a single text style level from the specified TextStyleLevels collection.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


CategoryCollection.Count Property (PowerPoint)

 Copy code hover
[image]

CategoryCollection.Count Property (PowerPoint)
Send feedback

Returns a Long that represents the number of categories in the collection. Read-only.

Version information

Version Added: PowerPoint 2013

Syntax

expression .Count

expression A variable that represents a CategoryCollection object.

Property value

INT32


Slide Properties (PowerPoint)

 Copy code hover
[image]

Slide Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Background | Returns a ShapeRange object that represents the slide background.
BackgroundStyle | Sets or returns the background style of the specified object. Read/write.
ColorScheme | Returns or sets the ColorScheme object that represents the scheme colors for the specified slide, slide range, or slide master. Read/write.
Comments | Returns a Comments object that represents a collection of comments. Read-only.
CustomerData | Returns a CustomerData object. Read-only.
CustomLayout | Returns a CustomLayout object that represents the custom layout associated with the specified slide. Read-only.
Design | Returns a Design object representing a design.
DisplayMasterShapes | Determines whether the specified slide displays the background objects on the slide master. Read/write.
FollowMasterBackground | Determines whether the slide follows the slide master background. Read/write.
HasNotesPage | Indicates whether the selected Slide has media that resides on a notes page. Read-only.
HeadersFooters | Returns a HeadersFooters collection that represents the header, footer, date and time, and slide number associated with the slide, slide master, or range of slides. Read-only.
Hyperlinks | Returns a Hyperlinks collection that represents all the hyperlinks on the specified slide. Read-only.
Layout | Returns or sets a PpSlideLayout constant that represents the slide layout. Read/write.
Master | Returns a Master object that represents the slide master. Read-only.
Name | When a slide is inserted into a presentation, Microsoft PowerPoint automatically assigns it a name in the form Sliden, where n is an integer that represents the order in which the slide was created in the presentation. For example, the first slide inserted into a presentation is automatically named Slide1. If you copy a slide from one presentation to another, the slide loses the name it had in the first presentation and is automatically assigned a new name in the second presentation. A slide range must contain exactly one slide. Read/write String.
NotesPage | Returns a SlideRange object that represents the notes pages for the specified slide or range of slides. Read-only.
Parent | Returns the parent object for the specified object.
PrintSteps | Returns the number of slides you'd need to print to simulate the builds on the specified slide, slide master, or range of slides. Read-only.
sectionIndex | Returns the index of the selected section in the Slide range. Read-only.
Shapes | Returns a Shapes collection that represents all the elements that have been placed or inserted on the specified slide, slide master, or range of slides. Read-only.
SlideID | Returns a unique ID number for the specified slide. Read-only.
SlideIndex | Returns the index number of the specified slide within the Slides collection. Read-only.
SlideNumber | Returns the slide number. Read-only.
SlideShowTransition | Returns a SlideShowTransition object that represents the special effects for the specified slide transition. Read-only.
Tags | Returns a Tags object that represents the tags for the specified object. Read-only.
ThemeColorScheme | Returns a ThemeColorScheme object that represents the color scheme associated with the specified slide. Read-only.
TimeLine | Returns a TimeLine object that represents the animation timeline for the slide. Read-only.


Table.Application Property (PowerPoint)

 Copy code hover
[image]

Table.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a Table object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

Table Object

Other resources

Table Object Members


ChartArea.Application Property (PowerPoint)

 Copy code hover
[image]

ChartArea.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents a ChartArea object.

See also

Concepts

ChartArea Object

Other resources

ChartArea Object Members


Trendline.Period Property (PowerPoint)

 Copy code hover
[image]

Trendline.Period Property (PowerPoint)
Send feedback

Published: July 16, 2012

Returns or sets the period for the moving-average trendline. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Period

expression A variable that represents a Trendline object.

Remarks

This property can have a value from 2 through 255.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the period for the moving-average trendline on the first chart in the active document. You should run the example on a 2-D column chart that has a single series that contains 10 data points and a moving-average trendline.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)
    If .HasChart Then
        With .Chart.SeriesCollection(1).Trendlines(1)
            If .Type = xlMovingAvg Then .Period = 5
        End With
    End If
End With


TextRange.InsertSlideNumber Method (PowerPoint)

 Copy code hover
[image]

TextRange.InsertSlideNumber Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Inserts the slide number of the current slide into the specified text range. Returns a TextRange object that represents the slide number.

Syntax

expression .InsertSlideNumber

expression A variable that represents an TextRange object.

Return Value

TextRange

Remarks

The inserted slide number is automatically updated when the slide number of the current slide changes.

Example

This example inserts the slide number of the current slide after the first sentence of the first paragraph in shape two on slide one in the active presentation.

Copy code Copy code
Set sh = Application.ActivePresentation.Slides(1).Shapes(2)

Set sentOne = sh.TextFrame.TextRange.Paragraphs(1).Sentences(1)

sentOne.InsertAfter.InsertSlideNumber

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


OLEFormat.ProgID Property (PowerPoint)

 Copy code hover
[image]

OLEFormat.ProgID Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the programmatic identifier (ProgID) for the specified OLE object. Read-only.

Syntax

expression .ProgID

expression A variable that represents a OLEFormat object.

Return Value

String

Example

This example loops through all the objects on all the slides in the active presentation and sets all linked Microsoft Office Excel worksheets to be updated manually.

VBA Copy code Copy code
For Each sld In ActivePresentation.Slides

    For Each sh In sld.Shapes

        If sh.Type = msoLinkedOLEObject Then

            If sh.OLEFormat.ProgID = "Excel.Sheet" Then

                sh.LinkFormat.AutoUpdate = ppUpdateOptionManual

            End If

        End If

    Next

Next

See also

Concepts

OLEFormat Object

Other resources

OLEFormat Object Members


Series.Copy Method (PowerPoint)

 Copy code hover
[image]

Series.Copy Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

If the series has a picture fill, copies the picture to the Clipboard.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Copy

expression A variable that represents a Series object.

See also

Concepts

Series Object

Other resources

Series Object Members


Options Members (PowerPoint)

 Copy code hover
[image]

Options Members (PowerPoint)
Send feedback

Published: July 12, 2012

Represents application options in Microsoft PowerPoint.

Properties

Name | Description
DisplayPasteOptions | Determines whether Microsoft PowerPoint displays the Paste Options button, which appears directly under newly pasted text. Read/write.
ShowCoauthoringMergeChanges | Returns or sets the show changes mode. Read/write.


CustomLayout.DisplayMasterShapes Property (PowerPoint)

 Copy code hover
[image]

CustomLayout.DisplayMasterShapes Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the specified custom layout displays background objects on the slide master. Read/write.

Syntax

expression .DisplayMasterShapes

expression A variable that represents a CustomLayout object.

Return Value

MsoTriState

See also

Concepts

CustomLayout Object

Other resources

CustomLayout Object Members


ShapeRange.ShapeStyle Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.ShapeStyle Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Sets or returns the shape style index for the specified object.

Syntax

expression .ShapeStyle

expression An expression that returns a ShapeRange object.

Remarks

The value of the ShapeStyle property can be one of the MsoShapeStyleIndex constants.

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


Pane.Active Property (PowerPoint)

 Copy code hover
[image]

Pane.Active Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns whether the specified pane or window is active. Read-only.

Syntax

expression .Active

expression A variable that represents a Pane object.

Return Value

MsoTriState

Remarks

The value returned by the Active property can be one of these MsoTriState constants.

Constant | Description
msoFalse | The specified pane or window is inactive.
msoTrue | The specified pane or window is active.

Example

This example checks to see if the presentation file "test.ppt" is in the active window. If not, it saves the name of the presentation that is currently active in the variable oldWin and activates the "test.ppt" presentation.

VBA Copy code Copy code
With Application.Presentations("test.ppt").Windows(1)

    If Not .Active Then

        Set oldWin = Application.ActiveWindow

        .Activate

    End If

End With

See also

Concepts

Pane Object

Other resources

Pane Object Members


SlideRange.Design Property (PowerPoint)

 Copy code hover
[image]

SlideRange.Design Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Design object representing a design.

Syntax

expression .Design

expression A variable that represents a SlideRange object.

Return Value

Design

Example

The following example adds a title master.

VBA Copy code Copy code
Sub AddDesignMaster

    ActivePresentation.Slides(1).Design.AddTitleMaster

End Sub

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


CalloutFormat.Border Property (PowerPoint)

 Copy code hover
[image]

CalloutFormat.Border Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the text in the specified callout is surrounded by a border. Read/write.

Syntax

expression .Border

expression A variable that represents a CalloutFormat object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The text in the specified callout is not surrounded by a border.
msoTrue | The text in the specified callout is surrounded by a border.

Example

This example adds to myDocument an oval and a callout that points to the oval. The callout text does not have a border, but it does have a vertical accent bar that separates the text from the callout line.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    .AddShape msoShapeOval, 180, 200, 280, 130

    With .AddCallout(msoCalloutTwo, 420, 170, 170, 40)

        .TextFrame.TextRange.Text = "My oval"

        With .Callout

            .Accent = msoTrue

            .Border = msoFalse

        End With

    End With

End With

See also

Concepts

CalloutFormat Object

Other resources

CalloutFormat Object Members


Presentation.AcceptAll Method (PowerPoint)

 Copy code hover
[image]

Presentation.AcceptAll Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Accepts all changes.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .AcceptAll

expression A variable that represents a Presentation object.

Return Value

None

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


AddIns Object (PowerPoint)

 Copy code hover
[image]

AddIns Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

A collection of AddIn objects that represent all the Microsoft PowerPoint-specific add-ins available to PowerPoint, regardless of whether or not they are loaded. This does not include Component Object Model (COM) add-ins.

Example

Use the AddIns method to return the AddIns collection. The following example displays the names of all the add-ins that are currently loaded in PowerPoint.

VBA Copy code Copy code
For Each ad In AddIns

    If ad.Loaded Then MsgBox ad.Name

Next

Use the Add method to add a PowerPoint-specific add-in to the list of those available. The Add method adds an add-in to the list but does not load the add-in. To load the add-in, set the Loaded property of the add-in to True after you use the Add method. You can perform these two actions in a single step, as shown in the following example (note that you use the name of the add-in, not its title, with the Add method).

VBA Copy code Copy code
AddIns.Add("graphdrs.ppa").Loaded = True

Use AddIns(index), where index is the add-in's title or index number, to return a single AddIn object. The following example loads the hypothetical add-in titled "my ppt tools".

VBA Copy code Copy code
AddIns("my ppt tools").Loaded = True

Do not confuse the add-in title with the add-in name, which is the file name of the add-in. You must spell the add-in title exactly as it is spelled in the Add-Ins tab, but the capitalization does not have to match.

See also

Concepts

PowerPoint Object Model Reference

Other resources

AddIns Object Members


MediaBookmark Object (PowerPoint)

 Copy code hover
[image]

MediaBookmark Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Contains properties and methods that specify information about the bookmark of the media.

Version Information

Version Added: PowerPoint 2010

See also

Concepts

PowerPoint Object Model Reference

Other resources

MediaBookmark Object Members


HeaderFooter.Visible Property (PowerPoint)

 Copy code hover
[image]

HeaderFooter.Visible Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the visibility of the specified object or the formatting applied to the specified object. Read/write.

Syntax

expression .Visible

expression A variable that represents a HeaderFooter object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified object or object formatting is not visible.
msoTrue | The specified object or object formatting is visible.

See also

Concepts

HeaderFooter Object

Other resources

HeaderFooter Object Members


Application.Left Property (PowerPoint)

 Copy code hover
[image]

Application.Left Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets a Single that represents the distance in points from the left edge of the document, application, and slide show windows to the left edge of the application window's client area. Setting this property to a very large positive or negative value may position the window completely off the desktop. Read/write.

Syntax

expression .Left

expression A variable that represents an Application object.

See also

Concepts

Application Object

Other resources

Application Object Members


ShadowFormat.ForeColor Property (PowerPoint)

 Copy code hover
[image]

ShadowFormat.ForeColor Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a ColorFormat object that represents the foreground color for the fill, line, or shadow. Read/write.

Syntax

expression .ForeColor

expression A variable that represents a ShadowFormat object.

Return Value

ColorFormat

Example

This example adds a rectangle to myDocument and then sets the foreground color, background color, and gradient for the rectangle's fill.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes _

        .AddShape(msoShapeRectangle, 90, 90, 90, 50).Fill

    .ForeColor.RGB = RGB(128, 0, 0)

    .BackColor.RGB = RGB(170, 170, 170)

    .TwoColorGradient msoGradientHorizontal, 1

End With

This example adds a patterned line to myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddLine(10, 100, 250, 0).Line

    .Weight = 6

    .ForeColor.RGB = RGB(0, 0, 255)

    .BackColor.RGB = RGB(128, 0, 0)

    .Pattern = msoPatternDarkDownwardDiagonal

End With

See also

Concepts

ShadowFormat Object

Other resources

ShadowFormat Object Members


PublishObject.SlideShowName Property (PowerPoint)

 Copy code hover
[image]

PublishObject.SlideShowName Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the name of the custom slide show to be published as a Web presentation. Read/write.

Syntax

expression .SlideShowName

expression A variable that represents a PublishObject object.

Return Value

String

Example

The following example saves the current presentation as an HTML version 4.0 file with the name "mallard.htm." It then displays a message indicating that the current named presentation is being saved in both PowerPoint and HTML formats.

VBA Copy code Copy code
With Pres.PublishObjects(1)

    PresName = .SlideShowName

    .SourceType = ppPublishAll

    .FileName = "C:\HTMLPres\mallard.htm"

    .HTMLVersion = ppHTMLVersion4

    MsgBox ("Saving presentation " & "'" _

        & PresName & "'" & " in PowerPoint" _

        & Chr(10) & Chr(13) _

        & " format and HTML version 4.0 format")

    .Publish

End With

See also

Concepts

PublishObject Object

Other resources

PublishObject Object Members


TextRange.TrimText Method (PowerPoint)

 Copy code hover
[image]

TextRange.TrimText Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a TextRange object that represents the specified text minus any trailing spaces.

Syntax

expression .TrimText

expression A variable that represents a TextRange object.

Return Value

TextRange

Example

This example inserts the string " Text to trim " at the beginning of the text in shape two on slide one in the active presentation and then displays message boxes showing the string before and after it is trimmed.

VBA Copy code Copy code
With Application.ActivePresentation.Slides(1).Shapes(2) _

        .TextFrame.TextRange

    With .InsertBefore("   Text to trim   ")

        MsgBox "Untrimmed: " & """" & .Text & """"

        MsgBox "Trimmed: " & """" & .TrimText.Text & """"

    End With

End With

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


Presentation.DefaultLanguageID Property (PowerPoint)

 Copy code hover
[image]

Presentation.DefaultLanguageID Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets the default language of a presentation. Read/write.

Syntax

expression .DefaultLanguageID

expression A variable that represents a Presentation object.

Return Value

MsoLanguageID

Remarks

When you set the DefaultLanguageID property for a presentation, you set it for all subsequent new presentations as well.

The value of the DefaultLanguageID property can be one of these MsoLanguageID constants.

msoLanguageIDAfrikaans

msoLanguageIDAlbanian

msoLanguageIDAmharic

msoLanguageIDArabic

msoLanguageIDArabicAlgeria

msoLanguageIDArabicBahrain

msoLanguageIDArabicEgypt

msoLanguageIDArabicIraq

msoLanguageIDArabicJordan

msoLanguageIDArabicKuwait

msoLanguageIDArabicLebanon

msoLanguageIDArabicLibya

msoLanguageIDArabicMorocco

msoLanguageIDArabicOman

msoLanguageIDArabicQatar

msoLanguageIDArabicSyria

msoLanguageIDArabicTunisia

msoLanguageIDArabicUAE

msoLanguageIDArabicYemen

msoLanguageIDArmenian

msoLanguageIDAssamese

msoLanguageIDAzeriCyrillic

msoLanguageIDAzeriLatin

msoLanguageIDBasque

msoLanguageIDBelgianDutch

msoLanguageIDBelgianFrench

msoLanguageIDBengali

msoLanguageIDBrazilianPortuguese

msoLanguageIDBulgarian

msoLanguageIDBurmese

msoLanguageIDByelorussian

msoLanguageIDCatalan

msoLanguageIDCherokee

msoLanguageIDChineseHongKong

msoLanguageIDChineseMacao

msoLanguageIDChineseSingapore

msoLanguageIDCroatian

msoLanguageIDCzech

msoLanguageIDDanish

msoLanguageIDDutch

msoLanguageIDEnglishAUS

msoLanguageIDEnglishBelize

msoLanguageIDEnglishCanadian

msoLanguageIDEnglishCaribbean

msoLanguageIDEnglishIreland

msoLanguageIDEnglishJamaica

msoLanguageIDEnglishNewZealand

msoLanguageIDEnglishPhilippines

msoLanguageIDEnglishSouthAfrica

msoLanguageIDEnglishTrinidad

msoLanguageIDEnglishUK

msoLanguageIDEnglishUS

msoLanguageIDEnglishZimbabwe

msoLanguageIDEstonian

msoLanguageIDFaeroese

msoLanguageIDFarsi

msoLanguageIDFinnish

msoLanguageIDFrench

msoLanguageIDFrenchCameroon

msoLanguageIDFrenchCanadian

msoLanguageIDFrenchCotedIvoire

msoLanguageIDFrenchLuxembourg

msoLanguageIDFrenchMali

msoLanguageIDFrenchMonaco

msoLanguageIDFrenchReunion

msoLanguageIDFrenchSenegal

msoLanguageIDFrenchWestIndies

msoLanguageIDFrenchZaire

msoLanguageIDFrisianNetherlands

msoLanguageIDGaelicIreland

msoLanguageIDGaelicScotland

msoLanguageIDGalician

msoLanguageIDGeorgian

msoLanguageIDGerman

msoLanguageIDGermanAustria

msoLanguageIDGermanLiechtenstein

msoLanguageIDGermanLuxembourg

msoLanguageIDGreek

msoLanguageIDGujarati

msoLanguageIDHebrew

msoLanguageIDHindi

msoLanguageIDHungarian

msoLanguageIDIcelandic

msoLanguageIDIndonesian

msoLanguageIDInuktitut

msoLanguageIDItalian

msoLanguageIDJapanese

msoLanguageIDKannada

msoLanguageIDKashmiri

msoLanguageIDKazakh

msoLanguageIDKhmer

msoLanguageIDKirghiz

msoLanguageIDKonkani

msoLanguageIDKorean

msoLanguageIDLao

msoLanguageIDLatvian

msoLanguageIDLithuanian

msoLanguageIDMacedonian

msoLanguageIDMalayalam

msoLanguageIDMalayBruneiDarussalam

msoLanguageIDMalaysian

msoLanguageIDMaltese

msoLanguageIDManipuri

msoLanguageIDMarathi

msoLanguageIDMexicanSpanish

msoLanguageIDMixed

msoLanguageIDMongolian

msoLanguageIDNepali

msoLanguageIDNone

msoLanguageIDNoProofing

msoLanguageIDNorwegianBokmol

msoLanguageIDNorwegianNynorsk

msoLanguageIDOriya

msoLanguageIDPolish

msoLanguageIDPunjabi

msoLanguageIDRhaetoRomanic

msoLanguageIDRomanian

msoLanguageIDRomanianMoldova

msoLanguageIDRussian

msoLanguageIDRussianMoldova

msoLanguageIDSamiLappish

msoLanguageIDSanskrit

msoLanguageIDSerbianCyrillic

msoLanguageIDSerbianLatin

msoLanguageIDSesotho

msoLanguageIDSimplifiedChinese

msoLanguageIDSindhi

msoLanguageIDSlovak

msoLanguageIDSlovenian

msoLanguageIDSorbian

msoLanguageIDSpanish

msoLanguageIDSpanishArgentina

msoLanguageIDSpanishBolivia

msoLanguageIDSpanishChile

msoLanguageIDSpanishColombia

msoLanguageIDSpanishCostaRica

msoLanguageIDSpanishDominicanRepublic

msoLanguageIDSpanishEcuador

msoLanguageIDSpanishElSalvador

msoLanguageIDSpanishGuatemala

msoLanguageIDSpanishHonduras

msoLanguageIDSpanishModernSort

msoLanguageIDSpanishNicaragua

msoLanguageIDSpanishPanama

msoLanguageIDSpanishParaguay

msoLanguageIDSpanishPeru

msoLanguageIDSpanishPuertoRico

msoLanguageIDSpanishUruguay

msoLanguageIDSpanishVenezuela

msoLanguageIDSutu

msoLanguageIDSwahili

msoLanguageIDSwedish

msoLanguageIDSwedishFinland

msoLanguageIDSwissFrench

msoLanguageIDSwissGerman

msoLanguageIDSwissItalian

msoLanguageIDTajik

msoLanguageIDTamil

msoLanguageIDTatar

msoLanguageIDTelugu

msoLanguageIDThai

msoLanguageIDTibetan

msoLanguageIDTraditionalChinese

msoLanguageIDTsonga

msoLanguageIDTswana

msoLanguageIDTurkish

msoLanguageIDTurkmen

msoLanguageIDUkrainian

msoLanguageIDUrdu

msoLanguageIDUzbekCyrillic

msoLanguageIDUzbekLatin

msoLanguageIDVenda

msoLanguageIDVietnamese

msoLanguageIDWelsh

msoLanguageIDXhosa

msoLanguageIDZulu

msoLanguageIDPortuguese

Example

This example sets the default language for the active presentation, and all subsequent new presentations, to German.

VBA Copy code Copy code
ActivePresentation.DefaultLanguageID = msoLanguageIDGerman

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


PpTextLevelEffect Enumeration (PowerPoint)

 Copy code hover
[image]

PpTextLevelEffect Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Constants that specify the paragraph level by which text effects are animated, passed to and returned by the TextLevelEffect property of the AnimationSettings object.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppAnimateByAllLevels | 16 | By all levels
ppAnimateByFifthLevel | 5 | By fifth level
ppAnimateByFirstLevel | 1 | By first level
ppAnimateByFourthLevel | 4 | By fourth level
ppAnimateBySecondLevel | 2 | By second level
ppAnimateByThirdLevel | 3 | By third level
ppAnimateLevelMixed | -2 | Mixed level
ppAnimateLevelNone | 0 | No level


CalloutFormat.Parent Property (PowerPoint)

 Copy code hover
[image]

CalloutFormat.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a CalloutFormat object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

CalloutFormat Object

Other resources

CalloutFormat Object Members


XlPieSliceIndex Enumeration (PowerPoint)

 Copy code hover
[image]

XlPieSliceIndex Enumeration (PowerPoint)
Send feedback

Specifies which position on the slice to return the coordinate of.

Version Information

Version Added: Excel 2010

Name | Value | Description
xlCenterPoint | 5 | The center point of a pie slice.
xlInnerCenterPoint | 8 | The innermost center point of a doughnut slice.
xlInnerClockwisePoint | 7 | The innermost point of the most clockwise radius of a doughnut slice.
xlInnerCounterClockwisePoint | 9 | The innermost point of the most counterclockwise radius of a doughnut slice.
xlMidClockwiseRadiusPoint | 4 | The midpoint of the most clockwise radius of a slice.
xlMidCounterClockwiseRadiusPoint | 6 | The midpoint of the most counterclockwise radius of a slice.
xlOuterCenterPoint | 2 | The outer center point of the circumference of a slice.
xlOuterClockwisePoint | 3 | The outermost clockwise point of the circumference of a slice.
xlOuterCounterClockwisePoint | 1 | The outermost counterclockwise point of the circumference of a slice.


MsoAnimCommandType Enumeration (PowerPoint)

 Copy code hover
[image]

MsoAnimCommandType Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Constants that specify the type of the animation command, passed to and returned by the Type property of the CommandEffect object.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
msoAnimCommandTypeCall | 1 | Call
msoAnimCommandTypeEvent | 0 | Event
msoAnimCommandTypeVerb | 2 | Verb


Placeholders.FindByName Method (PowerPoint)

 Copy code hover
[image]

Placeholders.FindByName Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Finds the placeholder in the Placeholders collection at the specified index location or with the specified name.

Syntax

expression .FindByName(Index)

expression An expression that returns a Placeholders object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Variant | The index of the placeholder to be found.

Return Value

Shape

Remarks

Because it takes a Variant, the FindByName method makes it possible to locate a member of the Placeholders collection by specifying either the index number (an Integer or Long) or the name (a String) of an individual placeholder. Unlike the corresponding methods of other collections, such as Shapes or Slides, the Item method of the Placeholders collection takes only a Long.

Example

The following example shows how to use the FindByName method to select the title placeholder in slide one in the active presentation.

VBA Copy code Copy code
Public Sub FindByName_Example()

    PowerPoint.ActivePresentation.Slides(1).Shapes.Placeholders.FindByName("Title 1").Select

End Sub

See also

Concepts

Placeholders Object

Other resources

Placeholders Object Members


ActionSettings Object (PowerPoint)

 Copy code hover
[image]

ActionSettings Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

A collection that contains the two ActionSetting objects for a shape or text range. One ActionSetting object represents how the specified object reacts when the user clicks it during a slide show, and the other ActionSetting object represents how the specified object reacts when the user moves the mouse pointer over it during a slide show.

Example

Use the ActionSettings property to return the ActionSettings collection. Use ActionSettings(index), where index is either ppMouseClick or ppMouseOver, to return a single ActionSetting object. The following example specifies that the CalculateTotal macro be run whenever the mouse pointer passes over the shape during a slide show.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(3) _

        .ActionSettings(ppMouseOver)

    .Action = ppActionRunMacro

    .Run = "CalculateTotal"

    .AnimateAction = True

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

ActionSettings Object Members


Designs.Load Method (PowerPoint)

 Copy code hover
[image]

Designs.Load Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Design object that represents a design loaded into the master list of the specified presentation.

Syntax

expression .Load(TemplateName, Index)

expression A variable that represents a Designs object.

Parameters

Name | Required/Optional | Data Type | Description
TemplateName | Required | String | The path to the design template.
Index | Optional | Long | The index number of the design template in the collection of design templates. The default is -1, which means the design template is added to the end of the list of designs in the presentation.

Return Value

Design

Example

This example add a design template to the beginning of the collection of design templates in the active presentation. This example assumes the "artsy.pot" template is located at the specified path.

VBA Copy code Copy code
Sub LoadDesign()

    ActivePresentation.Designs.Load TemplateName:="C:\Program Files\" & _

        "Microsoft Office\Templates\Presentation Designs\Balance.pot", Index:=1

End Sub

See also

Concepts

Designs Object

Other resources

Designs Object Members


SlideShowSettings.ShowWithAnimation Property (PowerPoint)

 Copy code hover
[image]

SlideShowSettings.ShowWithAnimation Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the specified slide show displays shapes with assigned animation settings. Read/write.

Syntax

expression .ShowWithAnimation

expression A variable that represents a SlideShowSettings object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified slide show displays shapes without assigned animation settings.
msoTrue | The specified slide show displays shapes with assigned animation settings.

Example

This example runs a slide show of the active presentation with animation and narration turned off.

VBA Copy code Copy code
With ActivePresentation.SlideShowSettings

    .ShowWithAnimation = msoFalse

    .ShowWithNarration = msoFalse

    .Run

End With

See also

Concepts

SlideShowSettings Object

Other resources

SlideShowSettings Object Members


ColorEffect.Parent Property (PowerPoint)

 Copy code hover
[image]

ColorEffect.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a ColorEffect object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

ColorEffect Object

Other resources

ColorEffect Object Members


ResampleMediaTask.IsLinked Property (PowerPoint)

 Copy code hover
[image]

ResampleMediaTask.IsLinked Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns whether the sample is linked. Read-only.

Syntax

expression .IsLinked

expression A variable that represents a ResampleMediaTask object.

See also

Concepts

ResampleMediaTask Object

Other resources

ResampleMediaTask Object Members


PublishObject Object (PowerPoint)

 Copy code hover
[image]

PublishObject Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a complete or partial loaded presentation that is available for publishing to HTML. The PublishObject object is a member of the PublishObjects collection.

Remarks

You can specify the content and attributes of the published presentation by setting various properties of the PublishObject object. For example, the SourceType property defines the portion of a loaded presentation to be published. The RangeStart property and the RangeEnd property specify the range of slides to publish, and the SpeakerNotes property designates whether or not to publish the speaker's notes.

Example

Use PublishObjects(index), where index is always "1", to return the single object for a loaded presentation. There can be only one PublishObject object for each loaded presentation. This example publishes slides three through five of presentation two to HTML. It names the published presentation Mallard.htm.

VBA Copy code Copy code
With Presentations(2).PublishObjects(1)

    .FileName = "C:\Test\Mallard.htm"

    .SourceType = ppPublishSlideRange

    .RangeStart = 3

    .RangeEnd = 5

    .Publish

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

PublishObject Object Members


TableBackground.Shadow Property (PowerPoint)

 Copy code hover
[image]

TableBackground.Shadow Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a ShadowFormat object that represents the formatting of the shadow associated with the table background. Read-only.

Syntax

expression .Shadow

expression An expression that returns a TableBackground object.

Return Value

ShadowFormat

Remarks

You can control the appearance and behavior of a shadow applied to a table by setting the properties of the ShadowFormat object returned by the Shadow property. For example, you can specify the color of the shadow, its degree of transparency, whether it rotates when the table shape is rotated, and whether it is visible.

See also

Concepts

TableBackground Object

Other resources

TableBackground Object Members


CustomLayout.FollowMasterBackground Property (PowerPoint)

 Copy code hover
[image]

CustomLayout.FollowMasterBackground Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Determines whether the specified custom layout follows the slide master background. Read/write.

Syntax

expression .FollowMasterBackground

expression A variable that represents a CustomLayout object.

Return Value

MsoTriState

See also

Concepts

CustomLayout Object

Other resources

CustomLayout Object Members


Master Methods (PowerPoint)

 Copy code hover
[image]

Master Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
ApplyTheme | Applies a theme or design template to the specified slide master, title master, handout master, notes master, or design master.
Delete | Deletes the specified Master object.


Application.LanguageSettings Property (PowerPoint)

 Copy code hover
[image]

Application.LanguageSettings Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a LanguageSettings object that contains information about the language settings in Microsoft PowerPoint. Read-only.

Syntax

expression .LanguageSettings

expression A variable that represents a Application object.

See also

Concepts

Application Object

Other resources

Application Object Members


ChartFont.Name Property (PowerPoint)

 Copy code hover
[image]

ChartFont.Name Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the name of the object. Read/write String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Name

expression A variable that represents a ChartFont object.

See also

Concepts

ChartFont Object

Other resources

ChartFont Object Members


CustomLayout.Design Property (PowerPoint)

 Copy code hover
[image]

CustomLayout.Design Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Design object that represents the design template associated with the specified custom layout.

Syntax

expression .Design

expression A variable that represents a CustomLayout object.

Return Value

Design

See also

Concepts

CustomLayout Object

Other resources

CustomLayout Object Members


RotationEffect.To Property (PowerPoint)

 Copy code hover
[image]

RotationEffect.To Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns a Single that represents the ending rotation of an object in degrees, specified relative to the screen (for example, 90 degrees is completely horizontal). Read/write.

Syntax

expression .To

expression A variable that represents a RotationEffect object.

Return Value

Single

Remarks

Use this property in conjunction with the From property to transition from one rotation angle to another.

The default value is Empty in which case the current position of the object is used.

Do not confuse this property with the ToX or ToY properties of the ScaleEffect and MotionEffect objects, which are only used for scaling or motion effects.

Example

The following example adds a rotation effect and immediately changes its rotation angle from 90 degrees to 270 degrees.

VBA Copy code Copy code
Sub AddAndChangeRotationEffect()

    Dim effBlinds As Effect

    Dim tmlTiming As TimeLine

    Dim shpRectangle As Shape

    Dim animColor As AnimationBehavior

    Dim rtnEffect As RotationEffect

    Set shpRectangle = ActivePresentation.Slides(1).Shapes(1)

    Set tmlTiming = ActivePresentation.Slides(1).TimeLine

    Set effBlinds = tmlTiming.MainSequence.AddEffect(Shape:=shpRectangle, _

        effectId:=msoAnimEffectBlinds)

    Set animColor = tmlTiming.MainSequence(1).Behaviors.Add(Type:=msoAnimTypeRotation)

    Set rtnEffect = animColor.RotationEffect

    rtnEffect.From = 90

    rtnEffect.To = 270

End Sub

See also

Concepts

RotationEffect Object

Other resources

RotationEffect Object Members


ThreeDFormat.SetThreeDFormat Method (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.SetThreeDFormat Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets the preset extrusion format.

Syntax

expression .SetThreeDFormat(PresetThreeDFormat)

expression A variable that represents a ThreeDFormat object.

Parameters

Name | Required/Optional | Data Type | Description
PresetThreeDFormat | Required | MsoPresetThreeDFormat | Specifies a preset extrusion format that corresponds to one of the options (numbered from left to right, from top to bottom) displayed when you click the 3-D Rotation submenu on the Shape Effects menu.

Remarks

Each preset extrusion format contains a set of preset values for the various properties of the extrusion.

This method sets the PresetThreeDFormat property to the format specified by the PresetThreeDFormat parameter.

The value of the PresetThreeDFormat parameter can be one of these MsoPresetThreeDFormat constants. Specifying msoPresetThreeDFormatMixed causes an error.

msoThreeD1

msoThreeD2

msoThreeD3

msoThreeD4

msoThreeD5

msoThreeD6

msoThreeD7

msoThreeD8

msoThreeD9

msoThreeD10

msoThreeD11

msoThreeD12

msoThreeD13

msoThreeD14

msoThreeD15

msoThreeD16

msoThreeD17

msoThreeD18

msoThreeD19

msoThreeD20

Example

This example adds an oval to myDocument and sets its extrusion format to 3D Style 12.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes _

        .AddShape(msoShapeOval, 30, 30, 50, 25).ThreeD

    .Visible = True

    .SetThreeDFormat msoThreeD12

End With

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


Application.NewPresentation Property (PowerPoint)

 Copy code hover
[image]

Application.NewPresentation Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a NewFile object that represents a presentation listed on the New Presentation task pane. Read-only.

Syntax

expression .NewPresentation

expression A variable that represents an Application object.

Return Value

NewFile

Example

This example lists a presentation on the New Presentation task pane at the bottom of the last section in the pane.

VBA Copy code Copy code
Sub CreateNewPresentationListItem()

    Application.NewPresentation.Add FileName:="C:\Presentation.ppt"

    Application.CommandBars("Task Pane").Visible = True

End Sub

See also

Concepts

Application Object

Other resources

Application Object Members


XlSeriesNameLevel Enumeration (PowerPoint)

 Copy code hover
[image]

XlSeriesNameLevel Enumeration (PowerPoint)
Send feedback

Series-name-level constants passed to and returned by the Chart.SeriesNameLevel property.

Version information

Version Added: PowerPoint 2013

Members

Name | Value | Description
xlSeriesNameLevelAll | -1 | Sets series names to all series name levels within range on the chart. The default.
xlSeriesNameLevelCustom | -2 | Indicates literal data in the series names.
xlSeriesNameLevelNone | -3 | Sets no series names in the chart.


Hyperlink.Application Property (PowerPoint)

 Copy code hover
[image]

Hyperlink.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a Hyperlink object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

Hyperlink Object

Other resources

Hyperlink Object Members


Shapes.AddPlaceholder Method (PowerPoint)

 Copy code hover
[image]

Shapes.AddPlaceholder Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Restores a previously deleted placeholder on a slide. Returns a Shape object that represents the restored placeholder.

Syntax

expression .AddPlaceholder(Type, Left, Top, Width, Height)

expression A variable that represents a Shapes object.

Parameters

Name | Required/Optional | Data Type | Description
Type | Required | PpPlaceholderType | The type of placeholder. Placeholders of type ppPlaceholderVerticalBody or ppPlaceholderVerticalTitle are found only on slides of layout type ppLayoutVerticalText, ppLayoutClipArtAndVerticalText, ppLayoutVerticalTitleAndText, or ppLayoutVerticalTitleAndTextOverChart. You cannot create slides with any of these layouts from the user interface; you must create them programmatically by using the Add method or by setting the Layout property of an existing slide.
Left | Optional | Single | The position (in points) of the upper-left corner of the placeholder relative to the upper-left corner of the document.
Top | Optional | Single | The position (in points) of the upper-left corner of the placeholder relative to the upper-left corner of the document.
Width | Optional | Single | The width of the placeholder, in points.
Height | Optional | Single | The height of the placeholder, in points.

Return Value

Shape

Remarks

If more than one placeholder of a specified type has been deleted from the slide, the AddPlaceholder method will add them back to the slide, one by one, starting with the placeholder that has the lowest original index number.

Example

Suppose that slide two in the active presentation originally had a title at the top of the slide that's been deleted, either manually or with the following line of code.

VBA Copy code Copy code
ActivePresentation.Slides(2).Shapes.Placeholders(1).Delete

This example restores the deleted placeholder to slide two.

VBA Copy code Copy code
Application.ActivePresentation.Slides(2) _

    .Shapes.AddPlaceholder ppPlaceholderTitle

See also

Concepts

Shapes Object

Other resources

Shapes Object Members


Shapes.AddComment Method (PowerPoint)

 Copy code hover
[image]

Shapes.AddComment Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Adds a comment. Returns a Shape object that represents the new comment.

Syntax

expression .AddComment(Left, Top, Width, Height)

expression A variable that represents a Shapes object.

Parameters

Name | Required/Optional | Data Type | Description
Left | Optional | Single | The position (in points) of the upper-left corner of the comment bounding box relative to the upper-left corner of the document. By default, the comment is placed in the upper-left corner of the document.
Top | Optional | Single | The position (in points) of the upper-left corner of the comment bounding box relative to the upper-left corner of the document. By default, the comment is placed in the upper-left corner of the document.
Width | Optional | Single | The width of the comment, in points. By default, the comment is 100 points high and 100 points wide.
Height | Optional | Single | The height of the comment, in points. By default, the comment is 100 points high and 100 points wide.

Return Value

Shape

Example

This example adds a comment that contains the text "Test Comment" to myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddComment(100, 100, 150, 150)

    .TextFrame.TextRange.Text = .TextFrame _

        .TextRange.Text + "Test Comment"

End With

See also

Concepts

Shapes Object

Other resources

Shapes Object Members


ChartCharacters.Font Property (PowerPoint)

 Copy code hover
[image]

ChartCharacters.Font Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the font of the specified object. Read-only ChartFont.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Font

expression A variable that represents a ChartCharacters object.

See also

Concepts

ChartCharacters Object

Other resources

ChartCharacters Object Members


Point.Left Property (PowerPoint)

 Copy code hover
[image]

Point.Left Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a value that represents the distance, in points, from the left edge of the object to the left edge of the chart area. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Left

expression A variable that represents a Point object.

Return Value

Double

See also

Concepts

Point Object

Other resources

Point Object Members


How to: Work with Panes and Views

 Copy code hover
[image]

How to: Work with Panes and Views
Send feedback

Changing the Active View

You can return or set the current view in the active document window with the ViewType property. This example changes the view in the active document window to slide view.

VBA Copy code Copy code
ActiveWindow.ViewType = ppViewSlide

Changing Panes in Normal View

In normal view, you can use the ViewType property with the active Pane object to return the active pane. The ViewType property returns one of the following PpViewType constants, identifying the active pane: ppViewNotesPage, ppViewOutline, or ppViewSlide. All other views have only one pane and the ViewType property returns the same PpViewType constant value as the active document window.

You can activate a pane by setting the ViewType property or by using the Activate method. This example returns the value of the ViewType property to identify the active view and active pane. If the active view is normal view and the active pane is the notes pane, then the slide pane is activated with the Activate method.

VBA Copy code Copy code
With ActiveWindow
    If .ViewType = ppViewNormal and _
            .ActivePane.ViewType = ppViewNotesPage Then
        .Panes(2).Activate
    End If
End With

Resizing panes

You can use the SplitHorizontal and the SplitVertical properties to reposition the pane dividers in normal view to the specified percentage of the available document window. This resizes the panes on either side of the divider. The maximum value of these properties is always less than 100% because the slide pane has a minimum size that depends on a 10% zoom level. This example sets the percentage of the available document window height that the slide pane occupies to 65 percent, leaving the notes pane at 35 percent.

VBA Copy code Copy code
ActiveWindow.SplitVertical = 65


AxisTitle.Delete Method (PowerPoint)

 Copy code hover
[image]

AxisTitle.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Delete

expression A variable that represents an AxisTitle object.

See also

Concepts

AxisTitle Object

Other resources

AxisTitle Object Members


SlideRange.NotesPage Property (PowerPoint)

 Copy code hover
[image]

SlideRange.NotesPage Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a SlideRange object that represents the notes pages for the specified slide or range of slides. Read-only.

Syntax

expression .NotesPage

expression A variable that represents a SlideRange object.

Return Value

SlideRange

Remarks

The NotesPage property returns the notes page for either a single slide or a range of slides and allows you to make changes only to those notes pages. If you want to make changes that affect all notes pages, use the NotesMaster property to return the Slide object that represents the notes master.

Example

This example sets the background fill for the notes page for slide one in the active presentation.

VBA Copy code Copy code
With ActivePresentation.Slides(1). NotesPage
    .FollowMasterBackground = False
    .Background.Fill.PresetGradient _
        msoGradientHorizontal, 1, msoGradientLateSunset
End With
Note Note

The following properties and methods will fail if applied to a SlideRange object that represents a notes page: Copy method, Cut method, Delete method, Duplicate method, HeadersFooters property, Hyperlinks property, Layout property, PrintSteps property, SlideShowTransition property.

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


Chart.ChartData Property (PowerPoint)

 Copy code hover
[image]

Chart.ChartData Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns information about the linked or embedded data associated with a chart. Read-only ChartData.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ChartData

expression A variable that represents a Chart object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example uses the Activate method to display the data associated with the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1).Chart.ChartData

    .Activate

End With

See also

Concepts

Chart Object

Other resources

Chart Object Members


ChartFormat.AutoShapeType Property (PowerPoint)

 Copy code hover
[image]

ChartFormat.AutoShapeType Property (PowerPoint)
Send feedback

Returns or sets the auto shape type of the specified object. Read-write MSOAutoShapeType.

Version information

Version Added: PowerPoint 2013

Syntax

expression .AutoShapeType

expression A variable that represents a ChartFormat object.

Property value

<unknown type>


DataLabel.Separator Property (PowerPoint)

 Copy code hover
[image]

DataLabel.Separator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the separator used for the data labels on a chart. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Separator

expression A variable that represents a DataLabel object.

Remarks

If you use a string, you will get a string as the separator. If you use xlDataLabelSeparatorDefault (= 1), you will get the default data label separator, which is either a comma or a newline character, depending on the data label.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the data label separator for the first series on the first chart in the active document to a semicolon.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1). _

            DataLabels.Separator = ";"

    End If

End With

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


ProtectedViewWindow Methods (PowerPoint)

 Copy code hover
[image]

ProtectedViewWindow Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Activate | Activates the specified window.
Close | Closes the specified window.
Edit | Changes the password of the ProtectedViewWindow object.


Interior.Color Property (PowerPoint)

 Copy code hover
[image]

Interior.Color Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the primary color of the object. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Color

expression A variable that represents an Interior object.

See also

Concepts

Interior Object

Other resources

Interior Object Members


Presentations Methods (PowerPoint)

 Copy code hover
[image]

Presentations Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Add | Creates a presentation. Returns a Presentation object that represents the new presentation.
CanCheckOut | Returns True if Microsoft PowerPoint can check out a specified presentation from a server.
CheckOut | Copies a specified presentation from a server to a local computer for editing. Returns a String that represents the local path and file name of the presentation checked out.
Item | Returns a single Presentation object from the specified Presentations collection.
Open | Opens the specified presentation. Returns a Presentation object that represents the opened presentation.
Open2007 | Opens the specified presentation and provides the option to repair the presentation file. Returns a Presentation object that represents the opened presentation.


Shape.PickupAnimation Method (PowerPoint)

 Copy code hover
[image]

Shape.PickupAnimation Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Picks up all animation from the Shape object.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .PickupAnimation

expression A variable that represents a Shape object.

See also

Concepts

Shape Object

Other resources

Shape Object Members


ChartTitle Object (PowerPoint)

 Copy code hover
[image]

ChartTitle Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the chart title.

Version Information

Version Added: PowerPoint 2007

Remarks

Use the ChartTitle property to return the ChartTitle object.

The ChartTitle object does not exist and cannot be used unless the HasTitle property for the chart is True.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example adds a title to the first embedded chart in the document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1).Chart

    .HasTitle = True

    .ChartTitle.Text = "February Sales"

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

ChartTitle Object Members


ActionSetting Object (PowerPoint)

 Copy code hover
[image]

ActionSetting Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Contains information about how the specified shape or text range reacts to mouse actions during a slide show.

Remarks

The ActionSetting object is a member of the ActionSettings collection. The ActionSettings collection contains one ActionSetting object that represents how the specified object reacts when the user clicks it during a slide show and one ActionSetting object that represents how the specified object reacts when the user moves the mouse pointer over it during a slide show.

If you've set properties of the ActionSetting object that don't seem to be taking effect, make sure that you've set the Action property to the appropriate value.

Example

Use ActionSettings(index), where index is the either ppMouseClick or ppMouseOver, to return a single ActionSetting object. The following example sets the mouse-click action for the text in the third shape on slide one in the active presentation to an Internet link.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(3) _
        .TextFrame.TextRange.ActionSettings(ppMouseClick)
    .Action = ppActionHyperlink
    .Hyperlink.Address = "http://www.microsoft.com"
End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

ActionSetting Object Members


Shape.Tags Property (PowerPoint)

 Copy code hover
[image]

Shape.Tags Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Tags object that represents the tags for the specified object. Read-only.

Syntax

expression .Tags

expression A variable that represents a Shape object.

Return Value

Tags

Example

Note Note

Tag values are added and stored in uppercase text. You should perform tests on tag values using uppercase text, as shown in the second example.

This example adds a tag named "REGION" and a tag named "PRIORITY" to slide one in the active presentation.

VBA Copy code Copy code
With Application.ActivePresentation.Slides(1).Tags

    .Add "Region", "East"     'Adds "Region" tag with value "East"

    .Add "Priority", "Low"    'Adds "Priority" tag with value "Low"

End With

This example searches through the tags for each slide in the active presentation. If there's a tag named "PRIORITY," a message box displays the tag value. If the object doesn't have a tag named "PRIORITY," the example adds this tag with the value "Unknown."

VBA Copy code Copy code
For Each s In Application.ActivePresentation.Slides

    With s.Tags

        found = False

        For i = 1 To .Count

          If .Name(i) = "PRIORITY" Then

              found = True

              slNum = .Parent.SlideIndex

              MsgBox "Slide " & slNum & " Priority: " & .Value(i)

          End If

        Next

        If Not found Then

          slNum = .Parent.SlideIndex

          .Add "Priority", "Unknown"

          MsgBox "Slide " & slNum & " Priority tag added: Unknown"

        End If

    End With

Next

See also

Concepts

Shape Object

Other resources

Shape Object Members


SlideRange.Delete Method (PowerPoint)

 Copy code hover
[image]

SlideRange.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the specified SlideRange object.

Syntax

expression .Delete

expression A variable that represents a SlideRange object.

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


Presentation Methods (PowerPoint)

 Copy code hover
[image]

Presentation Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
AcceptAll | Accepts all changes.
AddTitleMaster | Adds a title master to the specified presentation and returns a Master object that represents the title master.
AddToFavorites | Adds a shortcut that represents the current selection in the specified presentation to the Windows Favorites folder.
ApplyTemplate | Applies a design template to the specified presentation.
ApplyTemplate2 | Applies a design template and theme variant to the presentation.
ApplyTheme | Applies a theme or design template to the specified presentation.
CanCheckIn | Returns True if Microsoft PowerPoint can check in a specified presentation to a server.
CheckIn | Returns a presentation from a local computer to a server, and sets the local file to read-only so that it cannot be edited locally.
CheckInWithVersion | Returns a presentation from a local computer to a server, and sets the local file to read-only so that it cannot be edited locally.
Close | Closes the specified presentation.
Convert2 | Converts a file to a different file type.
CreateVideo | Creates a video in a Presentation object.
EndReview | Ends the review cycle.
EnsureAllMediaUpgraded | Ensures that all media is up to date in a Presentation object.
Export | Exports each slide in the presentation, using the specified graphics filter, and saves the exported files in the specified folder.
ExportAsFixedFormat | Publishes a copy of a Microsoft PowerPoint presentation as a file in a fixed format, either PDF or XPS.
ExportAsFixedFormat2 | Publishes a copy of a Microsoft PowerPoint presentation as a file in a fixed format, either PDF or XPS.
FollowHyperlink | Displays a cached document, if it has already been downloaded. Otherwise, this method resolves the hyperlink, downloads the target document and displays it in the appropriate application.
GetWorkflowTasks | Returns the Microsoft Office WorkflowTasks collection.
GetWorkflowTemplates | Returns the Microsoft Office WorkflowTemplates collection.
LockServerFile | Locks the presentation on the Microsoft Office SharePoint server to prevent its modification.
Merge | Merges the changes in one presentation with another.
MergeWithBaseline | Merges a presentation into another presentation.
NewWindow | Opens a new window that contains the specified presentation. Returns a DocumentWindow object that represents the new window.
PrintOut | Prints the specified presentation.
PublishSlides | Creates a Web presentation (in HTML format) containing slides from any loaded presentation. You can view the published presentation in a Web browser.
RejectAll | Rejects all changes.
RemoveDocumentInformation | Removes document information, such as personal information, comments, and document properties, from a Microsoft PowerPoint presentation.
Save | Saves the specified presentation.
SaveAs | Saves a presentation that's never been saved, or saves a previously saved presentation under a different name.
SaveCopyAs | Saves a copy of the specified presentation to a file without modifying the original.
SendFaxOverInternet | Sends a presentation as a fax to the specified recipients.
SetPasswordEncryptionOptions | Sets the options Microsoft PowerPoint uses for encrypting presentations with passwords.
UpdateLinks | Updates linked OLE objects in the specified presentation.


PageSetup.SlideOrientation Property (PowerPoint)

 Copy code hover
[image]

PageSetup.SlideOrientation Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the on-screen and printed orientation of slides in the specified presentation. Read/write.

Syntax

expression .SlideOrientation

expression A variable that represents a PageSetup object.

Return Value

MsoOrientation

Remarks

The value of the SlideOrientation property can be one of these MsoOrientation constants.

msoOrientationHorizontal

msoOrientationMixed

msoOrientationVertical

Example

This example sets orientation of all slides in the active presentation to vertical (portrait).

VBA Copy code Copy code
Application.ActivePresentation.PageSetup.SlideOrientation = msoOrientationVertical

See also

Concepts

PageSetup Object

Other resources

PageSetup Object Members


View.Type Property (PowerPoint)

 Copy code hover
[image]

View.Type Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the type of view. Read-only.

Syntax

expression .Type

expression A variable that represents a View object.

Return Value

PpViewType

Remarks

The value of the Type property can be one of these PpViewType constants.

ppViewHandoutMaster

ppViewMasterThumbnails

ppViewNormal

ppViewNotesMaster

ppViewNotesPage

ppViewOutline

ppViewPrintPreview

ppViewSlide

ppViewSlideMaster

ppViewSlideSorter

ppViewThumbnails

ppViewTitleMaster

See also

Concepts

View Object

Other resources

View Object Members


Points.Parent Property (PowerPoint)

 Copy code hover
[image]

Points.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents a Points object.

See also

Concepts

Points Object

Other resources

Points Object Members


Application.ProductCode Property (PowerPoint)

 Copy code hover
[image]

Application.ProductCode Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the Microsoft PowerPoint globally unique identifier (GUID). Read-only.

Syntax

expression .ProductCode

expression A variable that represents a Application object.

Return Value

String

Remarks

You might use the GUID, for example, when making program calls to an Application Programming Interface (API).

Example

This example returns the PowerPoint GUID to the variable pptGUID.

VBA Copy code Copy code
Dim pptGUID As String

pptGUID = Application.ProductCode

See also

Concepts

Application Object

Other resources

Application Object Members


Pane Object (PowerPoint)

 Copy code hover
[image]

Pane Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

An object representing one of the three panes in normal view or the single pane of any other view in the document window.

Remarks

Use Panes(index), where index is the index number for a pane, to return a single Pane object. The following table lists the names of the panes in normal view with their corresponding index numbers.

Pane | Index number
Outline | 1
Slide | 2
Notes | 3

When using a document window view other than normal view, use Panes(1) to reference the single Pane object.

Use the Activate method to make the specified pane active.

Use the ViewType property to determine which pane is active.

Normal view is the only view with multiple panes. All other document window views have only a single pane, which is the document window.

Example

The following example uses the ViewType property to determine whether the slide pane is the active pane. If it is, then the Activate method makes the notes pane the active pane.

VBA Copy code Copy code
With ActiveWindow

    If .ActivePane.ViewType = ppViewSlide Then

        .Panes(3).Activate

    End If

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

Pane Object Members


ChartCharacters.Insert Method (PowerPoint)

 Copy code hover
[image]

ChartCharacters.Insert Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Inserts a string preceding the selected characters.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Insert(String)

expression A variable that represents a ChartCharacters object.

Parameters

Name | Required/Optional | Data Type | Description
String | Required | String | The string to insert.

See also

Concepts

ChartCharacters Object

Other resources

ChartCharacters Object Members


TimeLine Properties (PowerPoint)

 Copy code hover
[image]

TimeLine Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
InteractiveSequences | Returns a Sequences object that represents animations that are triggered by click a specified shape.
MainSequence | Returns a Sequence object that represents the collection of Effect objects in the main animation sequence of a slide.
Parent | Returns the parent object for the specified object.


SlideShowWindow.Activate Method (PowerPoint)

 Copy code hover
[image]

SlideShowWindow.Activate Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Activates the specified object.

Syntax

expression .Activate

expression A variable that represents a SlideShowWindow object.

See also

Concepts

SlideShowWindow Object

Other resources

SlideShowWindow Object Members


View Methods (PowerPoint)

 Copy code hover
[image]

View Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
GotoSlide | Switches to the specified slide.
Paste | Pastes the contents of the Clipboard into the active view. Attempting to paste an object into a view that won't accept it causes an error.
PasteSpecial | Pastes the current contents of the Clipboard into the view represented by the View object.
Player | Allows access to playback controls for the associated view in the current window.
PrintOut | Prints the specified presentation.


Shape.PickUp Method (PowerPoint)

 Copy code hover
[image]

Shape.PickUp Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Copies the formatting of the specified shape. Use the Apply method to apply the copied formatting to another shape.

Syntax

expression .PickUp

expression A variable that represents a Shape object.

Example

This example copies the formatting of shape one on myDocument and then applies the copied formatting to shape two.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument

    .Shapes(1).PickUp

    .Shapes(2).Apply

End With

See also

Concepts

Shape Object

Other resources

Shape Object Members


MediaFormat.Application Property (PowerPoint)

 Copy code hover
[image]

MediaFormat.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Application

expression An expression that returns a MediaFormat object.

Return Value

Application

See also

Concepts

MediaFormat Object

Other resources

MediaFormat Object Members


Points Properties (PowerPoint)

 Copy code hover
[image]

Points Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Count | Returns the number of objects in the collection. Read-only Long.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Parent | Returns the parent for the specified object. Read-only Object.


AxisTitle.Shadow Property (PowerPoint)

 Copy code hover
[image]

AxisTitle.Shadow Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a value that determines whether the object has a shadow. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Shadow

expression A variable that represents an AxisTitle object.

See also

Concepts

AxisTitle Object

Other resources

AxisTitle Object Members


ColorFormat.ObjectThemeColor Property (PowerPoint)

 Copy code hover
[image]

ColorFormat.ObjectThemeColor Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the theme color of the specified ColorFormat object. Read/Write.

Syntax

expression .ObjectThemeColor

expression An expression that returns a ColorFormat object.

Return Value

MsoThemeColorIndex

Remarks

The value of the ObjectThemeColor property can be one of these MsoThemeColorIndex constants.

Example

The following example shows how to use the ObjectThemeColor property to get the theme color of the foreground fill of shape one on slide one of the active presentation.

VBA Copy code Copy code
Public Sub ObjectThemeColor_Example()

    Debug.Print ActivePresentation.Slides(1).Shapes(1).Fill.ForeColor.ObjectThemeColor

End Sub

See also

Concepts

ColorFormat Object

Other resources

ColorFormat Object Members


ChartGroup.SeriesLines Property (PowerPoint)

 Copy code hover
[image]

ChartGroup.SeriesLines Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the series lines for a 2-D stacked bar, 2-D stacked column, pie-of-pie, or bar-of-pie chart. Read-only SeriesLines.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .SeriesLines

expression A variable that represents a ChartGroup object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example enables series lines for chart group one of the first chart in the active document, and then sets the line style, weight, and color of the series lines. You should run the example on a 2-D stacked column chart that has two or more series.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.ChartGroups(1)

            .HasSeriesLines = True

            With .SeriesLines.Border

                .LineStyle = xlThin

                .Weight = xlMedium

                .ColorIndex = 3

            End With

        End With

    End If

End With

See also

Concepts

ChartGroup Object

Other resources

ChartGroup Object Members


CalloutFormat.AutoLength Property (PowerPoint)

 Copy code hover
[image]

CalloutFormat.AutoLength Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the first segment of the callout retains the fixed length specified by the Length property, or is scaled automatically, whenever the callout is moved. Read-only.

Syntax

expression .AutoLength

expression A variable that represents an CalloutFormat object.

Return Value

MsoTriState

Remarks

This property is read-only. However, you can use the AutomaticLength method to set this property to msoTrue and the CustomLength method to set this property to msoFalse.

The value returned by the AutoLength property can be one of these MsoTriState constants. This property applies only to callouts whose lines consist of more than one segment (types msoCalloutThree and msoCalloutFour).

Constant | Description
msoFalse | The first segment of the callout retains the fixed length specified by the Length property whenever the callout is moved.
msoTrue | The first segment of the callout line (the segment attached to the text callout box) is scaled automatically whenever the callout is moved.

Example

This example switches between an automatically scaling first segment and one with a fixed length for the callout line for shape one on myDocument. For the example to work, shape one must be a callout.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(1).Callout

    If .AutoLength Then

        .CustomLength 50

    Else

        .AutomaticLength

    End If

End With

See also

Concepts

CalloutFormat Object

Other resources

CalloutFormat Object Members


Presentation.HasHandoutMaster Property (PowerPoint)

 Copy code hover
[image]

Presentation.HasHandoutMaster Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Indicates whether the presentation has media that resides on a handout master. Read-only

Version Information

Version Added: PowerPoint 2010

Syntax

expression .HasHandoutMaster

expression A variable that represents a Presentation object.

Return Value

Boolean

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


Application.PresentationBeforeSave Event (PowerPoint)

 Copy code hover
[image]

Application.PresentationBeforeSave Event (PowerPoint)
See also Send feedback

Published: July 16, 2012

Occurs before a presentation is saved.

Syntax

expression .PresentationBeforeSave(Pres, Cancel)

expression A variable that represents an Application object.

Parameters

Name | Required/Optional | Data Type | Description
Pres | Required | Presentation | The presentation being saved.
Cancel | Required | Boolean | True to cancel the save process.

Remarks

This event is triggered as the Save As dialog box appears.

To access the Application events, declare an Application variable in the General Declarations section of your code. Then set the variable equal to the Application object for which you want to access events. For information about using events with the Microsoft PowerPoint Application object, see How to: Use Events with the Application Object.

Example

This example checks if there are revisions in a presentation and, if there are, asks whether to save the presentation. If a user's response is no, the save process is canceled. This example assumes an Application object called PPTApp has been declared by using the WithEvents keyword.

VBA Copy code Copy code
Private Sub PPTApp_PresentationBeforeSave(ByVal Pres As Presentation, _

        Cancel As Boolean)

    Dim intResponse As Integer

    Set Pres = ActivePresentation

    If Pres.HasRevisionInfo Then

        intResponse = MsgBox(Prompt:="The presentation contains revisions. " & _

            "Do you want to accept the revisions before saving?", Buttons:=vbYesNo)

        If intResponse = vbYes Then

            Cancel = True

            MsgBox "Your presentation was not saved."

        End If

    End If

End Sub

See also

Concepts

Application Object

Other resources

Application Object Members


Borders Methods (PowerPoint)

 Copy code hover
[image]

Borders Methods (PowerPoint)
Send feedback

Published: July 12, 2012

This object has the following methods:

Methods

Name | Description
Item | Returns a LineFormat object for the specified border from the Borders collection.


NamedSlideShows Members (PowerPoint)

 Copy code hover
[image]

NamedSlideShows Members (PowerPoint)
Send feedback

Published: July 16, 2012

A collection of all the NamedSlideShow objects in the presentation. Each NamedSlideShow object represents a custom slide show.

Methods

Name | Description
Add | Creates a new named slide show and adds it to the collection of named slide shows in the specified presentation. Returns a NamedSlideShow object that represents the new named slide show.
Item | Returns a single NamedSlideShow object from the specified NamedSlideShows collection.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


Presentation.WritePassword Property (PowerPoint)

 Copy code hover
[image]

Presentation.WritePassword Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns the password for saving changes to the specified document. Read/write.

Syntax

expression .WritePassword

expression A variable that represents a Presentation object.

Return Value

String

Example

This example sets the password for saving changes to the active presentation.

VBA Copy code Copy code
Sub SetSavePassword()

    ActivePresentation.WritePassword = complexstrPWD 'global variable

End Sub

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


BulletFormat.Character Property (PowerPoint)

 Copy code hover
[image]

BulletFormat.Character Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the Unicode character value that is used for bullets in the specified text. Read/write.

Syntax

expression .Character

expression A variable that represents a BulletFormat object.

Return Value

Long

Example

This example sets the bullet character for shape two on slide one in the active presentation.

VBA Copy code Copy code
Set frame2 = ActivePresentation.Slides(1).Shapes(2).TextFrame

With frame2.TextRange.ParagraphFormat.Bullet

    .Character = 8226

    .Visible = True

End With

See also

Concepts

BulletFormat Object

Other resources

BulletFormat Object Members


TextFrame2 Properties (PowerPoint)

 Copy code hover
[image]

TextFrame2 Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified TextFrame2 object. Read-only.
AutoSize | Returns or sets a value that indicates whether the size of the specified shape is changed automatically to fit text within its boundaries. Read/write.
Column | Returns the Column object that represents the columns of the specified text frame. Read-only.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. Read-only.
HasText | Indicates whether the shape that contains the specified text frame has text associated with it. Read-only.
HorizontalAnchor | Returns or sets the horizontal alignment of text in a text frame. Read/write.
MarginBottom | Returns or sets the distance (in points) between the bottom of the text frame and the bottom of the inscribed rectangle of the shape that contains the text. Read/write.
MarginLeft | Returns or sets the distance (in points) between the left edge of the text frame and the left edge of the inscribed rectangle of the shape that contains the text. Read/write.
MarginRight | Returns or sets the distance (in points) between the right edge of the text frame and the right edge of the inscribed rectangle of the shape that contains the text. Read/write.
MarginTop | Returns or sets the distance (in points) between the top of the text frame and the top of the inscribed rectangle of the shape that contains the text. Read/write.
NoTextRotation | Indicates whether to rotate text with the TextFrame2 rotation. One of the MsoTriState constants. Read/write.
Orientation | Returns or sets text orientation. Read/write.
Parent | Returns the parent object of the specified test frame. Read-only.
PathFormat | Returns or sets the path type for the specified text frame. Read/write.
Ruler | Returns a Ruler2 object that represents the ruler for the specified text. Read-only.
TextRange | Returns a TextRange object that represents the text in the specified text frame. Read-only.
ThreeD | Returns a ThreeDFormat object that represents the three-dimensional formatting of the parent shape. Read-only.
VerticalAnchor | Returns or sets the vertical alignment of text in a text frame. Read/write.
WarpFormat | Returns or sets the warp format (how the text is warped) for the specified text frame. Read/write.
WordArtFormat | Returns or sets the WordArt type for the specified text frame. Read/write.
WordWrap | Determines whether lines of text break automatically to fit inside the shape. Read/write.


LegendEntry.Creator Property (PowerPoint)

 Copy code hover
[image]

LegendEntry.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents a LegendEntry object.

See also

Concepts

LegendEntry Object

Other resources

LegendEntry Object Members


Floor.Thickness Property (PowerPoint)

 Copy code hover
[image]

Floor.Thickness Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the thickness of the floor. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Thickness

expression A variable that represents a Floor object.

Remarks

Use this property to set the thickness of the floor. The default thickness is zero (0).

See also

Concepts

Floor Object

Other resources

Floor Object Members


Cell.Parent Property (PowerPoint)

 Copy code hover
[image]

Cell.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a Cell object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

Cell Object

Other resources

Cell Object Members


TextStyleLevel.Application Property (PowerPoint)

 Copy code hover
[image]

TextStyleLevel.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a TextStyleLevel object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

TextStyleLevel Object

Other resources

TextStyleLevel Object Members


FillFormat.RotateWithObject Property (PowerPoint)

 Copy code hover
[image]

FillFormat.RotateWithObject Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets whether the fill rotates with the specified shape. Read/write.

Syntax

expression .RotateWithObject

expression An expression that returns a FillFormat object.

Remarks

The value returned by the RotateWithObject property can be one of these MsoTriState constants.

Constant | Description
msoFalse | The fill does not rotate with the shape.
msoTrue | The fill rotates with the shape.

The setting of the RotateWithObject property corresponds to the setting of the Rotate with shape box on the Fill pane of the Format Picture dialog box in the Microsoft PowerPoint user interface (under Drawing Tools, on the Format Tab, in the Shape Styles group, click Format Shape.)

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


LegendKey.MarkerBackgroundColor Property (PowerPoint)

 Copy code hover
[image]

LegendKey.MarkerBackgroundColor Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets the marker background color as an RGB value or returns the corresponding color index value. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .MarkerBackgroundColor

expression A variable that represents a LegendKey object.

Remarks

This property applies only to line, scatter, and radar charts.

See also

Concepts

LegendKey Object

Other resources

LegendKey Object Members


AnimationBehavior.RotationEffect Property (PowerPoint)

 Copy code hover
[image]

AnimationBehavior.RotationEffect Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a RotationEffect object for an animation behavior. Read-only.

Syntax

expression .RotationEffect

expression A variable that represents an AnimationBehavior object.

Return Value

RotationEffect

Example

The following example adds a new shape to the first slide and sets the rotation animation behavior.

VBA Copy code Copy code
Sub AddRotation()

    Dim shpNew As Shape

    Dim effNew As Effect

    Dim aniNew As AnimationBehavior

    Set shpNew = ActivePresentation.Slides(1).Shapes _

        .AddShape(Type:=msoShape5pointStar, Left:=0, _

        Top:=0, Width:=100, Height:=100)

    Set effNew = ActivePresentation.Slides(1).TimeLine.MainSequence _

        .AddEffect(Shape:=shpNew, effectId:=msoAnimEffectCustom)

    Set aniNew = effNew.Behaviors.Add(msoAnimTypeRotation)

    With aniNew.RotationEffect

        'Rotate 270 degrees from current position

        .By = 270

    End With

End Sub

See also

Concepts

AnimationBehavior Object

Other resources

AnimationBehavior Object Members


TextFrame2.DeleteText Method (PowerPoint)

 Copy code hover
[image]

TextFrame2.DeleteText Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the text from a text frame and all the associated properties of the text, including font attributes.

Syntax

expression .DeleteText

expression An expression that returns a TextFrame2 object.

Return Value

Nothing

Example

This example shows how to delete the text from shape one on slide one of the active presentation, if that shape contains text.

VBA Copy code Copy code
Public Sub DeleteText_Example()

    Dim pptSlide As Slide

    Set pptSlide = ActivePresentation.Slides(1)

    pptSlide.Shapes(1).TextFrame2.DeleteText

End Sub

See also

Concepts

TextFrame2 Object

Other resources

TextFrame2 Object Members


SlideShowView.LastSlideViewed Property (PowerPoint)

 Copy code hover
[image]

SlideShowView.LastSlideViewed Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Slide object that represents the slide viewed immediately before the current slide in the specified slide show view.

Syntax

expression .LastSlideViewed

expression A variable that represents a SlideShowView object.

Return Value

Slide

Example

This example takes you to the slide viewed immediately before the current slide in slide show window one.

VBA Copy code Copy code
With SlideShowWindows(1).View

    .GotoSlide (.LastSlideViewed.SlideIndex)

End With

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


LegendKey.MarkerForegroundColorIndex Property (PowerPoint)

 Copy code hover
[image]

LegendKey.MarkerForegroundColorIndex Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the marker foreground color as an index into the current color palette, or as one of the following XlColorIndex constants: xlColorIndexAutomatic or xlColorIndexNone. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .MarkerForegroundColorIndex

expression A variable that represents a LegendKey object.

Remarks

This property applies only to line, scatter, and radar charts.

See also

Concepts

LegendKey Object

Other resources

LegendKey Object Members


ThreeDFormat.Creator Property (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.

Syntax

expression .Creator

expression A variable that represents a ThreeDFormat object.

Return Value

Long

Remarks

The Creator property is designed to be used in Microsoft Office applications for the Macintosh.

Example

This example displays a message about the creator of myObject.

VBA Copy code Copy code
Set myObject = Application.ActivePresentation.Slides(1).Shapes(1)

If myObject.Creator = &h50575054 Then

    MsgBox "This is a PowerPoint object"

Else

    MsgBox "This is not a PowerPoint object"

End If

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


MediaBookmark.Position Property (PowerPoint)

 Copy code hover
[image]

MediaBookmark.Position Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the time that is associated with the bookmark. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Position

expression A variable that represents a MediaBookmark object.

See also

Concepts

MediaBookmark Object

Other resources

MediaBookmark Object Members


SlideShowSettings.EndingSlide Property (PowerPoint)

 Copy code hover
[image]

SlideShowSettings.EndingSlide Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the last slide to be displayed in the specified slide show. Read/write.

Syntax

expression .EndingSlide

expression A variable that represents an SlideShowSettings object.

Return Value

Long

Example

This example runs a slide show of the active presentation, starting with slide two and ending with slide four.

VBA Copy code Copy code
With ActivePresentation.SlideShowSettings

    .RangeType = ppShowSlideRange

    .StartingSlide = 2

    .EndingSlide = 4

    .Run

End With

See also

Concepts

SlideShowSettings Object

Other resources

SlideShowSettings Object Members


Coauthoring.PendingUpdates Property (PowerPoint)

 Copy code hover
[image]

Coauthoring.PendingUpdates Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns True if merge-mode updates are pending. Read-only.

Syntax

expression .PendingUpdates

expression A variable that represents a Coauthoring object.

See also

Concepts

Coauthoring Object

Other resources

Coauthoring Object Members


Presentation.Saved Property (PowerPoint)

 Copy code hover
[image]

Presentation.Saved Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether changes have been made to a presentation since it was last saved. Read/write.

Syntax

expression .Saved

expression A variable that represents a Presentation object.

Return Value

MsoTriState

Remarks

If the Saved property of a modified presentation is set to msoTrue, the user won't be prompted to save changes when closing the presentation, and all changes made to it since it was last saved will be lost.

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

Constant | Description
msoFalse | Changes have been made to a presentation since it was last saved.
msoTrue | No changes have been made to a presentation since it was last saved.

Example

This example saves the active presentation if it is been changed since the last time it was saved.

VBA Copy code Copy code
With Application.ActivePresentation

    If Not .Saved And .Path <> "" Then .Save

End With

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


FileConverters Methods (PowerPoint)

 Copy code hover
[image]

FileConverters Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Item | Returns an individual FileConverter object in a collection.


ConnectorFormat Object (PowerPoint)

 Copy code hover
[image]

ConnectorFormat Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Contains properties and methods that apply to connectors.

Remarks

A connector is a line that attaches two other shapes at points called connection sites. If you rearrange shapes that are connected, the geometry of the connector will be automatically adjusted so that the shapes remain connected.

Use the ConnectorFormat property to return a ConnectorFormat object. Use the BeginConnect and EndConnect methods to attach the ends of the connector to other shapes in the document. Use the RerouteConnections method to automatically find the shortest path between the two shapes connected by the connector. Use the Connector property to see whether a shape is a connector.

Note that you assign a size and a position when you add a connector to the Shapes collection, but the size and position are automatically adjusted when you attach the beginning and end of the connector to other shapes in the collection. Therefore, if you intend to attach a connector to other shapes, the initial size and position you specify are irrelevant. Likewise, you specify which connection sites on a shape to attach the connector to when you attach the connector, but using the RerouteConnections method after the connector is attached may change which connection sites the connector attaches to, making your original choice of connection sites irrelevant.

Connection sites are generally numbered according to the rules presented in the following table.

Shape type | Connection site numbering scheme
AutoShapes, WordArt, pictures, and OLE objects | The connection sites are numbered starting at the top and proceeding counterclockwise.
Freeforms | The connection sites are the vertices, and they correspond to the vertex numbers.

Example

The following example adds two rectangles to myDocument and connects them with a curved connector.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

Set s = myDocument.Shapes

Set firstRect = s.AddShape(msoShapeRectangle, 100, 50, 200, 100)

Set secondRect = s.AddShape(msoShapeRectangle, 300, 300, 200, 100)

With s.AddConnector(msoConnectorCurve, 0, 0, 0, 0).ConnectorFormat

    .BeginConnect ConnectedShape:=firstRect, ConnectionSite:=1

    .EndConnect ConnectedShape:=secondRect, ConnectionSite:=1

    .Parent.RerouteConnections

End With

To figure out which number corresponds to which connection site on a complex shape, you can experiment with the shape while the macro recorder is turned on and then examine the recorded code; or you can create a shape, select it, and then run the following example. This code will number each connection site and attach a connector to it.

VBA Copy code Copy code
Set mainshape = ActiveWindow.Selection.ShapeRange(1)

With mainshape

    bx = .Left + .Width + 50

    by = .Top + .Height + 50

End With

With ActiveWindow.View.Slide

    For j = 1 To mainshape.ConnectionSiteCount

        With .Shapes.AddConnector(msoConnectorStraight, bx, by, bx + 50, by + 50)

            .ConnectorFormat.EndConnect mainshape, j

            .ConnectorFormat.Type = msoConnectorElbow

            .Line.ForeColor.RGB = RGB(255, 0, 0)

            l = .Left

            t = .Top

        End With

        With .Shapes.AddTextbox(msoTextOrientationHorizontal, l, t, 36, 14)

            .Fill.Visible = False

            .Line.Visible = False

            .TextFrame.TextRange.Text = j

        End With

    Next j

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

ConnectorFormat Object Members


ShapeRange.TextFrame2 Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.TextFrame2 Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the TextFrame2 object associated with the specified ShapeRange object that contains the alignment and anchoring properties for the specified shape range. Read-only.

Syntax

expression .TextFrame2

expression An expression that returns a ShapeRange object.

Return Value

TextFrame2

Remarks

Use the TextRange property of the TextFrame2 object to return the text in the text frame.

Use the HasTextFrame property to determine whether a shape range contains a text frame before you attempt to get the TextFrame2 property value.

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


UpBars.Fill Property (PowerPoint)

 Copy code hover
[image]

UpBars.Fill Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a FillFormatobject for the parent chart element that contains fill formatting properties for the chart element. Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Fill

expression A variable that represents an UpBars object.

See also

Concepts

UpBars Object

Other resources

UpBars Object Members


PpSlideShowAdvanceMode Enumeration (PowerPoint)

 Copy code hover
[image]

PpSlideShowAdvanceMode Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Constants that specify the mode of advance of the slide show, passed to and returned by the AdvanceMode property of the SlideShowSettings object.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppSlideShowManualAdvance | 1 | Manual Advance
ppSlideShowRehearseNewTimings | 3 | Rehearsed timings
ppSlideShowUseSlideTimings | 2 | Specified timings for each slide


Axis.Top Property (PowerPoint)

 Copy code hover
[image]

Axis.Top Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the distance, in points, from the top edge of the object to the top of row 1 (on a worksheet) or the top of the chart area (on a chart). Read-only Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Top

expression A variable that represents an Axis object.

See also

Concepts

Axis Object

Other resources

Axis Object Members


Presentations.CanCheckOut Method (PowerPoint)

 Copy code hover
[image]

Presentations.CanCheckOut Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns True if Microsoft PowerPoint can check out a specified presentation from a server.

Syntax

expression .CanCheckOut(FileName)

expression A variable that represents a Presentations object.

Parameters

Name | Required/Optional | Data Type | Description
FileName | Required | String | The server path and name of the presentation.

Return Value

Boolean

Remarks

To take advantage of the collaboration features built into PowerPoint, you must store presentations on a Microsoft Office SharePoint Portal Server.

Example

This example verifies that a presentation is not checked out by another user and that it can be checked out. If the presentation can be checked out, it copies the presentation to the local computer for editing.

VBA Copy code Copy code
Sub CheckOutPresentation(strPresentation As String)

    If Presentations.CanCheckOut(strPresentation) = True Then

        Presentations.CheckOut FileName:=strPresentation

    Else

        MsgBox "You are unable to check out this " & _

        "presentation at this time."

    End If

End Sub

To call the subroutine above, use the following subroutine and replace the "http://servername/workspace/report.ppt" file name with an actual file located on a server mentioned in the Remarks section above.

VBA Copy code Copy code
Sub CheckPPTOut()

    Call CheckOutPresentation(strPresentation:= _

        "http://servername/workspace/report.doc")

End Sub

See also

Concepts

Presentations Object

Other resources

Presentations Object Members


TickLabels.Select Method (PowerPoint)

 Copy code hover
[image]

TickLabels.Select Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Selects the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Select

expression A variable that represents a TickLabels object.

See also

Concepts

TickLabels Object

Other resources

TickLabels Object Members


SlideShowTransition Object (PowerPoint)

 Copy code hover
[image]

SlideShowTransition Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Contains information about how the specified slide advances during a slide show.

Example

Use the SlideShowTransition property to return the SlideShowTransition object. The following example specifies a Fast Strips Down-Left transition accompanied by the Bass.wav sound for slide one in the active presentation and specifies that the slide advance automatically five seconds after the previous animation or slide transition.

VBA Copy code Copy code
With ActivePresentation.Slides(1).SlideShowTransition

    .Speed = ppTransitionSpeedFast

    .EntryEffect = ppEffectStripsDownLeft

    .SoundEffect.ImportFromFile "c:\sndsys\bass.wav"

    .AdvanceOnTime = True

    .AdvanceTime = 5

End With

ActivePresentation.SlideShowSettings.AdvanceMode = _

    ppSlideShowUseSlideTimings

See also

Concepts

PowerPoint Object Model Reference

Other resources

SlideShowTransition Object Members


Floor.Paste Method (PowerPoint)

 Copy code hover
[image]

Floor.Paste Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Pastes a picture from the Clipboard on the floor of the specified chart.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Paste

expression A variable that represents a Floor object.

Remarks

You can use this method on column, bar, line, or radar charts.

See also

Concepts

Floor Object

Other resources

Floor Object Members


Application.Assistance Property (PowerPoint)

 Copy code hover
[image]

Application.Assistance Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Gets a reference to the Microsoft Office IAssistance object, which provides a means for developers to create a customized help experience for users within Microsoft Office. Read-only.

Syntax

expression .Assistance

expression An expression that returns an Application object.

Remarks

The IAssistance object exposes methods that allow developers to display Help topics in the Office Help Viewer or to display Help topics that ship with Microsoft Office in the PowerPoint Help window.

See also

Concepts

Application Object

Other resources

Application Object Members


Application.SlideShowNextBuild Event (PowerPoint)

 Copy code hover
[image]

Application.SlideShowNextBuild Event (PowerPoint)
See also Send feedback

Published: July 16, 2012

Occurs upon mouse-click or timing animation, but before the animated object becomes visible. .

Syntax

expression .SlideShowNextBuild(Wn)

expression A variable that represents an Application object.

Parameters

Name | Required/Optional | Data Type | Description
Wn | Required | SlideShowWindow | The active slide show window.

Remarks

For information about using events with the Application object, see How to: Use Events with the Application Object.

Example

If the current shape on slide one is a movie, this example plays the movie continuously until stopped manually by the presenter. This code is designed to be used with the second SlideShowNextSlide event example.

VBA Copy code Copy code
Private Sub App_SlideShowNextBuild(ByVal Wn As SlideShowWindow)

    If EvtCounter <> 0 Then

        With ActivePresentation.Slides(1) _

                .Shapes(shpAnimArray(2, EvtCounter))

            If .Type =msoMedia Then

                If .MediaType = ppMediaTypeMovie

                    .AnimationSettings.PlaySettings _

                        .LoopUntilStopped

                End If

            End If

        End With

    End If

        EvtCounter = EvtCounter + 1

End Sub

See also

Concepts

Application Object

Other resources

Application Object Members


SlideShowTransition.LoopSoundUntilNext Property (PowerPoint)

 Copy code hover
[image]

SlideShowTransition.LoopSoundUntilNext Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Specifies whether the sound that's been set for the specified slide transition loops until the next sound starts. Read/write.

Syntax

expression .LoopSoundUntilNext

expression A variable that represents a SlideShowTransition object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The sound that's been set for the specified slide transition does not loop.
msoTrue | The sound that's been set for the specified slide transition loops until the next sound starts.

Example

This example specifies that the file Dudududu.wav will start to play at the transition to slide two in the active presentation and will continue to play until the next sound starts.

VBA Copy code Copy code
With ActivePresentation.Slides(2).SlideShowTransition

    .SoundEffect.ImportFromFile "c:\sndsys\dudududu.wav"

    .LoopSoundUntilNext = msoTrue

End With

See also

Concepts

SlideShowTransition Object

Other resources

SlideShowTransition Object Members


SlideShowSettings.ShowWithNarration Property (PowerPoint)

 Copy code hover
[image]

SlideShowSettings.ShowWithNarration Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the specified slide show is shown with narration. Read/write.

Syntax

expression .ShowWithNarration

expression A variable that represents a SlideShowSettings object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified slide show is shown without narration.
msoTrue | The specified slide show is shown with narration.

Example

This example runs a slide show of the active presentation with animation and narration turned off.

VBA Copy code Copy code
With ActivePresentation.SlideShowSettings

    .ShowWithAnimation = msoFalse

    .ShowWithNarration = msoFalse

    .Run

End With

See also

Concepts

SlideShowSettings Object

Other resources

SlideShowSettings Object Members


TextRange.RemovePeriods Method (PowerPoint)

 Copy code hover
[image]

TextRange.RemovePeriods Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Removes the period at the end of each paragraph in the specified text.

Syntax

expression .RemovePeriods

expression A variable that represents a TextRange object.

Example

This example removes the period at the end of each paragraph in shape two on slide one in the active presentation.

VBA Copy code Copy code
Application.ActivePresentation.Slides(1) _

    .Shapes(2).TextFrame.TextRange _

    .RemovePeriods

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


LegendKey.Shadow Property (PowerPoint)

 Copy code hover
[image]

LegendKey.Shadow Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a value that indicates whether the object has a shadow. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Shadow

expression A variable that represents a LegendKey object.

See also

Concepts

LegendKey Object

Other resources

LegendKey Object Members


Presentation.Path Property (PowerPoint)

 Copy code hover
[image]

Presentation.Path Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a String that represents the path to the specified Presentation object. Read-only.

Syntax

expression .Path

expression A variable that represents a Presentation object.

Return Value

String

Remarks

If you use this property to return a path for a presentation that has not been saved, it returns an empty string.

The path doesn't include the final backslash (\) or the name of the specified object. Use the Name property of the Presentation object to return the file name without the path, and use the FullName property to return the file name and the path together.

Example

This example saves the active presentation in the same folder as PowerPoint.

VBA Copy code Copy code
With Application

    fName = .Path & "\test presentation"

    ActivePresentation.SaveAs fName

End With

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


Trendlines.Creator Property (PowerPoint)

 Copy code hover
[image]

Trendlines.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents a Trendlines object.

See also

Concepts

Trendlines Object

Other resources

Trendlines Object Members


ChartGroup.SizeRepresents Property (PowerPoint)

 Copy code hover
[image]

ChartGroup.SizeRepresents Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets what the bubble size represents on a bubble chart. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .SizeRepresents

expression A variable that represents a ChartGroup object.

Remarks

This property can be either of the following XlSizeRepresents constants:

  • xlSizeIsArea

  • xlSizeIsWidth

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets what the bubble size represents for chart group one of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.ChartGroups(1).SizeRepresents = xlSizeIsWidth

    End If

End With

See also

Concepts

ChartGroup Object

Other resources

ChartGroup Object Members


PlotArea.Format Property (PowerPoint)

 Copy code hover
[image]

PlotArea.Format Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Format

expression A variable that represents a PlotArea object.

See also

Concepts

PlotArea Object

Other resources

PlotArea Object Members


Trendline Object (PowerPoint)

 Copy code hover
[image]

Trendline Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a trendline in a chart.

Version Information

Version Added: PowerPoint 2007

Remarks

A trendline shows the trend, or direction, of data in a series. The Trendline object is a member of the Trendlines collection. The Trendlines collection contains all the Trendline objects for a single series.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

Use Trendlines(Index), where Index is the trendline index number, to return a single Trendline object.

The index number denotes the order in which the trendlines were added to the series. Trendlines(1) is the first trendline added to the series, and Trendlines(Trendlines.Count) is the last one added.

The following example changes the trendline type for the first series of the first chart in the active document. If the series has no trendline, this example will fail.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).Trendlines(1).Type = xlMovingAvg

    End If

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

Trendline Object Members


ThreeDFormat.PresetCamera Property (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.PresetCamera Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the effects camera type used by the specified ThreeDFormat object. Read-only.

Syntax

expression .PresetCamera

expression A variable that represents a ThreeDFormat object.

Return Value

MsoPresetCamera

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


Pane.Parent Property (PowerPoint)

 Copy code hover
[image]

Pane.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a Pane object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

Pane Object

Other resources

Pane Object Members


Trendline.Backward2 Property (PowerPoint)

 Copy code hover
[image]

Trendline.Backward2 Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the number of periods (or units on a scatter chart) that the trendline extends backward. Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Backward2

expression A variable that represents a Trendline object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the number of units that the trendline for the first chart in the active document extends forward and backward. You should run the example on a 2-D column chart that contains a single series that has a trendline.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.SeriesCollection(1).Trendlines(1)

            .Forward2 = 5

            .Backward2 = .5

        End With

    End If

End With

See also

Concepts

Trendline Object

Other resources

Trendline Object Members


Fonts Properties (PowerPoint)

 Copy code hover
[image]

Fonts Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


Presentation.VBProject Property (PowerPoint)

 Copy code hover
[image]

Presentation.VBProject Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a VBProject object that represents the individual Visual Basic project for the presentation. Read-only.

Syntax

expression .VBProject

expression A variable that represents a Presentation object.

Return Value

VBProject

Example

This example changes the name of the Visual Basic project for the active presentation.

VBA Copy code Copy code
ActivePresentation.VBProject.Name = "TestProject"

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


ColorSchemes Properties (PowerPoint)

 Copy code hover
[image]

ColorSchemes Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


Master.Design Property (PowerPoint)

 Copy code hover
[image]

Master.Design Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Design object representing a design.

Syntax

expression .Design

expression A variable that represents a Master object.

Return Value

Design

Example

The following example adds a title master.

VBA Copy code Copy code
Sub AddDesignMaster

    ActivePresentation.Slides(1).Design.AddTitleMaster

End Sub

See also

Concepts

Master Object

Other resources

Master Object Members


CategoryCollection.Parent Property (PowerPoint)

 Copy code hover
[image]

CategoryCollection.Parent Property (PowerPoint)
Send feedback

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2013

Syntax

expression .Parent

expression A variable that represents a CategoryCollection object.


Timing.BounceEnd Property (PowerPoint)

 Copy code hover
[image]

Timing.BounceEnd Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Read/write

Version Information

Version Added: PowerPoint 2010

Syntax

expression .BounceEnd

expression A variable that represents a Timing object.

See also

Concepts

Timing Object

Other resources

Timing Object Members


LegendEntry.Application Property (PowerPoint)

 Copy code hover
[image]

LegendEntry.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents a LegendEntry object.

See also

Concepts

LegendEntry Object

Other resources

LegendEntry Object Members


Rows Members (PowerPoint)

 Copy code hover
[image]

Rows Members (PowerPoint)
Send feedback

Published: July 16, 2012

A collection of Row objects that represent the rows in a table.

Methods

Name | Description
Add | Returns a Row object that represents a row being added to a table.
Item | Returns a single Row object from the specified Rows collection.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


Axis.MajorTickMark Property (PowerPoint)

 Copy code hover
[image]

Axis.MajorTickMark Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the type of major tick mark for the specified axis. Read/write XlTickMark.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .MajorTickMark

expression A variable that represents an Axis object.

Remarks

MajorTickMark can be set to one of the following XlTickMark constants:

  • xlTickMarkInside

  • xlTickMarkOutside

  • xlTickMarkCross

  • xlTickMarkNone

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the major tick marks for the value axis for the first chart in the active document to be outside the axis.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.Axes(xlValue).MajorTickMark = xlTickMarkOutside

    End If

End With

See also

Concepts

Axis Object

Other resources

Axis Object Members


LegendEntry Methods (PowerPoint)

 Copy code hover
[image]

LegendEntry Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Delete | Deletes the object.
Select | Selects the object.


View.Zoom Property (PowerPoint)

 Copy code hover
[image]

View.Zoom Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the zoom setting of the specified view as a percentage of normal size. Read/write.

Syntax

expression .Zoom

expression A variable that represents a View object.

Return Value

Integer

Remarks

The Zoom property value can be from 10 to 400 percent.

Example

The following example sets the zoom to 30 percent for the view in document window one.

VBA Copy code Copy code
Windows(1).View.Zoom = 30

See also

Concepts

View Object

Other resources

View Object Members


HeadersFooters.Header Property (PowerPoint)

 Copy code hover
[image]

HeadersFooters.Header Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a HeaderFooter object that represents the header that appears at the top of a slide or in the upper-left corner of a notes page, handout, or outline. Read-only.

Syntax

expression .Header

expression A variable that represents a HeadersFooters object.

Return Value

HeaderFooter

Example

This example sets the header text for the handout master for the active presentation. This text will appear in the upper-left corner of the page when you print your presentation as an outline or a handout.

VBA Copy code Copy code
Set myHandHF = Application.ActivePresentation.HandoutMaster _

    .HeadersFooters

myHandHF.Header.Text = "Third Quarter Report"

See also

Concepts

HeadersFooters Object

Other resources

HeadersFooters Object Members


Shape.Nodes Property (PowerPoint)

 Copy code hover
[image]

Shape.Nodes Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a ShapeNodes collection that represents the geometric description of the specified shape. Applies to Shape objects that represent freeform drawings.

Syntax

expression .Nodes

expression A variable that represents a Shape object.

Example

This example adds a smooth node with a curved segment after node four in shape three on myDocument. Shape three must be a freeform drawing with at least four nodes.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(3).Nodes

    .Insert Index:=4, SegmentType:=msoSegmentCurve, _

        EditingType:=msoEditingSmooth, X1:=210, Y1:=100

End With

See also

Concepts

Shape Object

Other resources

Shape Object Members


Series.MarkerForegroundColorIndex Property (PowerPoint)

 Copy code hover
[image]

Series.MarkerForegroundColorIndex Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the marker foreground color as an index into the current color palette, or as one of the following XlColorIndex constants: xlColorIndexAutomatic or xlColorIndexNone. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .MarkerForegroundColorIndex

expression A variable that represents a Series object.

Remarks

This property applies only to line, scatter, and radar charts.

See also

Concepts

Series Object

Other resources

Series Object Members


Borders.Application Property (PowerPoint)

 Copy code hover
[image]

Borders.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a Borders object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

Borders Object

Other resources

Borders Object Members


TextStyle.Levels Property (PowerPoint)

 Copy code hover
[image]

TextStyle.Levels Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a TextStyleLevels object that represents outline text formatting. Read-only.

Syntax

expression .Levels

expression A variable that represents a TextStyle object.

See also

Concepts

TextStyle Object

Other resources

TextStyle Object Members


ResampleMediaTask.SampleWidth Property (PowerPoint)

 Copy code hover
[image]

ResampleMediaTask.SampleWidth Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the resolution width of the sample. Read-only.

Syntax

expression .SampleWidth

expression A variable that represents a ResampleMediaTask object.

Return Value

Long

See also

Concepts

ResampleMediaTask Object

Other resources

ResampleMediaTask Object Members


DataTable.Format Property (PowerPoint)

 Copy code hover
[image]

DataTable.Format Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Format

expression A variable that represents a DataTable object.

See also

Concepts

DataTable Object

Other resources

DataTable Object Members


PlotArea.Width Property (PowerPoint)

 Copy code hover
[image]

PlotArea.Width Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the width, in points, of the object. Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Width

expression A variable that represents a PlotArea object.

See also

Concepts

PlotArea Object

Other resources

PlotArea Object Members


Trendline.Parent Property (PowerPoint)

 Copy code hover
[image]

Trendline.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents a Trendline object.

See also

Concepts

Trendline Object

Other resources

Trendline Object Members


FillFormat.GradientColorType Property (PowerPoint)

 Copy code hover
[image]

FillFormat.GradientColorType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the gradient color type for the specified fill. Read-only.

Syntax

expression .GradientColorType

expression A variable that represents a FillFormat object.

Return Value

MsoGradientColorType

Remarks

Use the OneColorGradient, PresetGradient, or TwoColorGradient method to set the gradient type for the fill.

The value returned by the GradientColorType property can be one of these MsoGradientColorType constants.

msoGradientColorMixed

msoGradientOneColor

msoGradientPresetColors

msoGradientTwoColors

Example

This example changes the fill for all shapes in myDocument that have a two-color gradient fill to a preset gradient fill.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

For Each s In myDocument.Shapes

    With s.Fill

        If .GradientColorType = msoGradientTwoColors Then

            .PresetGradient msoGradientHorizontal, _

                1, msoGradientBrass

        End If

    End With

Next

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


CustomLayout.Application Property (PowerPoint)

 Copy code hover
[image]

CustomLayout.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object. Read-only.

Syntax

expression .Application

expression A variable that represents a CustomLayout object.

Return Value

Application

See also

Concepts

CustomLayout Object

Other resources

CustomLayout Object Members


ShadowFormat.Parent Property (PowerPoint)

 Copy code hover
[image]

ShadowFormat.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a ShadowFormat object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

ShadowFormat Object

Other resources

ShadowFormat Object Members


Axis.Crosses Property (PowerPoint)

 Copy code hover
[image]

Axis.Crosses Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the point on the specified axis where the other axis crosses. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Crosses

expression A variable that represents an Axis object.

Remarks

This property is not available for radar charts. For 3-D charts, this property can be applied only to the value axis and indicates where the plane defined by the category axes crosses the value axis.

You can use this property for both category and value axes. On the category axis, xlMinimum sets the value axis to cross at the first category, and xlMaximum sets the value axis to cross at the last category.

Note that xlMinimum and xlMaximum can have different meanings, depending on the axis.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the value axis in for the first chart in the active document to cross the category axis at the maximum x-axis value.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

     If .HasChart Then

        .Chart.Axes(xlCategory).Crosses = xlMaximum

    End If

End With

See also

Concepts

Axis Object

Other resources

Axis Object Members


OLEFormat.Application Property (PowerPoint)

 Copy code hover
[image]

OLEFormat.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents an OLEFormat object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

OLEFormat Object

Other resources

OLEFormat Object Members


DataLabel.NumberFormatLinked Property (PowerPoint)

 Copy code hover
[image]

DataLabel.NumberFormatLinked Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .NumberFormatLinked

expression A variable that represents a DataLabel object.

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


PublishObject.Parent Property (PowerPoint)

 Copy code hover
[image]

PublishObject.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a PublishObject object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

PublishObject Object

Other resources

PublishObject Object Members


ShapeRange.Tags Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.Tags Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a Tags object that represents the tags for the specified object. Read-only.

Syntax

expression .Tags

expression A variable that represents a ShapeRange object.

Return Value

Tags

Example

Note Note

Tag values are added and stored in uppercase text. You should perform tests on tag values using uppercase text, as shown in the second example.

This example adds a tag named "REGION" and a tag named "PRIORITY" to slide one in the active presentation.

VBA Copy code Copy code
With Application.ActivePresentation.Slides(1).Tags

    .Add "Region", "East"     'Adds "Region" tag with value "East"

    .Add "Priority", "Low"    'Adds "Priority" tag with value "Low"

End With

This example searches through the tags for each slide in the active presentation. If there's a tag named "PRIORITY," a message box displays the tag value. If the object doesn't have a tag named "PRIORITY," the example adds this tag with the value "Unknown."

VBA Copy code Copy code
For Each s In Application.ActivePresentation.Slides

    With s.Tags

        found = False

        For i = 1 To .Count

          If .Name(i) = "PRIORITY" Then

              found = True

              slNum = .Parent.SlideIndex

              MsgBox "Slide " & slNum & " Priority: " & .Value(i)

          End If

        Next

        If Not found Then

          slNum = .Parent.SlideIndex

          .Add "Priority", "Unknown"

          MsgBox "Slide " & slNum & " Priority tag added: Unknown"

        End If

    End With

Next

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


PlotArea.InsideWidth Property (PowerPoint)

 Copy code hover
[image]

PlotArea.InsideWidth Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the inside width, in points, of the plot area. Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .InsideWidth

expression A variable that represents a PlotArea object.

Remarks

The plot area used for this measurement does not include the axis labels. The Width property for the plot area uses the bounding rectangle that includes the axis labels.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example draws a dotted rectangle around the inside of the plot area for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart

            Set pa = .PlotArea

                With .Shapes.AddShape(msoShapeRectangle, _

                    pa.InsideLeft, pa.InsideTop, _

                    pa.InsideWidth, pa.InsideHeight)

                .Fill.Transparency = 1

                .Line.DashStyle = msoLineDashDot

            End With

        End With

    End If

End With

See also

Concepts

PlotArea Object

Other resources

PlotArea Object Members


FileConverters Members (PowerPoint)

 Copy code hover
[image]

FileConverters Members (PowerPoint)
Send feedback

Published: July 16, 2012

A collection of FileConverter objects that represent all the file converters available for opening and saving files.

Methods

Name | Description
Item | Returns an individual FileConverter object in a collection.

Properties

Name | Description
Count | Returns a Long that represents the number of file converters in the collection. Read-only.


LegendEntry.Width Property (PowerPoint)

 Copy code hover
[image]

LegendEntry.Width Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the width, in points, of the object. Read-only Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Width

expression A variable that represents a LegendEntry object.

See also

Concepts

LegendEntry Object

Other resources

LegendEntry Object Members


Series.PictureType Property (PowerPoint)

 Copy code hover
[image]

Series.PictureType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a value that specifies how pictures are displayed on a column or bar picture chart. Read/write XlChartPictureType.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .PictureType

expression A variable that represents a Series object.

Example

The following example sets series one of the first chart in the active document to stretch pictures. You should run the example on a 2-D column chart that has picture data markers.

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).PictureType = xlStretch

    End If

End With

See also

Concepts

Series Object

Other resources

Series Object Members


ChartArea.Width Property (PowerPoint)

 Copy code hover
[image]

ChartArea.Width Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the width, in points, of the object. Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Width

expression A variable that represents a ChartArea object.

See also

Concepts

ChartArea Object

Other resources

ChartArea Object Members


Master Members (PowerPoint)

 Copy code hover
[image]

Master Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a slide master, title master, handout master, notes master, or design master.

Methods

Name | Description
ApplyTheme | Applies a theme or design template to the specified slide master, title master, handout master, notes master, or design master.
Delete | Deletes the specified Master object.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Background | Returns a ShapeRange object that represents the slide background.
BackgroundStyle | Sets or returns the background style of the specified object. Read/write.
ColorScheme | Returns or sets the ColorScheme object that represents the scheme colors for the specified slide, slide range, or slide master. Read/write.
CustomerData | Returns a CustomerData object. Read-only.
CustomLayouts | Returns a CustomLayouts object that represents the custom layouts associated with the presentation design of the specified Master object. Read-only.
Design | Returns a Design object representing a design.
Guides | Returns a Guides collection that represents all of the drawing guides associated with the slide master, title master, handout master, notes master, or design master.
HeadersFooters | Returns a HeadersFooters collection that represents the header, footer, date and time, and slide number associated with the slide, slide master, or range of slides. Read-only.
Height | Returns or sets the height of the specified object, in points. Read-only.
Hyperlinks | Returns a Hyperlinks collection that represents all the hyperlinks on the specified slide. Read-only.
Name | Returns or sets the name of the specified object. Read/write.
Parent | Returns the parent object for the specified object.
Shapes | Returns a Shapes collection that represents all the elements that have been placed or inserted on the specified slide, slide master, or range of slides. Read-only.
SlideShowTransition | Returns a SlideShowTransition object that represents the special effects for the specified slide transition. Read-only.
TextStyles | Returns a TextStyles collection that represents three text styles — title text, body text, and default text — for the specified slide master. Read-only.
Theme | Returns a Theme object that represents the theme used by the specified slide master, title master, handout master, notes master, or design master. Read-only.
TimeLine | Returns a TimeLine object that represents the animation timeline for the slide. Read-only.
Width | Returns the width of the specified object, in points. Read-only.


Shapes.AddMediaObject2 Method (PowerPoint)

 Copy code hover
[image]

Shapes.AddMediaObject2 Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Adds a new media object.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .AddMediaObject2(FileName, LinkToFile, SaveWithDocument, Left, Top, Width, Height)

expression A variable that represents a Shapes object.

Parameters

Name | Required/Optional | Data Type | Description
FileName | Required | String | The name of the file to be added.
LinkToFile | Optional | [MSOTRISTATE] | Indicates whether to link to the file.
SaveWithDocument | Optional | [MSOTRISTATE] | Indicates whether to save the media with the document.
Left | Optional | Single | The distance, in points, from the left edge of the slide to the left edge of the media object.
Top | Optional | Single | The distance, in points, from the top edge of the slide to the top edge of the media object.
Width | Optional | Single | The width, in points, of the media object. Default value is -1.
Height | Optional | Single | The height, in points, of the media object. Default value is -1.

Return Value

Shape object

Remarks

The default value varies depending whether the new media is an audio or video file, and on file size. If both LinkToFile and SaveWithDocument are False, this method returns an error. At least one must be True. Note that the object model allows an object to be both linked and embedded, which is not allowed through the user interface (UI).

See also

Concepts

Shapes Object

Other resources

Shapes Object Members


PpSlideShowPointerType Enumeration (PowerPoint)

 Copy code hover
[image]

PpSlideShowPointerType Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the type of pointer for the slideshow.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppSlideShowPointerAlwaysHidden | 3 | Pointer is always hidden.
ppSlideShowPointerArrow | 1 | Arrow pointer used.
ppSlideShowPointerAutoArrow | 4 | AutoArrow pointer used.
ppSlideShowPointerEraser | 5 | Eraser pointer used.
ppSlideShowPointerNone | 0 | No pointer used.
ppSlideShowPointerPen | 2 | Pen pointer used.


MediaBookmarks Object (PowerPoint)

 Copy code hover
[image]

MediaBookmarks Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

A collection of MediaBookmark objects.

Version Information

Version Added: PowerPoint 2010

See also

Concepts

PowerPoint Object Model Reference

Other resources

MediaBookmarks Object Members


ChartGroups.Count Property (PowerPoint)

 Copy code hover
[image]

ChartGroups.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the collection. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Count

expression A variable that represents a ChartGroups object.

See also

Concepts

ChartGroups Object

Other resources

ChartGroups Object Members


Player Methods (PowerPoint)

 Copy code hover
[image]

Player Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
GoToNextBookmark | Goes to the next bookmark.
GoToPreviousBookmark | Goes to the previous bookmark.
Pause | Pauses the media.
Play | Begins playback for the specified media.
Stop | Stops the media playing in the specified object.


DataLabel.HorizontalAlignment Property (PowerPoint)

 Copy code hover
[image]

DataLabel.HorizontalAlignment Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the horizontal alignment for the specified object. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .HorizontalAlignment

expression A variable that represents a DataLabel object.

Remarks

You can set the value of this property to one of the following XlConstants constants:

  • xlCenter

  • xlDistributed

  • xlJustify

  • xlLeft

  • xlRight

Some of these constants may not be available to you, depending on the language support (for example, U.S. English) that you have selected or installed.

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


FillFormat.GradientDegree Property (PowerPoint)

 Copy code hover
[image]

FillFormat.GradientDegree Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a value that indicates how dark or light a one-color gradient fill is. Read-only.

Syntax

expression .GradientDegree

expression A variable that represents a FillFormat object.

Return Value

Single

Remarks

A value of 0 (zero) means that black is mixed in with the shape's foreground color to form the gradient; a value of 1 means that white is mixed in; and values between 0 and 1 mean that a darker or lighter shade of the foreground color is mixed in.

This property is read-only. Use the OneColorGradient method to set the gradient degree for the fill.

Example

This example adds a rectangle to myDocument and sets the degree of its fill gradient to match that of the shape named "Rectangle 2." If Rectangle 2 doesn't have a one-color gradient fill, this example fails.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    gradDegree1 = .Item("Rectangle 2").Fill.GradientDegree

    With .AddShape(msoShapeRectangle, 0, 0, 40, 80).Fill

        .ForeColor.RGB = RGB(128, 0, 0)

        .OneColorGradient msoGradientHorizontal, 1, gradDegree1

    End With

End With

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


PictureFormat.CropRight Property (PowerPoint)

 Copy code hover
[image]

PictureFormat.CropRight Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the number of points that are cropped off the right side of the specified picture or OLE object. Read/write.

Syntax

expression .CropRight

expression A variable that represents a PictureFormat object.

Return Value

Single

Remarks

Cropping is calculated relative to the original size of the picture. For example, if you insert a picture that is originally 100 points wide, rescale it so that it is 200 points wide, and then set the CropRight property to 50, 100 points (not 50) will be cropped off the right side of your picture.

Example

This example crops 20 points off the right side of shape three on myDocument. For this example to work, shape three must be either a picture or an OLE object.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes(3).PictureFormat.CropRight = 20

This example crops the percentage specified by the user off the right side of the selected shape, regardless of whether the shape has been scaled. For the example to work, the selected shape must be either a picture or an OLE object.

VBA Copy code Copy code
percentToCrop = InputBox("What percentage do you " & _

    "want to crop off the right of this picture?")

Set shapeToCrop = ActiveWindow.Selection.ShapeRange(1)

With shapeToCrop.Duplicate

    .ScaleWidth 1, True

    origWidth = .Width

    .Delete

End With

cropPoints = origWidth * percentToCrop / 100

shapeToCrop.PictureFormat.CropRight = cropPoints

See also

Concepts

PictureFormat Object

Other resources

PictureFormat Object Members


AnimationBehavior.Accumulate Property (PowerPoint)

 Copy code hover
[image]

AnimationBehavior.Accumulate Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether animation behaviors accumulate. Read/write.

Syntax

expression .Accumulate

expression A variable that represents an AnimationBehavior object.

Return Value

MsoAnimAccumulate

Remarks

Use this property in conjunction with the Additive property to combine animation effects.

The value of the Accumulate property can be one of these MsoAnimAccumulate constants.

Constant | Description
msoAnimAccumulateAlways | Animation behaviors accumulate.
msoAnimAccumulateNone | The default. Animation behaviors do not accumulate.

Example

The following example allows a specified animation behavior to accumulate with other animation behaviors.

VBA Copy code Copy code
Sub SetAccumulate()

    Dim animBehavior As AnimationBehavior

    Set animBehavior = ActiveWindow.Selection.SlideRange(1).TimeLine. _

        MainSequence(1).Behaviors(1)

    animBehavior.Accumulate = msoAnimAccumulateAlways

End Sub

See also

Concepts

AnimationBehavior Object

Other resources

AnimationBehavior Object Members


Presentation.Close Method (PowerPoint)

 Copy code hover
[image]

Presentation.Close Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Closes the specified presentation.

Syntax

expression .Close

expression A variable that represents a Presentation object.

Remarks

When you use this method, PowerPoint will close an open presentation without prompting the user to save their work. To prevent the loss of work, use the Save method or the SaveAs method before you use the Close method.

Example

This example closes Pres1.ppt without saving changes.

VBA Copy code Copy code
With Application.Presentations("pres1.ppt")

    .Saved = True

    .Close

End With

This example closes all open presentations.

VBA Copy code Copy code
With Application.Presentations

    For i = .Count To 1 Step -1

        .Item(i).Close

    Next

End With

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


Points.Count Property (PowerPoint)

 Copy code hover
[image]

Points.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the collection. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Count

expression A variable that represents a Points object.

See also

Concepts

Points Object

Other resources

Points Object Members


CommandEffect Members (PowerPoint)

 Copy code hover
[image]

CommandEffect Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a command effect for an animation behavior. You can send events, call functions, and send OLE verbs to embedded objects using this object.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
bookmark | Sets or returns the bookmark of the specified object. Read/write.
Command | Represents the command to be executed for the command effect. Read/write.
Parent | Returns the parent object for the specified object.
Type | Represents the type of animation. Read/write.


Shape.GroupItems Property (PowerPoint)

 Copy code hover
[image]

Shape.GroupItems Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a GroupShapes object that represents the individual shapes in the specified group. Use the Item method of the GroupShapes object to return a single shape from the group. Read-only.

Syntax

expression .GroupItems

expression A variable that represents a Shape object.

Return Value

GroupShapes

Example

This example adds three triangles to myDocument, groups them, sets a color for the entire group, and then changes the color for the second triangle only.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    .AddShape(msoShapeIsoscelesTriangle, 10, _

        10, 100, 100).Name = "shpOne"

    .AddShape(msoShapeIsoscelesTriangle, 150, _

        10, 100, 100).Name = "shpTwo"

    .AddShape(msoShapeIsoscelesTriangle, 300, _

        10, 100, 100).Name = "shpThree"

    With .Range(Array("shpOne", "shpTwo", "shpThree")).Group

        .Fill.PresetTextured msoTextureBlueTissuePaper

        .GroupItems(2).Fill.PresetTextured msoTextureGreenMarble

    End With

End With

See also

Concepts

Shape Object

Other resources

Shape Object Members


Selection.Cut Method (PowerPoint)

 Copy code hover
[image]

Selection.Cut Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the specified object and places it on the Clipboard.

Syntax

expression .Cut

expression A variable that represents a Selection object.

Example

This example deletes the selection in window one and places a copy of it on the Clipboard.

VBA Copy code Copy code
Windows(1).Selection.Cut

See also

Concepts

Selection Object

Other resources

Selection Object Members


PublishObject Methods (PowerPoint)

 Copy code hover
[image]

PublishObject Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Publish | Creates a Web presentation (HTML format) from any loaded presentation. You can view the published presentation in a Web browser.


Slides.Paste Method (PowerPoint)

 Copy code hover
[image]

Slides.Paste Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Pastes the slides on the Clipboard into the Slides collection for the presentation. Specify where you want to insert the slides with the Index argument. Returns a SlideRange object that represents the pasted objects. Each pasted slide becomes a member of the specified Slides collection.

Syntax

expression .Paste(Index)

expression A variable that represents a Slides object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Optional | Integer | The index number of the slide that the slides on the Clipboard are to be pasted before. If this argument is omitted, the slides on the Clipboard are pasted after the last slide in the presentation.

Return Value

SlideRange

Remarks

Use the ViewType property to set the view for a window before pasting the Clipboard contents into it. The following table shows what you can paste into each view.

Into this view | You can paste the following from the Clipboard
Slide view or notes page view | Shapes, text, or entire slides. If you paste a slide from the Clipboard, an image of the slide will be inserted onto the slide, master, or notes page as an embedded object. If one shape is selected, the pasted text will be appended to the shape's text; if text is selected, the pasted text will replace the selection; if anything else is selected, the pasted text will be placed in it is own text frame. Pasted shapes will be added to the top of the z-order and won't replace selected shapes.
Outline view | Text or entire slides. You cannot paste shapes into outline view. A pasted slide will be inserted before the slide that contains the cursor.
Slide sorter view | Entire slides. You cannot paste shapes or text into slide sorter view. A pasted slide will be inserted at the cursor or after the last slide selected in the presentation.

Example

This example cuts slides three and five from the Old Sales presentation and then inserts them before slide four in the active presentation.

VBA Copy code Copy code
Presentations("Old Sales").Slides.Range(Array(3, 5)).Cut

ActivePresentation.Slides.Paste 4

See also

Concepts

Slides Object

Other resources

Slides Object Members


PropertyEffect.From Property (PowerPoint)

 Copy code hover
[image]

PropertyEffect.From Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns a Variant that represents the starting value of an object's property. Read/write.

Syntax

expression .From

expression A variable that represents a PropertyEffect object.

Remarks

The From property is similar to the Points property, but using the From property is easier for simple tasks.

The default value is Empty, in which case the current position of the object is used.

Do not confuse this property with the FromX or FromY properties of the ScaleEffect and MotionEffect objects, which are only used for scaling or motion effects.

See also

Concepts

PropertyEffect Object

Other resources

PropertyEffect Object Members


Master.Parent Property (PowerPoint)

 Copy code hover
[image]

Master.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a Master object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

Master Object

Other resources

Master Object Members


Shape.ScaleHeight Method (PowerPoint)

 Copy code hover
[image]

Shape.ScaleHeight Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Scales the height of the shape by a specified factor.

Syntax

expression .ScaleHeight(Factor, RelativeToOriginalSize, fScale)

expression A variable that represents a Shape object.

Parameters

Name | Required/Optional | Data Type | Description
Factor | Required | Single | Specifies the ratio between the height of the shape after you resize it and the current or original height. For example, to make a rectangle 50 percent larger, specify 1.5 for this argument.
RelativeToOriginalSize | Required | MsoTriState | Specifies whether the shape is scaled relative to its current or original size.
fScale | Optional | MsoScaleFrom | The part of the shape that retains its position when the shape is scaled.

Remarks

For pictures and OLE objects, you can indicate whether you want to scale the shape relative to its original size or relative to its current size. Shapes other than pictures and OLE objects are always scaled relative to their current height.

The RelativeToOriginalSize parameter value can be one of the following MsoTriState constants. You can specify msoTrue for this parameter only if the specified shape is a picture or an OLE object.

Constant | Description
msoFalse | Scales the shape relative to its current size.
msoTrue | Scales the shape relative to its original size.

The fScale parameter value can be one of the following MsoTriState constants. The default is msoScaleFromTopLeft.

msoScaleFromBottomRight

msoScaleFromMiddle

msoScaleFromTopLeft

Example

This example scales all pictures and OLE objects on myDocument to 175 percent of their original height and width, and it scales all other shapes to 175 percent of their current height and width.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

For Each s In myDocument.Shapes

    Select Case s.Type

    Case msoEmbeddedOLEObject, msoLinkedOLEObject, _

            msoOLEControlObject, msoLinkedPicture, msoPicture

        s.ScaleHeight 1.75, msoTrue

        s.ScaleWidth 1.75, msoTrue

    Case Else

        s.ScaleHeight 1.75, msoFalse

        s.ScaleWidth 1.75, msoFalse

    End Select

Next

See also

Concepts

Shape Object

Other resources

Shape Object Members


SeriesCollection Properties (PowerPoint)

 Copy code hover
[image]

SeriesCollection Properties (PowerPoint)
Send feedback

Published: July 12, 2012

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Count | Returns the number of objects in the collection. Read-only Long.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Parent | Returns the parent for the specified object. Read-only Object.


Trendline.Index Property (PowerPoint)

 Copy code hover
[image]

Trendline.Index Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the index number of the object within the collection of similar objects. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Index

expression A variable that represents a Trendline object.

See also

Concepts

Trendline Object

Other resources

Trendline Object Members


Presentation.FollowHyperlink Method (PowerPoint)

 Copy code hover
[image]

Presentation.FollowHyperlink Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Displays a cached document, if it has already been downloaded. Otherwise, this method resolves the hyperlink, downloads the target document and displays it in the appropriate application.

Syntax

expression .FollowHyperlink(Address, SubAddress, NewWindow, AddHistory, ExtraInfo, Method, HeaderInfo)

expression A variable that represents a Presentation object.

Parameters

Name | Required/Optional | Data Type | Description
Address | Required | String | The address of the target document.
SubAddress | Optional | String | The location in the target document. By default, this argument is an empty string.
NewWindow | Optional | Boolean | True to have the target application opened in a new window. The default value is False.
AddHistory | Optional | Boolean | True to add the link to the current day's history folder.
ExtraInfo | Optional | String | String or byte array that specifies information for HTTP. This argument can be used, for example, to specify the coordinates of an image map or the contents of a form. It can also indicate a FAT file name. The Method argument determines how this extra information is handled.
Method | Optional | MsoExtraInfoMethod | Specifies how ExtraInfo is posted or appended.
HeaderInfo | Optional | String | A string that specifies header information for the HTTP request. The default value is an empty string. You can combine several header lines into a single string by using the following syntax: "string1" & vbCr & "string2". The specified string is automatically converted into ANSI characters. Note that the HeaderInfo argument may overwrite default HTTP header fields.

Return Value

Nothing

Remarks

ExtraInfo can be one of these MsoExtraInfoMethod constants.

Constant | Description
msoMethodGet | The default. ExtraInfo is a String that is appended to the address.
msoMethodPost | ExtraInfo is posted as a String or byte array.

Example

This example loads the document at example.microsoft.com in a new window and adds it to the history folder.

VBA Copy code Copy code
ActivePresentation.FollowHyperlink _

    Address:="http://example.microsoft.com", _

    NewWindow:=True, AddHistory:=True

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


ShapeRange.IncrementRotation Method (PowerPoint)

 Copy code hover
[image]

ShapeRange.IncrementRotation Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Changes the rotation of the specified shape range around the z-axis by the specified number of degrees. Use the Rotation property to set the absolute rotation of the shape range.

Syntax

expression .IncrementRotation(Increment)

expression A variable that represents a ShapeRange object.

Parameters

Name | Required/Optional | Data Type | Description
Increment | Required | Single | Specifies how far the shape range is to be rotated horizontally, in degrees. A positive value rotates the shape range clockwise; a negative value rotates it counterclockwise.

Remarks

To rotate a three-dimensional shape range around the x-axis or the y-axis, use the IncrementRotationX method or the IncrementRotationY method.

Example

This example duplicates shape one on myDocument, sets the fill for the duplicate, moves it 70 points to the right and 50 points up, and rotates it 30 degrees clockwise.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(1).Duplicate

    .Fill.PresetTextured msoTextureGranite

    .IncrementLeft 70

    .IncrementTop -50

    .IncrementRotation 30

End With

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


How to: Control One Microsoft Office Application from Another

 Copy code hover
[image]

How to: Control One Microsoft Office Application from Another
Send feedback

If you want to run code in one Microsoft Office application that works with the objects in another application, follow these steps.

  1. Set a reference to the other application's type library in the References dialog box (Tools menu). After you have done this, the objects, properties, and methods show up in the Object Browser and the syntax is checked at compile time. You can also get context-sensitive Help on them.

  2. Declare object variables that will refer to the objects in the other application as specific types. Make sure you qualify each type with the name of the application that is supplying the object. For example, the following statement declares a variable that will point to a Microsoft Word document, and another that refers to a Microsoft Excel application.

    VBA Copy code Copy code
    Dim appWD As Word.Application, wbXL As Excel.Application

    Note You must follow the steps above if you want your code to be early bound.

  3. Use the New keyword with the OLE Programmatic Identifier of the object you want to work with in the other application, as shown in the following example. If you want to see the session of the other application, set the Visible property to True.

    VBA Copy code Copy code
    Dim appWD As Word.Application
Set appWD = New Word.Application
appWd.Visible = True

  4. Apply properties and methods to the object contained in the variable. For example, the following instruction creates a Word document.

    VBA Copy code Copy code
    Dim appWD As Word.Application
Set appWD = New Word.Application
appWD.Documents.Add

  5. When you have finished working with the other application, use the Quit method to close it, as shown in the following example.

    VBA Copy code Copy code
    appWd.Quit


PpPasteDataType Enumeration (PowerPoint)

 Copy code hover
[image]

PpPasteDataType Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies a format for the Clipboard contents when they are inserted into the document.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppPasteBitmap | 1 | Paste bitmap.
ppPasteDefault | 0 | Paste the default content of the clipboard.
ppPasteEnhancedMetafile | 2 | Paste enhanced Metafile
ppPasteGIF | 4 | Paste a GIF image.
ppPasteHTML | 8 | Paste HTML.
ppPasteJPG | 5 | Paste a JPG image.
ppPasteMetafilePicture | 3 | Paste a Metafile picture.
ppPasteOLEObject | 10 | Paste OLE object.
ppPastePNG | 6 | Paste PNG image.
ppPasteRTF | 9 | Paste RTF.
ppPasteShape | 11 | Paste a shape.
ppPasteText | 7 | Paste text.


Presentation.SaveCopyAs Method (PowerPoint)

 Copy code hover
[image]

Presentation.SaveCopyAs Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Saves a copy of the specified presentation to a file without modifying the original.

Syntax

expression .SaveCopyAs(FileName, FileFormat, EmbedTrueTypeFonts)

expression A variable that represents a Presentation object.

Parameters

Name | Required/Optional | Data Type | Description
FileName | Required | String | Specifies the name to save the file under. If you don't include a full path, PowerPoint saves the file in the current folder.
FileFormat | Optional | PpSaveAsFileType | The file format.
EmbedTrueTypeFonts | Optional | MsoTriState | Specifies whether TrueType fonts are embedded.

Remarks

The FileFormat parameter value can be one of these PpSaveAsFileType constants. The default is ppSaveAsDefault.

ppSaveAsHTMLv3

ppSaveAsAddIn

ppSaveAsBMP

ppSaveAsDefault

ppSaveAsGIF

ppSaveAsHTML

ppSaveAsHTMLDual

ppSaveAsJPG

ppSaveAsMetaFile

ppSaveAsPNG

ppSaveAsPowerPoint3

ppSaveAsPowerPoint4

ppSaveAsPowerPoint4FarEast

ppSaveAsPowerPoint7

ppSaveAsPresentation

ppSaveAsRTF

ppSaveAsShow

ppSaveAsTemplate

ppSaveAsTIF

ppSaveAsWebArchive

The EmbedTrueTypeFonts parameter value can be one of these MsoTriState constants.

Constant | Description
msoFalse | TrueType fonts are not embedded.
msoTriStateMixed | Embedded fonts are a mixture of TrueType and non-TrueType. The default.
msoTrue | TrueType fonts are embedded.

Example

This example saves a copy of the active presentation under the name "New Format Copy.ppt." By default, this copy is saved in the format of a presentation in the current version of PowerPoint. The presentation is then saved as a PowerPoint 4.0 file named "Old Format Copy."

VBA Copy code Copy code
With Application.ActivePresentation

    .SaveCopyAs "New Format Copy"

    .SaveAs "Old Format Copy", ppSaveAsPowerPoint4

End With

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


Interior.Parent Property (PowerPoint)

 Copy code hover
[image]

Interior.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents an Interior object.

See also

Concepts

Interior Object

Other resources

Interior Object Members


Shape Properties (PowerPoint)

 Copy code hover
[image]

Shape Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
ActionSettings | Returns an ActionSettings object that contains information about what action occurs when the user clicks or moves the mouse over the specified shape or text range during a slide show. Read-only.
Adjustments | Returns an Adjustments object that contains adjustment values for all the adjustments in the specified shape. Applies to any Shape object that represents an AutoShape, WordArt, or a connector. Read-only.
AlternativeText | Returns or sets the alternative text associated with a shape in a Web presentation. Read/write.
AnimationSettings | Returns an AnimationSettings object that represents all the special effects you can apply to the animation of the specified shape. Read-only.
Application | Returns an Application object that represents the creator of the specified object.
AutoShapeType | Returns or sets the shape type for the specified Shape object, which must represent an AutoShape other than a line, freeform drawing, or connector. Read/write.
BackgroundStyle | Sets or returns the background style of the specified object. Read/write.
BlackWhiteMode | Returns or sets a value that indicates how the specified shape appears when the presentation is viewed in black-and-white mode. Read/write.
Callout | Returns a CalloutFormat object that contains callout formatting properties for the specified shape. Applies to Shape or ShapeRange objects that represent line callouts. Read-only.
Chart | Returns a Chart object of the current Shape object. Read-only.
Child | MsoTrue if the shape is a child shape or if all shapes in a shape range are child shapes of the same parent. Read-only.
ConnectionSiteCount | Returns the number of connection sites on the specified shape. Read-only.
Connector | Determines whether the specified shape is a connector. Read-only.
ConnectorFormat | Returns a ConnectorFormat object that contains connector formatting properties. Applies to Shape or ShapeRange objects that represent connectors. Read-only.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
CustomerData | Returns a CustomerData object. Read-only.
Fill | Returns a FillFormat object that contains fill formatting properties for the specified shape. Read-only.
Glow | Returns the glow format for the specified shape. Read-only.
GroupItems | Returns a GroupShapes object that represents the individual shapes in the specified group. Use the Item method of the GroupShapes object to return a single shape from the group. Read-only.
HasChart | Returns whether the shape represented by the specified object contains a chart. Read-only.
HasSmartArt | Returns True if the current Shape object contains a SmartArt diagram. Read-only.
HasTable | Returns whether the specified shape is a table. Read-only.
HasTextFrame | Returns whether the specified shape has a text frame. Read-only.
Height | Returns or sets the height of the specified object, in points. Read/write.
HorizontalFlip | Returns whether the specified shape is flipped around the horizontal axis. Read-only.
Id | Returns a Long that identifies the shape or range of shapes. Read-only.
Left | Returns or sets a Single that represents the distance in points from the left edge of the shape's bounding box to the left edge of the slide. Read/write.
Line | Returns a LineFormat object that contains line formatting properties for the specified shape. (For a line, the LineFormat object represents the line itself; for a shape with a border, the LineFormat object represents the border.) Read-only.
LinkFormat | Returns a LinkFormat object that contains the properties that are unique to linked OLE objects. Read-only.
LockAspectRatio | Determines whether the specified shape retains its original proportions when you resize it. Read/write.
MediaFormat | Allows access to the new audio or video object. Read-only.
MediaType | Returns the OLE media type. Read-only.
Name | When a shape is created, Microsoft PowerPoint automatically assigns it a name in the form ShapeType Number, where ShapeType identifies the type of shape or AutoShape, and Number is an integer that's unique within the collection of shapes on the slide. For example, the automatically generated names of the shapes on a slide could be Placeholder 1, Oval 2, and Rectangle 3. To avoid conflict with automatically assigned names, don't use the form ShapeType Number for user-defined names, where ShapeType is a value that is used for automatically generated names, and Number is any positive integer. A shape range must contain exactly one shape. Read/write.
Nodes | Returns a ShapeNodes collection that represents the geometric description of the specified shape. Applies to Shape objects that represent freeform drawings.
OLEFormat | Returns an OLEFormat object that contains OLE formatting properties for the specified shape. Applies to Shape or ShapeRange objects that represent OLE objects. Read-only.
Parent | Returns the parent object for the specified object.
ParentGroup | Returns a Shape object that represents the common parent shape of a child shape or a range of child shapes.
PictureFormat | Returns a PictureFormat object that contains picture formatting properties for the specified shape. Read-only.
PlaceholderFormat | Returns a PlaceholderFormat object that contains the properties that are unique to placeholders. Read-only.
Reflection | Returns the reflection format for the specified shape. Read-only.
Rotation | Returns or sets the number of degrees the specified shape is rotated around the z-axis. Read/write.
Shadow | Returns a ShadowFormat object that contains shadow formatting properties for the specified shape. Read-only.
ShapeStyle | Sets or returns the shape style index for the specified object. Read/write.
SmartArt | Returns a Microsoft Office SmartArt object that represents the SmartArt diagram of the Shape object. Read-only.
SoftEdge | Returns the soft edge format for the specified shape. Read-only.
Table | Returns a Table object that represents a table in a shape or in a shape range. Read-only.
Tags | Returns a Tags object that represents the tags for the specified object. Read-only.
TextEffect | Returns a TextEffectFormat object that contains text-effect formatting properties for the specified shape. Read-only.
TextFrame | Returns a TextFrame object that contains the alignment and anchoring properties for the specified shape or master text style.
TextFrame2 | Returns the TextFrame2 object associated with the specified Shape object that contains the alignment and anchoring properties for the specified shape. Read-only.
ThreeD | Returns a ThreeDFormat object that contains 3-D - effect formatting properties for the specified shape. Read-only.
Title | Returns a Shape object that represents the slide title. Read-only.
Top | Returns or sets a Single that represents the distance from the top edge of the shape's bounding box to the top edge of the document. Read/write.
Type | Represents the type of shape or shapes in a range of shapes. Read-only.
VerticalFlip | Determines whether the specified shape is flipped around the vertical axis. Read-only.
Vertices | Returns the coordinates of the specified freeform drawing's vertices (and control points for Bézier curves) as a series of coordinate pairs. Read-only.
Visible | Returns or sets the visibility of the specified object or the formatting applied to the specified object. Read/write.
Width | Returns or sets the width of the specified object, in points. Read/write.
ZOrderPosition | Returns the position of the specified shape in the z-order. Read-only.


Tags.Application Property (PowerPoint)

 Copy code hover
[image]

Tags.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a Tags object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

Tags Object

Other resources

Tags Object Members


ResampleMediaTask.SampleHeight Property (PowerPoint)

 Copy code hover
[image]

ResampleMediaTask.SampleHeight Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the resolution height of the sample. Read-only.

Syntax

expression .SampleHeight

expression A variable that represents a ResampleMediaTask object.

See also

Concepts

ResampleMediaTask Object

Other resources

ResampleMediaTask Object Members


SlideShowView.MediaControlsHeight Property (PowerPoint)

 Copy code hover
[image]

SlideShowView.MediaControlsHeight Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the height of the media control bounding box. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .MediaControlsHeight

expression A variable that represents a SlideShowView object.

Return Value

Single

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


SlideShowSettings.PointerColor Property (PowerPoint)

 Copy code hover
[image]

SlideShowSettings.PointerColor Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the pointer color for the specified presentation as a ColorFormat object. Read-only.

Syntax

expression .PointerColor

expression A variable that represents a SlideShowSettings object.

Return Value

ColorFormat

Remarks

The pointer color is saved with the presentation and is the default pen color each time you show the presentation.

To change the pointer to a pen, set the PointerType property to ppSlideShowPointerPen.

Example

This example sets the default pen color for the active presentation to blue, starts a slide show, changes the pointer to a pen, and then sets the pen color to red for this slide show only.

VBA Copy code Copy code
With ActivePresentation.SlideShowSettings

    .PointerColor.RGB = RGB(0, 0, 255)          'blue

    With .Run.View

        .PointerColor.RGB = RGB(255, 0, 0)      'red

        .PointerType = ppSlideShowPointerPen

    End With

End With

See also

Concepts

SlideShowSettings Object

Other resources

SlideShowSettings Object Members


MediaFormat.SampleHeight Property (PowerPoint)

 Copy code hover
[image]

MediaFormat.SampleHeight Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the resolution height of the sample media. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .SampleHeight

expression An expression that returns a MediaFormat object.

Return Value

Long

See also

Concepts

MediaFormat Object

Other resources

MediaFormat Object Members


ShapeNodes.Application Property (PowerPoint)

 Copy code hover
[image]

ShapeNodes.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a ShapeNodes object.

Return Value

Object

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

ShapeNodes Object

Other resources

ShapeNodes Object Members


TextRange.AddPeriods Method (PowerPoint)

 Copy code hover
[image]

TextRange.AddPeriods Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Adds a period at the end of each paragraph in the specified text.

Syntax

expression .AddPeriods

Remarks

This method doesn't add another period at the end of a paragraph that already ends with a period.

Example

This example adds a period at the end of each paragraph in shape two on slide one in the active presentation.

VBA Copy code Copy code
Application.ActivePresentation.Slides(1).Shapes(2).TextFrame.TextRange.AddPeriods

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


Designs.Add Method (PowerPoint)

 Copy code hover
[image]

Designs.Add Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Design object that represents a new slide design.

Syntax

expression .Add(designName, Index)

expression A variable that represents a Designs object.

Parameters

Name | Required/Optional | Data Type | Description
designName | Required | String | The name of the design.
Index | Optional | Integer | The index number of the design in the Designs collection. The default value is -1, which means that if you omit the Index parameter, the new slide design is added at the end of existing slide designs.

Return Value

Design

See also

Concepts

Designs Object

Other resources

Designs Object Members


ColorFormat Members (PowerPoint)

 Copy code hover
[image]

ColorFormat Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents the color of a one-color object, the foreground or background color of an object with a gradient or patterned fill, or the pointer color. You can set colors to an explicit red-green-blue value (by using the RGB property) or to a color in the color scheme (by using the SchemeColor property).

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Brightness | Returns or sets the brightness of the specified picture or OLE object. The value for this property must be a number from 0.0 (dimmest) to 1.0 (brightest). Read/write Single.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
ObjectThemeColor | Returns or sets the theme color of the specified ColorFormat object. Read/Write.
Parent | Returns the parent object for the specified object.
RGB | Returns or sets the red-green-blue (RGB) value of the specified color. Read/write.
SchemeColor | Returns or sets the color in the applied color scheme that's associated with the specified object. Read/write.
TintAndShade | Sets or returns the lightening or darkening of the the color of a specified shape. Read/write.
Type | Represents the type of color. Read-only.


TextEffectFormat.PresetTextEffect Property (PowerPoint)

 Copy code hover
[image]

TextEffectFormat.PresetTextEffect Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the style of the specified WordArt. Read/write.

Syntax

expression .PresetTextEffect

expression A variable that represents a TextEffectFormat object.

Return Value

MsoPresetTextEffect

Remarks

Setting the PresetTextEffect property automatically sets many other formatting properties of the specified shape.

The value of the PresetTextEffect property can be one of these MsoPresetTextEffect constants.

msoTextEffect1

msoTextEffect2

msoTextEffect3

msoTextEffect4

msoTextEffect5

msoTextEffect6

msoTextEffect7

msoTextEffect8

msoTextEffect9

msoTextEffect10

msoTextEffect11

msoTextEffect12

msoTextEffect13

msoTextEffect14

msoTextEffect15

msoTextEffect16

msoTextEffect17

msoTextEffect18

msoTextEffect19

msoTextEffect20

msoTextEffect21

msoTextEffect22

msoTextEffect23

msoTextEffect24

msoTextEffect25

msoTextEffect26

msoTextEffect27

msoTextEffect28

msoTextEffect29

msoTextEffect30

msoTextEffectMixed

Example

This example sets the style for all WordArt on myDocument to the first style listed in the WordArt Quick Styles tab.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

For Each s In myDocument.Shapes

    If s.Type = msoTextEffect Then

        s.TextEffect.PresetTextEffect = msoTextEffect1

    End If

Next

See also

Concepts

TextEffectFormat Object

Other resources

TextEffectFormat Object Members


Application.DisplayGuides Property (PowerPoint)

 Copy code hover
[image]

Application.DisplayGuides Property (PowerPoint)
Send feedback

Gets or sets whether drawing guides are displayed in the application.

Version information

Version Added: PowerPoint 2013

Syntax

expression .DisplayGuides

expression A variable that represents a Application object.

Return Value

MsoTriState

Property value

<unknown type>


PpTransitionSpeed Enumeration (PowerPoint)

 Copy code hover
[image]

PpTransitionSpeed Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Constants that specify the speed of the transition from one slide to the next, passed to and returned by the Speed property of the SlideShowTransition object

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppTransitionSpeedFast | 3 | Fast
ppTransitionSpeedMedium | 2 | Medium
ppTransitionSpeedMixed | -2 | Mixed
ppTransitionSpeedSlow | 1 | Slow


Slide.Layout Property (PowerPoint)

 Copy code hover
[image]

Slide.Layout Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets a PpSlideLayout constant that represents the slide layout. Read/write.

Syntax

expression .Layout

expression A variable that represents a Slide object.

Remarks

The value of the Layout property 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

Example

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.

VBA Copy code Copy code
With ActivePresentation.Slides(1)

    If .Layout = ppLayoutTitleOnly Then

        .Layout = ppLayoutTitle

    End If

End With

See also

Concepts

Slide Object

Other resources

Slide Object Members


ShapeNodes Properties (PowerPoint)

 Copy code hover
[image]

ShapeNodes Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
Parent | Returns the parent object for the specified object.


FullSeriesCollection.Creator Property (PowerPoint)

 Copy code hover
[image]

FullSeriesCollection.Creator Property (PowerPoint)
Send feedback

Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.

Version Information

Version Added: PowerPoint 2013

Syntax

expression .Creator

expression A variable that represents a FullSeriesCollection object.


Sequences Members (PowerPoint)

 Copy code hover
[image]

Sequences Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a collection of Sequence objects. Use a Sequence object to add, find, modify, and clone animation effects.

Methods

Name | Description
Add | Returns a Sequence object that represents a new sequence.
Item | Returns a single Sequence object from the specified Sequences collection.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


LegendKey.MarkerSize Property (PowerPoint)

 Copy code hover
[image]

LegendKey.MarkerSize Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the data-marker size, in points. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .MarkerSize

expression A variable that represents a LegendKey object.

Remarks

The value of this property can be from 2 through 72.

See also

Concepts

LegendKey Object

Other resources

LegendKey Object Members


Presentation.PasswordEncryptionAlgorithm Property (PowerPoint)

 Copy code hover
[image]

Presentation.PasswordEncryptionAlgorithm Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the algorithm Microsoft PowerPoint uses for encrypting documents with passwords. Read-only.

Syntax

expression .PasswordEncryptionAlgorithm

expression A variable that represents a Presentation object.

Return Value

String

Remarks

Use the SetPasswordEncryptionOptions method to specify the algorithm PowerPoint uses for encrypting documents with passwords.

Example

This example sets the password encryption options if the password encryption algorithm in use is not RC4.

VBA Copy code Copy code
Sub PasswordSettings()

    With ActivePresentation

        If .PasswordEncryptionAlgorithm <> "RC4" Then

            .SetPasswordEncryptionOptions _

                PasswordEncryptionProvider:="Microsoft RSA SChannel Cryptographic Provider", _

                PasswordEncryptionAlgorithm:="RC4", _

                PasswordEncryptionKeyLength:=56, _

                PasswordEncryptionFileProperties:=True

        End If

    End With

End Sub

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


Placeholders.Item Method (PowerPoint)

 Copy code hover
[image]

Placeholders.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single Shape object from the specified Placeholders collection.

Syntax

expression .Item(Index)

expression A variable that represents a Placeholders object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Long | The index number of the single Shape object in the collection to be returned.

Return Value

Shape

See also

Concepts

Placeholders Object

Other resources

Placeholders Object Members


AnimationBehaviors.Application Property (PowerPoint)

 Copy code hover
[image]

AnimationBehaviors.Application Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents an AnimationBehaviors object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

AnimationBehaviors Object

Other resources

AnimationBehaviors Object Members


Chart.Format Property (PowerPoint)

 Copy code hover
[image]

Chart.Format Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the ChartFormat object. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Format

expression A variable that represents a Chart object.

Remarks

The ChartFormat object contains the line, fill, and effect formatting for the chart area.

See also

Concepts

Chart Object

Other resources

Chart Object Members


PlaySettings.ActionVerb Property (PowerPoint)

 Copy code hover
[image]

PlaySettings.ActionVerb Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a string that contains the OLE verb that will be run when the specified OLE object is animated during a slide show. Read/write.

Syntax

expression .ActionVerb

expression A variable that represents a PlaySettings object.

Remarks

The default verb specifies the action that the OLE object runs — such as playing a wave file or displaying data so that the user can modify it — after the previous animation or slide transition.

Example

This example specifies that shape three on slide one in the active presentation will automatically open for editing when it is animated. Shape three must be an OLE object that contains a sound or movie object and that supports the "Edit" verb.

VBA Copy code Copy code
Set OLEobj = ActivePresentation.Slides(1).Shapes(3)

With OLEobj.AnimationSettings.PlaySettings

    .PlayOnEntry = True

    .ActionVerb = "Edit"

End With

See also

Concepts

PlaySettings Object

Other resources

PlaySettings Object Members


XlAxisGroup Enumeration (PowerPoint)

 Copy code hover
[image]

XlAxisGroup Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the type of axis group.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlPrimary | 1 | The primary axis group.
xlSecondary | 2 | The secondary axis group.


ThemeVariant.Parent Property (PowerPoint)

 Copy code hover
[image]

ThemeVariant.Parent Property (PowerPoint)
Send feedback

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2013

Syntax

expression .Parent

expression A variable that represents a ThemeVariant object.


XlScaleType Enumeration (PowerPoint)

 Copy code hover
[image]

XlScaleType Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the scale type of the value axis.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlScaleLinear | -4132 | A linear scale.
xlScaleLogarithmic | -4133 | A logarithmic scale.


Presentation.Coauthoring Property (PowerPoint)

 Copy code hover
[image]

Presentation.Coauthoring Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Coauthoring object in the current Presentation object. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Coauthoring

expression A variable that represents a Presentation object.

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


ChartData.Activate Method (PowerPoint)

 Copy code hover
[image]

ChartData.Activate Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Activates the first window of the workbook associated with the chart.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Activate

expression A variable that represents a ChartData object.

Remarks

If the chart is linked to a Microsoft Excel workbook, this method does not run any Auto_Activate or Auto_Deactivate macros that might be attached to the workbook (use the RunAutoMacros method to run those macros).

Note Note

You must call this method before referencing the Workbook property.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example activates the Excel workbook associated with the first chart in the active document. If the Excel workbook has multiple windows, the example activates the first window. The example then copies the contents of cells B1 through B5 and pastes the cell contents into the chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)
    If .HasChart Then
        .Chart.ChartData.Activate
        .Chart.ChartData.Workbook. _
            Worksheets("Sheet1").Range("B1:B5").Copy
        .Chart.Paste
    End If
End With

See also

Concepts

ChartData Object

Other resources

ChartData Object Members


What's new for PowerPoint 2013 developers

 Copy code hover
[image]

What's new for PowerPoint 2013 developers
Send feedback

This document provides a top-level view of the additions and enhancements for developers in PowerPoint 2013. For developers who are ready to get a jump start on the PowerPoint platform, this document provides you with information to begin coding against PowerPoint 2013.

In this article
Introduction
Microsoft PowerPoint Automation Services
Theme manipulation
Extended support for broadcasting a presentation
Shape events
Commenting
Drawing guides
Improvements in charting
Additional resources

Introduction

The changes to the Microsoft PowerPoint 2013 object model are incremental and provide object model support for new features in PowerPoint 2013.

Microsoft PowerPoint Automation Services

Microsoft SharePoint Server 2013 includes a new conversion service, Microsoft PowerPoint Automation Services, to allow you to convert presentations to other formats on a server. You can convert a PowerPoint presentation file (.pptx or .ppt) to other file types, including .pdf, .xps, and .pptx.

For more information about Microsoft PowerPoint Automation Services, see PowerPoint Automation Services in SharePoint Server 2013.

Theme manipulation

You can open theme files and apply them to slides programmatically in PowerPoint 2013. You can also open a theme file using the new Application.OpenThemeFile method. Microsoft PowerPoint now has a Theme object and a ThemeVariation object for working with themes in your solution.

Extended support for broadcasting a presentation

PowerPoint 2013 has many new APIs for working with a broadcasted presentation. New APIs include the Broadcast.Pause and Broadcast.Resume methods for putting a broadcast on hold. The Broadcast.PresenterServiceUrl property for getting the URL of the broadcast service; and the Broadcast.AddMeetingNotes method for including meeting notes with the broadcast.

Shape events

PowerPoint 2013 includes two application-level events for working with shapes: the Application.AfterDragDropOnSlide and the Application.AfterShapeSizeChange.

Commenting

Commenting in PowerPoint 2013 is greatly improved. New APIs have been added to Microsoft PowerPoint including the Comments.Add2 for replying to comments and the Comment.Replies for accessing the replies to a comment.

Drawing guides

PowerPoint 2013 now includes APIs for adding, deleting, and positioning drawing guides. You can use the Presentation.Guides property to return a Guides collection of all the guides in the presentation. You can then use the Guides.Add method to add new guides to the presentation and then position the guide using the properties of the Guide object.

Improvements in charting

PowerPoint 2013 includes multiple improvements to charts. There is a new method for creating charts, Shapes.AddChart2, and new APIs for changing the color and formatting of charts including Chart.ClearToMatchColorStyle method, Chart.ChartColor property, ChartFormat.AutoShapeType property.

Additional resources

  • PowerPoint for developers

  • Welcome to the PowerPoint 2013 developer reference

  • What's new in PowerPoint 2013


CustomLayout.Hyperlinks Property (PowerPoint)

 Copy code hover
[image]

CustomLayout.Hyperlinks Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Hyperlinks collection that represents all hyperlinks on the slide associated with the specified custom layout. Read-only.

Syntax

expression .Hyperlinks

expression A variable that represents a CustomLayout object.

Return Value

Hyperlinks

See also

Concepts

CustomLayout Object

Other resources

CustomLayout Object Members


FillFormat.Pattern Property (PowerPoint)

 Copy code hover
[image]

FillFormat.Pattern Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns a value that represents the pattern applied to the specified fill. Read-only.

Syntax

expression .Pattern

expression A variable that represents a FillFormat object.

Return Value

MsoPatternType

Remarks

Use the BackColor and ForeColor properties to set the colors used in the pattern.

Example

This example adds a rectangle to myDocument and sets its fill pattern to match that of the shape named "rect1." The new rectangle has the same pattern as rect1, but not necessarily the same colors. The colors used in the pattern are set with the BackColor and ForeColor properties.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)
With myDocument.Shapes
    pattern1 = .Item("rect1").Fill.Pattern
    With .AddShape(msoShapeRectangle, 100, 100, 120, 80).Fill
        .ForeColor.RGB = RGB(128, 0, 0)
        .BackColor.RGB = RGB(0, 0, 255)
        .Patterned pattern1
    End With
End With

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


ChartCharacters.Delete Method (PowerPoint)

 Copy code hover
[image]

ChartCharacters.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Delete

expression A variable that represents a ChartCharacters object.

See also

Concepts

ChartCharacters Object

Other resources

ChartCharacters Object Members


ProtectedViewWindows.Open Method (PowerPoint)

 Copy code hover
[image]

ProtectedViewWindows.Open Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Open and return a ProtectedViewWindow object from the ProtectedViewWindows collection.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Open(FileName, ReadPassword, OpenAndRepair)

expression A variable that represents a ProtectedViewWindows object.

Parameters

Name | Required/Optional | Data Type | Description
FileName | Required | String | The name of the file to open.
ReadPassword | Optional | String | The password to use for the protected file.
OpenAndRepair | Optional | [MSOTRISTATE] | Indicates whether to repair the file.

Return Value

ProtectedViewWindow object

See also

Concepts

ProtectedViewWindows Object

Other resources

ProtectedViewWindows Object Members


ShapeRange.VerticalFlip Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.VerticalFlip Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the specified shape is flipped around the vertical axis. Read-only.

Syntax

expression .VerticalFlip

expression A variable that represents a ShapeRange object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified shape is not flipped around the vertical axis.
msoTrue | The specified shape is flipped around the vertical axis.

Example

This example restores each shape on myDocument to its original state if it is been flipped horizontally or vertically.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

For Each s In myDocument.Shapes

    If s.HorizontalFlip Then s.Flip msoFlipHorizontal

    If s.VerticalFlip Then s.Flip msoFlipVertical

Next

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


Series.InvertColorIndex Property (PowerPoint)

 Copy code hover
[image]

Series.InvertColorIndex Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the fill color for negative data points in a series. Read/write.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .InvertColorIndex

expression A variable that represents a Series object.

Return Value

Integer

Remarks

The InvertColorIndex property enables you to set the fill color for negative data points as a color index value from 0 to 56. Instead of using the InvertColorIndex property, you can use the InvertColor property, which enables you to set the color as a specific numeric, hexadecimal, octal, or RGB color value.

For the InvertColorIndex property to have an effect, the InvertIfNegative property of the Series object must also be set to True.

Example

The following code example sets the fill color of negative data points in the first series of chart 2 to magenta.

VBA Copy code Copy code
ActiveSheet.ChartObjects("Chart 2").Activate

ActiveChart.SeriesCollection(1).InvertIfNegative = True

ActiveChart.SeriesCollection(1).InvertColorIndex = 7

See also

Concepts

Series Object

Other resources

Series Object Members


PublishObject.Publish Method (PowerPoint)

 Copy code hover
[image]

PublishObject.Publish Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Creates a Web presentation (HTML format) from any loaded presentation. You can view the published presentation in a Web browser.

Syntax

expression .Publish

expression A variable that represents a PublishObject object.

Remarks

You can specify the content and attributes of the published presentation by setting various properties of the PublishObject object. For example, the SourceType property defines the portion of a loaded presentation to be published. The RangeStart property and the RangeEnd property specify the range of slides to publish, and the SpeakerNotes property designates whether or not to publish the speaker's notes.

Example

This example publishes slides three through five of the active presentation to HTML. It names the published presentation Mallard.htm.

VBA Copy code Copy code
With ActivePresentation.PublishObjects(1)

    .FileName = "C:\Test\Mallard.htm"

    .SourceType = ppPublishSlideRange

    .RangeStart = 3

    .RangeEnd = 5

    .Publish

End With

See also

Concepts

PublishObject Object

Other resources

PublishObject Object Members


ShapeRange.ZOrder Method (PowerPoint)

 Copy code hover
[image]

ShapeRange.ZOrder Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Moves the specified shape range in front of or behind other shapes in the collection (that is, changes the shape range's position in the z-order).

Syntax

expression .ZOrder(ZOrderCmd)

expression A variable that represents a ShapeRange object.

Parameters

Name | Required/Optional | Data Type | Description
ZOrderCmd | Required | MsoZOrderCmd | Specifies where to move the specified shape range relative to the other shapes.

Remarks

The ZOrderCmd parameter value can be one of these MsoZOrderCmd constants.

msoBringForward

msoBringInFrontOfText

msoBringToFront

msoSendBackward

msoSendBehindText

msoSendToBack

The msoBringInFrontOfText and msoSendBehindText constants should be used only in Microsoft Office Word.

Use the ZOrderPosition property to determine a shape's current position in the z-order.

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


Player.State Property (PowerPoint)

 Copy code hover
[image]

Player.State Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the current state of the player. Read-only.

Syntax

expression .State

expression A variable that represents a Player object.

Remarks

State can return the following PpPlayerState values.

Constant | Value | Description
ppPlaying | 0 | Playing
ppPaused | 1 | Paused
ppStopped | 2 | Stopped
ppNotReady | 3 | Not ready

See also

Concepts

Player Object

Other resources

Player Object Members


Shape.RerouteConnections Method (PowerPoint)

 Copy code hover
[image]

Shape.RerouteConnections Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Reroutes connectors so that they take the shortest possible path between the shapes they connect. To do this, the RerouteConnections method may detach the ends of a connector and reattach them to different connecting sites on the connected shapes.

Syntax

expression .RerouteConnections

expression A variable that represents a Shape object.

Remarks

This method reroutes all connectors attached to the specified shape; if the specified shape is a connector, it is rerouted.

If this method is applied to a connector, only that connector will be rerouted. If this method is applied to a connected shape, all connectors to that shape will be rerouted.

Example

This example adds two rectangles to myDocument, connects them with a curved connector, and then reroutes the connector so that it takes the shortest possible path between the two rectangles. Note that the RerouteConnections method adjusts the size and position of the connector and determines which connecting sites it attaches to, so the values you initially specify for the ConnectionSite arguments used with the BeginConnect and EndConnect methods are irrelevant.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

Set s = myDocument.Shapes

Set firstRect = s.AddShape(msoShapeRectangle, 100, 50, 200, 100)

Set secondRect = s.AddShape(msoShapeRectangle, 300, 300, 200, 100)

Set newConnector = s _

    .AddConnector(msoConnectorCurve, 0, 0, 100, 100)

With newConnector.ConnectorFormat

    .BeginConnect firstRect, 1

    .EndConnect secondRect, 1

End With

newConnector.RerouteConnections

See also

Concepts

Shape Object

Other resources

Shape Object Members


ChartFormat Members (PowerPoint)

 Copy code hover
[image]

ChartFormat Members (PowerPoint)
Send feedback

Published: July 16, 2012

Provides access to the OfficeArt formatting for chart elements.

Properties

Name | Description
Adjustments | Returns an Adjustments object that contains a collection of adjustment values for the specified Chart Format object.
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
AutoShapeType | Returns or sets the auto shape type of the specified object. Read-write MSOAutoShapeType.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Fill | Returns a FillFormat object for the parent chart element that contains fill formatting properties for the chart element. Read-only.
Glow | Returns the glow formatting properties for the chart element. Read-only GlowFormat.
Line | Returns the line formatting properties for the specified chart element. Read-only LineFormat.
Parent | Returns the parent for the specified object. Read-only Object.
PictureFormat | Returns a PictureFormat object for a specified chart that contains pictures. Read-only.
Shadow | Returns shadow formatting properties for the chart element. Read-only ShadowFormat.
SoftEdge | Returns the soft edge formatting for a shape. Read-only SoftEdgeFormat.
TextFrame2 | Returns the text formatting for the specified chart element. Read-only TextFrame2.
ThreeD | Returns the 3-D-effect formatting properties for the specified chart. Read-only ThreeDFormat.


Application.AutomationSecurity Property (PowerPoint)

 Copy code hover
[image]

Application.AutomationSecurity Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the security mode that Microsoft PowerPoint uses when it opens files programmatically. Read/write.

Syntax

expression .AutomationSecurity

expression A variable that represents an Application object.

Return Value

MsoAutomationSecurity

Remarks

This property is automatically set to msoAutomationSecurityLow when the application is started. Therefore, to avoid breaking solutions that rely on the default setting, you should be careful to reset this property to msoAutomationSecurityLow after programmatically opening a file. Also, to avoid malicious subversion, you should set this property immediately before and after you open a file programmatically .

The value of the DisplayAlerts property does not apply to security warnings. For example, if the user sets the DisplayAlerts property equal to False and the AutomationSecurity property to msoAutomationSecurityByUI, while the user is on Medium security level, there will be security warnings while the macro is running. This allows the macro to trap file open errors, while still showing the security warning if the file succeeds in opening.

The value of the AutomationSecurity property can be one of these MsoAutomationSecurity constants.

Constant | Description
msoAutomationSecurityByUI | Uses the security setting specified in the Trust Center dialog box.
msoAutomationSecurityForceDisable | Disables all macros in all files opened programmatically without showing any security alerts.
msoAutomationSecurityLow | Enables all macros. This is the default value when the application is started.

Example

This example captures the current automation security setting, changes the setting to disable macros, displays the Open dialog box, and after opening the selected presentation, sets the automation security back to its original setting.

VBA Copy code Copy code
Sub Security()

    Dim secAutomation As MsoAutomationSecurity

    secAutomation = Application.AutomationSecurity

    Application.AutomationSecurity = msoAutomationSecurityForceDisable

    Application.FileDialog(msoFileDialogOpen).Show

    Application.AutomationSecurity = secAutomation

End Sub

See also

Concepts

Application Object

Other resources

Application Object Members


PictureFormat Object (PowerPoint)

 Copy code hover
[image]

PictureFormat Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Contains properties and methods that apply to pictures and OLE objects.

Example

Use the PictureFormat property to return a PictureFormat object. The following example sets the brightness, contrast, and color transformation for shape one on myDocument and crops 18 points off the bottom of the shape. For this example to work, shape one must be either a picture or an OLE object.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(1).PictureFormat

    .Brightness = 0.3

    .Contrast = 0.7

    .ColorType = msoPictureGrayScale

    .CropBottom = 18

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

PictureFormat Object Members


Selection.Copy Method (PowerPoint)

 Copy code hover
[image]

Selection.Copy Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Copies the specified object to the Clipboard.

Syntax

expression .Copy

expression A variable that represents a Selection object.

Remarks

Use the Paste method to paste the contents of the Clipboard.

Example

This example copies the selection in window one to the Clipboard and then pastes it into the view in window two. If the Clipboard contents cannot be pasted into the view in window two — for example, if you try to paste a shape into slide sorter view — this example fails.

VBA Copy code Copy code
Windows(1).Selection.Copy

Windows(2).View.Paste

See also

Concepts

Selection Object

Other resources

Selection Object Members


ChartTitle.Caption Property (PowerPoint)

 Copy code hover
[image]

ChartTitle.Caption Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the chart title text. Read/write String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Caption

expression A variable that represents a ChartTitle object.

See also

Concepts

ChartTitle Object

Other resources

ChartTitle Object Members


TextFrame.DeleteText Method (PowerPoint)

 Copy code hover
[image]

TextFrame.DeleteText Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Deletes the text associated with the specified shape.

Syntax

expression .DeleteText

expression A variable that represents a TextFrame object.

Example

If shape two on myDocument contains text, this example deletes the text.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes(2).TextFrame.DeleteText

See also

Concepts

TextFrame Object

Other resources

TextFrame Object Members


Presentation.Password Property (PowerPoint)

 Copy code hover
[image]

Presentation.Password Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the password that must be supplied to open the specified presentation. Read/write.

Syntax

expression .Password

expression A variable that represents a Presentation object.

Return Value

String

Example

This example opens Earnings.ppt, sets a password for it, and then closes the presentation.

VBA Copy code Copy code
Sub SetPassword()

    With Presentations.Open(FileName:="C:\My Documents\Earnings.ppt")

        .Password = complexstrPWD 'global variable

        .Save

        .Close

    End With

End Sub

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


Floor.Select Method (PowerPoint)

 Copy code hover
[image]

Floor.Select Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Selects the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Select

expression A variable that represents a Floor object.

See also

Concepts

Floor Object

Other resources

Floor Object Members


XlBorderWeight Enumeration (PowerPoint)

 Copy code hover
[image]

XlBorderWeight Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the weight of the border around a range.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlHairline | 1 | A hairline border (thinnest border).
xlMedium | -4138 | A medium border.
xlThick | 4 | A thick border (widest border).
xlThin | 2 | A thin border.


RotationEffect.Parent Property (PowerPoint)

 Copy code hover
[image]

RotationEffect.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a RotationEffect object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

RotationEffect Object

Other resources

RotationEffect Object Members


Shape.ParentGroup Property (PowerPoint)

 Copy code hover
[image]

Shape.ParentGroup Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Shape object that represents the common parent shape of a child shape or a range of child shapes.

Syntax

expression .ParentGroup

expression A variable that represents a Shape object.

Return Value

Shape

Example

This example creates two shapes on the first slide in the active presentation and groups those shapes; then using one shape in the group, accesses the parent group and fills all shapes in the parent group with the same fill color. This example assumes that the first slide of the active presentation does not currently contain any shapes. If it does, you will receive an error.

VBA Copy code Copy code
Sub ParentGroup()

    Dim sldNewSlide As Slide

    Dim shpParentGroup As Shape

    'Add two shapes to active document and group

    Set sldNewSlide = ActivePresentation.Slides _

        .Add(Index:=1, Layout:=ppLayoutBlank)

    With sldNewSlide.Shapes

        .AddShape Type:=msoShapeBalloon, Left:=72, _

            Top:=72, Width:=100, Height:=100

        .AddShape Type:=msoShapeOval, Left:=110, _

            Top:=120, Width:=100, Height:=100

        .Range(Array(1, 2)).Group

    End With

    Set shpParentGroup = ActivePresentation.Slides(1).Shapes(1) _

        .GroupItems(1).ParentGroup

    shpParentGroup.Fill.ForeColor.RGB = RGB _

        (Red:=151, Green:=51, Blue:=250)

End Sub

See also

Concepts

Shape Object

Other resources

Shape Object Members


ChartGroup.HasHiLoLines Property (PowerPoint)

 Copy code hover
[image]

ChartGroup.HasHiLoLines Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if the line chart has high-low lines. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .HasHiLoLines

expression A variable that represents a ChartGroup object.

Remarks

This property applies only to line charts.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example enables high-low lines for chart group one of the first chart in the active document and then sets line style, weight, and color. You should run the example on a 2-D line chart that has three series of stock-quote-like data (high-low-close).

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.ChartGroups(1)

            .HasHiLoLines = True

            With .HiLoLines.Border

                .LineStyle = xlThin

                .Weight = xlMedium

                .ColorIndex = 3

            End With

        End With

    End If

End With

See also

Concepts

ChartGroup Object

Other resources

ChartGroup Object Members


PlaceholderFormat.Application Property (PowerPoint)

 Copy code hover
[image]

PlaceholderFormat.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a PlaceholderFormat object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

PlaceholderFormat Object

Other resources

PlaceholderFormat Object Members


ParagraphFormat.LineRuleBefore Property (PowerPoint)

 Copy code hover
[image]

ParagraphFormat.LineRuleBefore Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Determines whether line spacing before the first line in each paragraph is set to a specific number of points or lines. Read/write.

Syntax

expression .LineRuleBefore

expression A variable that represents a ParagraphFormat object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | Line spacing before the first line in each paragraph is set to a specific number of points.
msoTrue | Line spacing before the first line in each paragraph is set to a specific number of lines.

Example

This example displays a message box that shows the setting for space before paragraphs for text in shape two on slide one in the active presentation.

VBA Copy code Copy code
With Application.ActivePresentation.Slides(1).Shapes(2).TextFrame

    With .TextRange.ParagraphFormat

        sb = .SpaceBefore

        If .LineRuleBefore Then

            sbUnits = " lines"

        Else

            sbUnits = " points"

        End If

    End With

End With

MsgBox "Current spacing before paragraphs: " & sb & sbUnits

See also

Concepts

ParagraphFormat Object

Other resources

ParagraphFormat Object Members


Selection Methods (PowerPoint)

 Copy code hover
[image]

Selection Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Copy | Copies the specified object to the Clipboard.
Cut | Deletes the specified object and places it on the Clipboard.
Delete | Deletes the specified Selection object.
Unselect | Cancels the current selection.


DisplayUnitLabel.Top Property (PowerPoint)

 Copy code hover
[image]

DisplayUnitLabel.Top Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the distance, in points, from the top edge of the object to the top of the first row (on a worksheet) or the top of the chart area (on a chart). Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Top

expression A variable that represents a DisplayUnitLabel object.

See also

Concepts

DisplayUnitLabel Object

Other resources

DisplayUnitLabel Object Members


BulletFormat.Application Property (PowerPoint)

 Copy code hover
[image]

BulletFormat.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a BulletFormat object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

BulletFormat Object

Other resources

BulletFormat Object Members


Slide.Parent Property (PowerPoint)

 Copy code hover
[image]

Slide.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a Slide object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

Slide Object

Other resources

Slide Object Members


DataLabel.Creator Property (PowerPoint)

 Copy code hover
[image]

DataLabel.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents a DataLabel object.

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


Slide.Cut Method (PowerPoint)

 Copy code hover
[image]

Slide.Cut Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the specified object and places it on the Clipboard.

Syntax

expression .Cut

expression A variable that represents a Slide object.

Example

This example deletes slide one from the active presentation and places a copy of it on the Clipboard.

VBA Copy code Copy code
ActivePresentation.Slides(1).Cut

See also

Concepts

Slide Object

Other resources

Slide Object Members


Sequences.Count Property (PowerPoint)

 Copy code hover
[image]

Sequences.Count Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a Sequences object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

Sequences Object

Other resources

Sequences Object Members


DisplayUnitLabel Methods (PowerPoint)

 Copy code hover
[image]

DisplayUnitLabel Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Delete | Deletes the object.
Select | Selects the object.


View Members (PowerPoint)

 Copy code hover
[image]

View Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents the current editing view in the specified document window.

Methods

Name | Description
GotoSlide | Switches to the specified slide.
Paste | Pastes the contents of the Clipboard into the active view. Attempting to paste an object into a view that won't accept it causes an error.
PasteSpecial | Pastes the current contents of the Clipboard into the view represented by the View object.
Player | Allows access to playback controls for the associated view in the current window.
PrintOut | Prints the specified presentation.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
DisplaySlideMiniature | Determines if and when the slide miniature window is displayed automatically. Read/write.
MediaControlsHeight | Returns the height, in points, of the media controls. Read-only.
MediaControlsLeft | Returns the distance, in points, from the left edge of the media control bounding box to the left edge of the slide. Read-only.
MediaControlsTop | Returns the distance, in points, from the top edge of the media control bounding box to the top edge of the slide. Read-only.
MediaControlsVisible | Indicates whether the media controls are currently visible. Read-only.
MediaControlsWidth | Returns the width, in points, of the media control bounding box. Read-only.
Parent | Returns the parent object for the specified object.
PrintOptions | Returns a PrintOptions object that represents print options that are saved with the specified presentation. Read-only.
Slide | Returns or sets a Slide object that represents the slide that's currently displayed in the specified document window view. Read/write.
Type | Represents the type of view. Read-only.
Zoom | Returns or sets the zoom setting of the specified view as a percentage of normal size. Read/write.
ZoomToFit | Determines whether the view is zoomed to fit the dimensions of the document window every time the document window is resized. Read/write.


PublishObject.SourceType Property (PowerPoint)

 Copy code hover
[image]

PublishObject.SourceType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the source type of the presentation to be published to HTML. Read/write.

Syntax

expression .SourceType

expression A variable that represents a PublishObject object.

Return Value

PpPublishSourceType

Remarks

The value of the SourceType property can be one of these PpPublishSourceType constants.

ppPublishAll

ppPublishNamedSlideShow

ppPublishSlideRange

Use the ppPublishNamedSlideShow value to publish a custom slide show, specifying the name of the custom slide show by using the SlideShowName property.

Example

This example publishes the specified slide range (slides three through five) of the active presentation to HTML. It names the published presentation Mallard.htm.

VBA Copy code Copy code
With ActivePresentation.PublishObjects(1)

    .FileName = "C:\Test\Mallard.htm"

    .SourceType = ppPublishSlideRange

    .RangeStart = 3

    .RangeEnd = 5

    .Publish

End With

See also

Concepts

PublishObject Object

Other resources

PublishObject Object Members


Chart.ShowLegendFieldButtons Property (PowerPoint)

 Copy code hover
[image]

Chart.ShowLegendFieldButtons Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a value that indicates whether to display legend field buttons on a PivotChart. Read/write.

Syntax

expression .ShowLegendFieldButtons

expression A variable that represents a Chart object.

Return Value

Boolean

Remarks

This member is part of the shared chart object model infrastructure between Microsoft Word, Microsoft Excel, and Microsoft PowerPoint and is not meant to be called directly from your code. Reading or setting this property causes a run-time error. In PowerPoint 2013, you cannot create a PivotChart, and copying or pasting a valid PivotChart from Microsoft Excel to a Microsoft PowerPoint presentation will convert the PivotChart to a Chart.

See also

Concepts

Chart Object

Other resources

Chart Object Members


Design Methods (PowerPoint)

 Copy code hover
[image]

Design Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Delete | Deletes the specified Design object.
MoveTo | Moves the specified object to a specific location within the same collection, renumbering all other items in the collection appropriately.


ShapeRange.Connector Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.Connector Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the specified shape is a connector. Read-only.

Syntax

expression .Connector

expression A variable that represents a ShapeRange object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified shape is not a connector.
msoTrue | The specified shape is a connector.

Example

This example deletes all connectors on myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    For i = .Count To 1 Step -1

        With .Item(i)

            If .Connector Then .Delete

        End With

    Next

End With

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


AxisTitle.Select Method (PowerPoint)

 Copy code hover
[image]

AxisTitle.Select Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Selects the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Select

expression A variable that represents an AxisTitle object.

See also

Concepts

AxisTitle Object

Other resources

AxisTitle Object Members


PrintRange Properties (PowerPoint)

 Copy code hover
[image]

PrintRange Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
End | Returns the number of the last slide in the specified print range. Read-only.
Parent | Returns the parent object for the specified object.
Start | Returns the number of the first slide in the range of slides to be printed. Read-only.


MediaBookmarks Methods (PowerPoint)

 Copy code hover
[image]

MediaBookmarks Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Add | Adds a new MediaBookmark at the specified time and using the specified name.
Item | Returns the specified MediaBookmark.


ColorFormat.Brightness Property (PowerPoint)

 Copy code hover
[image]

ColorFormat.Brightness Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the brightness of the specified picture or OLE object. The value for this property must be a number from 0.0 (dimmest) to 1.0 (brightest). Read/write Single.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Brightness

expression A variable that represents a ColorFormat object.

Example

The following example sets the brightness for shape one on myDocument. Shape one must be either a picture or an OLE object.

VBA Copy code Copy code
Set myDocument = Worksheets(1)

myDocument.Shapes(1).PictureFormat.Brightness = 0.3

See also

Concepts

ColorFormat Object

Other resources

ColorFormat Object Members


Application.OperatingSystem Property (PowerPoint)

 Copy code hover
[image]

Application.OperatingSystem Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the name of the operating system. Read-only.

Syntax

expression .OperatingSystem

expression A variable that represents an Application object.

Return Value

String

Example

This example tests the OperatingSystem property to see whether Microsoft PowerPoint is running with a 32-bit version of Microsoft Windows.

VBA Copy code Copy code
os = Application.OperatingSystem

If InStr(os, "Windows (32-bit)") <> 0 Then

    MsgBox "Running a 32-bit version of Microsoft Windows"

End If

See also

Concepts

Application Object

Other resources

Application Object Members


ChartGroup.DropLines Property (PowerPoint)

 Copy code hover
[image]

ChartGroup.DropLines Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the drop lines for a series on a line chart or area chart. Read-only DropLines.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .DropLines

expression A variable that represents a ChartGroup object.

Remarks

This property applies only to line charts or area charts.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example enables drop lines for chart group one of the first chart in the active document and then sets their line style, weight, and color. You should run the example on a 2-D line chart that has one series.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With Chart.ChartGroups(1)

            .HasDropLines = True

            With .DropLines.Border

                .LineStyle = xlThin

                .Weight = xlMedium

                .ColorIndex = 3

            End With

        End With

    End If

End With

See also

Concepts

ChartGroup Object

Other resources

ChartGroup Object Members


Design Properties (PowerPoint)

 Copy code hover
[image]

Design Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Index | Returns a Long that represents the index number for an animation effect or design. Read-only.
Name | Returns or sets the name of the specified object. Read/write.
Parent | Returns the parent object for the specified object.
Preserved | Represents whether a design master is preserved from changes. Read/write.
SlideMaster | Returns a Master object that represents the slide master. Read-only.


Hyperlink.Delete Method (PowerPoint)

 Copy code hover
[image]

Hyperlink.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the specified Hyperlink object.

Syntax

expression .Delete

expression A variable that represents a Hyperlink object.

See also

Concepts

Hyperlink Object

Other resources

Hyperlink Object Members


Guides.Count Property (PowerPoint)

 Copy code hover
[image]

Guides.Count Property (PowerPoint)
Send feedback

Returns the number of objects in the specified collection. Read-only.

Version information

Version Added: PowerPoint 2013

Syntax

expression .Count

expression A variable that represents a Guides object.

Property value

INT32


LegendEntry.LegendKey Property (PowerPoint)

 Copy code hover
[image]

LegendEntry.LegendKey Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the legend key that is associated with the entry. Read-only LegendKey.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .LegendKey

expression A variable that represents a LegendEntry object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the legend key for legend entry one on the first chart in the active document to be a triangle. You should run the example on a 2-D line chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.Legend.LegendEntries(1).LegendKey _

            .MarkerStyle = xlMarkerStyleTriangle

    End If

End With

See also

Concepts

LegendEntry Object

Other resources

LegendEntry Object Members


Presentation.Application Property (PowerPoint)

 Copy code hover
[image]

Presentation.Application Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a Presentation object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


ChartGroup Properties (PowerPoint)

 Copy code hover
[image]

ChartGroup Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
AxisGroup | Returns the type of axis group. Read/write XlAxisGroup.
BubbleScale | Returns or sets the scale factor for bubbles in the specified chart group. Read/write Long.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
DoughnutHoleSize | Returns or sets the size of the hole in a doughnut chart group. Read/write Long.
DownBars | Returns the down bars on a line chart. Read-only DownBars.
DropLines | Returns the drop lines for a series on a line chart or area chart. Read-only DropLines.
FirstSliceAngle | Returns or sets the angle, in degrees (clockwise from vertical), of the first pie-chart or doughnut-chart slice. Read/write Long.
GapWidth | For bar and column charts, returns or sets the space, as a percentage of the bar or column width, between bar or column clusters. For pie-of-pie and bar-of-pie charts, returns or sets the space between the primary and secondary sections of the chart. Read/write Long.
Has3DShading | True if a chart group has three-dimensional shading. Read/write Boolean.
HasDropLines | True if the line chart or area chart has drop lines. Read/write Boolean.
HasHiLoLines | True if the line chart has high-low lines. Read/write Boolean.
HasRadarAxisLabels | True if a radar chart has axis labels. Read/write Boolean.
HasSeriesLines | True if a stacked column chart or bar chart has series lines or if a pie-of-pie chart or bar-of-pie chart has connector lines between the two sections. Read/write Boolean.
HasUpDownBars | True if a line chart has up and down bars. Read/write Boolean.
HiLoLines | Returns the high-low lines for a series on a line chart. Read-only HiLoLines.
Index | Returns the index number of the object within the collection of similar objects. Read-only Long.
Overlap | Specifies how bars and columns are positioned. Read/write Long.
Parent | Returns the parent for the specified object. Read-only Object.
RadarAxisLabels | Returns the radar axis labels for the specified chart group. Read-only TickLabels.
SecondPlotSize | Returns or sets the size, as a percentage of the primary pie, of the secondary section of either a pie-of-pie chart or a bar-of-pie chart. Read/write Long.
SeriesLines | Returns the series lines for a 2-D stacked bar, 2-D stacked column, pie-of-pie, or bar-of-pie chart. Read-only SeriesLines.
ShowNegativeBubbles | True if negative bubbles are shown for the chart group. Read/write Boolean.
SizeRepresents | Returns or sets what the bubble size represents on a bubble chart. Read/write Long.
SplitType | Returns or sets the way the two sections of either a pie-of-pie chart or a bar-of-pie chart are split. Read/write XlChartSplitType.
SplitValue | Returns or sets the threshold value separating the two sections of either a pie-of-pie chart or a bar-of-pie chart. Read/write Variant.
UpBars | Returns the up bars on a line chart. Read-only UpBars.
VaryByCategories | True if Microsoft Word assigns a different color or pattern to each data marker. Read/write Boolean.


LineFormat.Parent Property (PowerPoint)

 Copy code hover
[image]

LineFormat.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a LineFormat object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

LineFormat Object

Other resources

LineFormat Object Members


Chart.HasDataTable Property (PowerPoint)

 Copy code hover
[image]

Chart.HasDataTable Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

True if the chart has a data table. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .HasDataTable

expression A variable that represents a Chart object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example causes the embedded chart data table to be displayed with an outline border and no cell borders.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart

            .HasDataTable = True

            With .DataTable

                .HasBorderHorizontal = False

                .HasBorderVertical = False

                .HasBorderOutline = True

            End With

        End With

    End If

End With

See also

Concepts

Chart Object

Other resources

Chart Object Members


Floor.Format Property (PowerPoint)

 Copy code hover
[image]

Floor.Format Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Format

expression A variable that represents a Floor object.

See also

Concepts

Floor Object

Other resources

Floor Object Members


MediaFormat.AudioCompressionType Property (PowerPoint)

 Copy code hover
[image]

MediaFormat.AudioCompressionType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the audio compression format. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .AudioCompressionType

expression An expression that returns a MediaFormat object.

Return Value

String

See also

Concepts

MediaFormat Object

Other resources

MediaFormat Object Members


AnimationSettings.Animate Property (PowerPoint)

 Copy code hover
[image]

AnimationSettings.Animate Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the specified shape is animated during a slide show. Read/write.

Syntax

expression .Animate

expression A variable that represents an AnimationSettings object.

Return Value

MsoTriState

Remarks

For a shape to be animated, the TextLevelEffect property of the AnimationSettings object for the shape must be set to something other than ppAnimateLevelNone, and either the Animate property must be set to True, or the EntryEffect property must be set to a constant other than ppEffectNone.

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

Constant | Description
msoFalse | The specified shape is not animated during a slide show.
msoTrue | The specified shape is animated during a slide show.

Example

This example specifies that the title on slide two in the active presentation appear dimmed after the title is built. If the title is the last or only shape to be built on slide two, the text won't be dimmed.

VBA Copy code Copy code
With ActivePresentation.Slides(2).Shapes.Title.AnimationSettings

    .TextLevelEffect = ppAnimateByAllLevels

    .AfterEffect = ppAfterEffectDim

    .Animate = msoTrue

End With

See also

Concepts

AnimationSettings Object

Other resources

AnimationSettings Object Members


ConnectorFormat.BeginConnectedShape Property (PowerPoint)

 Copy code hover
[image]

ConnectorFormat.BeginConnectedShape Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Shape object that represents the shape that the beginning of the specified connector is attached to. Read-only.

Syntax

expression .BeginConnectedShape

expression A variable that represents a ConnectorFormat object.

Return Value

Shape

Remarks

If the beginning of the specified connector isn't attached to a shape, this property generates an error.

Example

This example assumes that the first slide in the active presentation already contains two shapes attached by a connector named "Conn1To2." The code adds a rectangle and a connector to the first slide. The beginning of the new connector will be attached to the same connection site as the beginning of the connector named "Conn1To2," and the end of the new connector will be attached to connection site one on the new rectangle.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    Set r3 = .AddShape(msoShapeRectangle, 450, 190, 200, 100)

    .AddConnector(msoConnectorCurve, 0, 0, 10, 10) _

        .Name = "Conn1To3"

    With .Item("Conn1To2").ConnectorFormat

        beginConnSite1 = .BeginConnectionSite

        Set beginConnShape1 = .BeginConnectedShape

    End With

    With .Item("Conn1To3").ConnectorFormat

        .BeginConnect beginConnShape1, beginConnSite1

        .EndConnect r3, 1

    End With

End With

See also

Concepts

ConnectorFormat Object

Other resources

ConnectorFormat Object Members


Sequences Object (PowerPoint)

 Copy code hover
[image]

Sequences Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a collection of Sequence objects. Use a Sequence object to add, find, modify, and clone animation effects.

Example

Use the InteractiveSequences property of the TimeLine object to return a Sequences collection. Use the Add method to add an interactive animation sequence. The following example adds two shapes on the first slide of the active presentation and sets interactive effect for the star shape so that when you click the bevel shape, the star shape is be animated.

VBA Copy code Copy code
Sub AddNewSequence()

    Dim shp1 As Shape

    Dim shp2 As Shape

    Dim interEffect As Effect

    Set shp1 = ActivePresentation.Slides(1).Shapes.AddShape _

        (Type:=msoShape32pointStar, Left:=100, _

        Top:=100, Width:=200, Height:=200)

    Set shp2 = ActivePresentation.Slides(1).Shapes.AddShape _

        (Type:=msoShapeBevel, Left:=400, _

        Top:=200, Width:=150, Height:=100)

    With ActivePresentation.Slides(1).TimeLine.InteractiveSequences.Add(1)

        Set interEffect = .AddEffect(shp2, msoAnimEffectBlinds, _

            trigger:=msoAnimTriggerOnShapeClick)

        interEffect.Shape = shp1

    End With

End Sub

See also

Concepts

PowerPoint Object Model Reference

Other resources

Sequences Object Members


DataLabel.Left Property (PowerPoint)

 Copy code hover
[image]

DataLabel.Left Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the distance, in points, from the left edge of the object to the left edge of the chart area. Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Left

expression A variable that represents a DataLabel object.

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


LinkFormat Members (PowerPoint)

 Copy code hover
[image]

LinkFormat Members (PowerPoint)
Send feedback

Published: July 16, 2012

Contains properties and methods that apply to linked OLE objects, linked pictures, and IIRC media objects.

Methods

Name | Description
BreakLink | Breaks the link between the source file and the specified OLE object, picture, or linked field.
Update | Updates the specified linked OLE object.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
AutoUpdate | Returns or sets the way the link will be updated. Read/write.
Parent | Returns the parent object for the specified object.
SourceFullName | Returns or sets the name and path of the source file for the linked OLE object. Read/write.


DataLabels Members (PowerPoint)

 Copy code hover
[image]

DataLabels Members (PowerPoint)
Send feedback

Published: July 16, 2012

A collection of all the DataLabel objects for the specified series.

Methods

Name | Description
Delete | Deletes the object.
Item | Returns a single object from a collection.
Propagate | Propagates the contents and formatting of the specified data label to all the other data labels in the series.
Select | Selects the object.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
AutoText | True if all objects in the collection automatically generate appropriate text based on context. Read/write Boolean.
Count | Returns the number of objects in the collection. Read-only Long.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
HorizontalAlignment | Returns or sets the horizontal alignment for the specified object. Read/write Variant.
Name | Returns the name of the object. Read-only String.
NumberFormat | Returns or sets the format code for the object. Read/write String.
NumberFormatLinked | True if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). Read/write Boolean.
NumberFormatLocal | Returns or sets the format code for the object as a string in the language of the user. Read/write Variant.
Orientation | Returns or sets the text orientation. Read/write Long.
Parent | Returns the parent for the specified object. Read-only Object.
Position | Returns a value from the XlDataLabelPosition enumeration indicating the position of the data labels in a chart. Read/write.
ReadingOrder | Returns or sets an XlReadingOrder constant that represents the reading order for the specified object. Read/write Long.
Separator | Sets or returns the separator for the data labels on a chart. Read/write Variant.
Shadow | Returns or sets a value that indicates whether the object has a shadow. Read/write Boolean.
ShowBubbleSize | True to show the bubble size for the data labels on a chart. False to hide the bubble size. Read/write Boolean.
ShowCategoryName | True to display the category name for the data labels on a chart. False to hide the name. Read/write Boolean.
ShowLegendKey | True if the data label legend key is visible. Read/write Boolean.
ShowPercentage | True to display the percentage value for the data labels on a chart. False to hide the value. Read/write Boolean.
ShowRange | Set to True to display the Value From Cells range field in all the chart data labels for a specified chart. Set to False to hide that field. Read/write Boolean.
ShowSeriesName | True to show the series name for the data labels on a chart. False to hide the name. Read/write Boolean.
ShowValue | True to display the data label values for a specified chart. False to hide the values. Read/write Boolean.
VerticalAlignment | Returns or sets the vertical alignment of the specified object. Read/write Variant.


FillFormat.Visible Property (PowerPoint)

 Copy code hover
[image]

FillFormat.Visible Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the visibility of the specified object or the formatting applied to the specified object. Read/write.

Syntax

expression .Visible

expression A variable that represents a FillFormat object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified object or object formatting is not visible.
msoTrue | The specified object or object formatting is visible.

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


BulletFormat.UseTextColor Property (PowerPoint)

 Copy code hover
[image]

BulletFormat.UseTextColor Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the specified bullets are set to the color of the first text character in the paragraph. Read/write.

Syntax

expression .UseTextColor

expression A variable that represents an BulletFormat object.

Return Value

MsoTriState

Remarks

You cannot explicitly set this property to msoFalse. Setting the bullet format color (using the Color property of the Font object) sets this property to msoFalse. When UseTextColor is msoFalse, you can set it to msoTrue to reset the bullet format to the default color.

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

Constant | Description
msoFalse | The specified bullets are set to any other color.
msoTrue | The specified bullets are set to the color of the first text character in the paragraph.

Example

This example resets bullets in shape two on slide one in the active presentation to their default character, font, and color.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(2)
    With .TextFrame.TextRange.ParagraphFormat.Bullet
        .RelativeSize = 1
        .UseTextColor = msoTrue
        .UseTextFont = msoTrue
        .Character = 8226
    End With
End With

See also

Concepts

BulletFormat Object

Other resources

BulletFormat Object Members


SlideRange.Name Property (PowerPoint)

 Copy code hover
[image]

SlideRange.Name Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When a slide is inserted into a presentation, Microsoft PowerPoint automatically assigns it a name in the form Sliden, where n is an integer that represents the order in which the slide was created in the presentation. For example, the first slide inserted into a presentation is automatically named Slide1. If you copy a slide from one presentation to another, the slide loses the name it had in the first presentation and is automatically assigned a new name in the second presentation. A slide range must contain exactly one slide. Read/write.

Syntax

expression .Name

expression A variable that represents a SlideRange object.

Return Value

String

Remarks

You can use the object's name in conjunction with the Item method to return a reference to the object if the Item method for the collection that contains the object takes a Variant argument. For example, if the value of the Name property for a shape is Rectangle 2, then .Shapes("Rectangle 2") will return a reference to that shape.

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


Shapes Methods (PowerPoint)

 Copy code hover
[image]

Shapes Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
AddCallout | Creates a borderless line callout. Returns a Shape object that represents the new callout.
AddChart2 | Adds a chart to the document. Returns a Shape object that represents a chart and adds it to the specified collection.
AddConnector | Creates a connector. Returns a Shape object that represents the new connector. When a connector is added, it is not connected to anything. Use the BeginConnect and EndConnect methods to attach the beginning and end of a connector to other shapes in the document.
AddCurve | Creates a Bézier curve. Returns a Shape object that represents the new curve.
AddLabel | Creates a label. Returns a Shape object that represents the new label.
AddLine | Creates a line. Returns a Shape object that represents the new line.
AddMediaObject2 | Adds a new media object.
AddMediaObjectFromEmbedTag | Adds a media object from an embedded tag to a Shapes object.
AddOLEObject | Creates an OLE object. Returns a Shape object that represents the new OLE object.
AddPicture | Creates a picture from an existing file. Returns a Shape object that represents the new picture.
AddPlaceholder | Restores a previously deleted placeholder on a slide. Returns a Shape object that represents the restored placeholder.
AddPolyline | Creates an open polyline or a closed polygon drawing. Returns a Shape object that represents the new polyline or polygon.
AddShape | Creates an AutoShape. Returns a Shape object that represents the new AutoShape.
AddSmartArt | Adds a SmartArt diagram to the Shapes object.
AddTable | Adds a table shape to a slide.
AddTextbox | Creates a text box. Returns a Shape object that represents the new text box.
AddTextEffect | Creates a WordArt object. Returns a Shape object that represents the new WordArt object.
AddTitle | Restores a previously deleted title placeholder to a slide. Returns a Shape object that represents the restored title.
BuildFreeform | Builds a freeform object. Returns a FreeformBuilder object that represents the freeform as it is being built.
Item | Returns a single Shape object from the specified Shapes collection.
Paste | Pastes the shapes, slides, or text on the Clipboard into the specified Shapes collection, at the top of the z-order. Each pasted object becomes a member of the specified Shapes collection. If the Clipboard contains entire slides, the slides will be pasted as shapes that contain the images of the slides. If the Clipboard contains a text range, the text will be pasted into a newly created TextFrame shape. Returns a ShapeRange object that represents the pasted objects.
PasteSpecial | Pastes the contents of the Clipboard, using a special format.
Range | Returns a ShapeRange object that represents a subset of the shapes in a Shapes collection.
SelectAll | Selects all the shapes in a Shapes collection.


Master.CustomLayouts Property (PowerPoint)

 Copy code hover
[image]

Master.CustomLayouts Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a CustomLayouts object that represents the custom layouts associated with the presentation design of the specified Master object. Read-only.

Syntax

expression .CustomLayouts

expression A variable that represents a Master object.

Return Value

CustomLayouts

See also

Concepts

Master Object

Other resources

Master Object Members


Chart Properties (PowerPoint)

 Copy code hover
[image]

Chart Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
AlternativeText | Returns or sets the alternative text associated with a shape in a Web presentation. Read/write.
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
AutoScaling | True if Microsoft Word scales a 3-D chart so that it is closer in size to the equivalent 2-D chart. The RightAngleAxes property must be True. Read/write Boolean.
BackWall | Returns an object that allows the user to individually format the back wall of a 3-D chart. Read-only Walls.
BarShape | Returns or sets the shape used for every series in a 3-D bar or column chart. Read/write XlBarShape.
CategoryLabelLevel | Returns or sets an XlCategoryLabel constant that specifies the source level of the chart category labels. Read-write.
ChartArea | Returns the complete chart area for the chart. Read-only ChartArea.
ChartColor | Returns or sets an integer that represents the color scheme for the chart. Read-write.
ChartData | Returns information about the linked or embedded data associated with a chart. Read-only ChartData.
ChartStyle | Returns or sets the chart style for the chart. Read/write Variant.
ChartTitle | Returns the title of the specified chart. Read-only ChartTitle.
ChartType | Returns or sets the chart type. Read/write XlChartType.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
DataTable | Returns the chart data table. Read-only DataTable.
DepthPercent | Returns or sets the depth of a 3-D chart as a percentage of the chart width (between 20 and 2000 percent). Read/write Long.
DisplayBlanksAs | Returns or sets the way that blank cells are plotted on a chart. Can be one of the XlDisplayBlanksAs constants. Read/write Long.
Elevation | Returns or sets the elevation, in degrees, of the 3-D chart view. Read/write Long.
Floor | Returns the floor of the 3-D chart. Read-only Floor.
Format | Returns the ChartFormat object. Read-only.
GapDepth | Returns or sets the distance, as a percentage of the marker width, between the data series in a 3-D chart. Read/write Long.
HasAxis | Returns or sets which axes exist on the chart. Read/write Variant.
HasDataTable | True if the chart has a data table. Read/write Boolean.
HasLegend | True if the chart has a legend. Read/write Boolean.
HasTitle | True if the axis or chart has a visible title. Read/write Boolean.
HeightPercent | Returns or sets the height of a 3-D chart as a percentage of the chart width (from 5 through 500 percent). Read/write Long.
Legend | Returns the legend for the chart. Read-only Legend.
Name | Read/write
Parent | Returns the parent for the specified object. Read-only Object.
Perspective | Returns or sets the perspective for the 3-D chart view. Read/write Long.
PlotArea | Returns the plot area of a chart. Read-only PlotArea.
PlotBy | Returns or sets the way columns or rows are used as data series on the chart. Read/write Long.
PlotVisibleOnly | True if only visible cells are plotted. False if both visible and hidden cells are plotted. Read/write Boolean.
RightAngleAxes | True if the chart axes are at right angles, independent of chart rotation or elevation. Read/write Boolean.
Rotation | Returns or sets the rotation, in degrees, of the 3-D chart view (the rotation of the plot area around the z-axis). Read/write Variant.
SeriesNameLevel | Returns or sets an XlSeriesNameLevel constant that specifies the source level of the series names. Read-write.
Shapes | Returns a collection that represents all the shapes on the chart sheet. Read-only Shapes.
ShowAllFieldButtons | Returns or sets a value that indicates whether to display all field buttons on a PivotChart. Read/write.
ShowAxisFieldButtons | Returns or sets a value that indicates whether to display axis field buttons on a PivotChart. Read/write
ShowDataLabelsOverMaximum | Returns or sets a value that indicates whether to show the data labels when the value is greater than the maximum value on the value axis. Read/write Boolean.
ShowLegendFieldButtons | Returns or sets a value that indicates whether to display legend field buttons on a PivotChart. Read/write.
ShowReportFilterFieldButtons | Returns or sets a value that indicates whether to display the report filter field buttons on a PivotChart. Read/write.
ShowValueFieldButtons | Returns or sets a value that indicates whether to display the value field buttons on a PivotChart. Read/write.
SideWall | Returns a Walls object that allows the user to individually format the side wall of a 3-D chart. Read-only.
Title | Gets or sets a String that represents the title of the chart. Read/write.
Walls | Returns the walls of the 3-D chart. Read-only Walls.


ActionSetting.Hyperlink Property (PowerPoint)

 Copy code hover
[image]

ActionSetting.Hyperlink Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Hyperlink object that represents the hyperlink for the specified shape. Read-only.

Syntax

expression .Hyperlink

expression A variable that represents a ActionSetting object.

Return Value

Hyperlink

Remarks

For the hyperlink to be active during a slide show, the Action property must be set to ppActionHyperlink.

Example

This example sets shape one on slide one in the active presentation to jump to the Microsoft Web site when the shape is clicked during a slide show.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(1) _

        .ActionSettings(ppMouseClick)

    .Action = ppActionHyperlink

    .Hyperlink.Address = "http://www.microsoft.com/"

End With

See also

Concepts

ActionSetting Object

Other resources

ActionSetting Object Members


DataTable.Delete Method (PowerPoint)

 Copy code hover
[image]

DataTable.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Delete

expression A variable that represents a DataTable object.

See also

Concepts

DataTable Object

Other resources

DataTable Object Members


RulerLevel.FirstMargin Property (PowerPoint)

 Copy code hover
[image]

RulerLevel.FirstMargin Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the first-line indent for the specified outline level, in points. Read/write.

Syntax

expression .FirstMargin

expression A variable that represents a RulerLevel object.

Return Value

Single

Remarks

If a paragraph begins with a bullet, the bullet position is determined by the FirstMargin property, and the position of the first text character in the paragraph is determined by the LeftMargin property.

Note Note

The RulerLevels collection contains five RulerLevel objects, each of which corresponds to one of the possible outline levels. The FirstMargin property value for the RulerLevel object that corresponds to the first outline level has a valid range of (-9.0 to 4095.875). The valid range for the FirstMargin property values for the RulerLevel objects that correspond to the second through the fifth outline levels are determined as follows:

  • The maximum value is always 4095.875.

  • The minimum value is the maximum assigned value between the FirstMargin property and LeftMargin property of the previous level plus 9.

You can use the following equations to determine the minimum value for the FirstMargin property. Index, the index number of the RulerLevel object, indicates the object's corresponding outline level. To determine the minimum FirstMargin property values for the RulerLevel objects that correspond to the second through the fifth outline levels, substitute 2, 3, 4, or 5 for the index placeholder.

Minimum(RulerLevel(index).FirstMargin) = Maximum(RulerLevel(index -1).FirstMargin, RulerLevel(index -1).LeftMargin) + 9

Minimum (RulerLevel(index).LeftMargin) = Maximum(RulerLevel(index -1).FirstMargin, RulerLevel(index -1).LeftMargin) + 9

Example

This example sets the first-line indent and hanging indent for outline level one in body text on the slide master for the active presentation.

VBA Copy code Copy code
With Application.ActivePresentation _

        .SlideMaster.TextStyles(ppBodyStyle)

    With .Ruler.Levels(1)

        .FirstMargin = 9

        .LeftMargin = 54

    End With

End With

See also

Concepts

RulerLevel Object

Other resources

RulerLevel Object Members


CustomLayouts.Count Property (PowerPoint)

 Copy code hover
[image]

CustomLayouts.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a CustomLayouts object.

Return Value

Long

See also

Concepts

CustomLayouts Object

Other resources

CustomLayouts Object Members


DataTable Properties (PowerPoint)

 Copy code hover
[image]

DataTable Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Border | Returns the border of the object. Read-only ChartBorder.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Font | Returns the font of the specified object. Read-only ChartFont.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
HasBorderHorizontal | True if the chart data table has horizontal cell borders. Read/write Boolean.
HasBorderOutline | True if the chart data table has outline borders. Read/write Boolean.
HasBorderVertical | True if the chart data table has vertical cell borders. Read/write Boolean.
Parent | Returns the parent for the specified object. Read-only Object.
ShowLegendKey | True if the data label legend key is visible. Read/write Boolean.


DataLabel Properties (PowerPoint)

 Copy code hover
[image]

DataLabel Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
AutoText | True if the object automatically generates appropriate text based on context. Read/write Boolean.
Caption | Returns or sets the data label text. Read/write String.
Characters | Returns a ChartCharacters object that represents a range of characters within the object text. You can use the ChartCharacters object to format characters within a text string.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Formula | Returns or sets the object's formula in A1-style notation. Read/write.
FormulaLocal | Returns or sets the formula for the object, using A1-style references in the language of the user. Read/write String.
FormulaR1C1 | Returns or sets the formula for the object, using R1C1-style notation in the language of the macro. Read/write String.
FormulaR1C1Local | Returns or sets the formula for the object, using R1C1-style notation in the language of the user. Read/write String.
Height | Returns the height, in points, of the object. Read-only.
HorizontalAlignment | Returns or sets the horizontal alignment for the specified object. Read/write Variant.
Left | Returns or sets the distance, in points, from the left edge of the object to the left edge of the chart area. Read/write Double.
Name | Returns the name of the object. Read-only String.
NumberFormat | Returns or sets the format code for the object. Read/write String.
NumberFormatLinked | True if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). Read/write Boolean.
NumberFormatLocal | Returns or sets the format code for the object as a string in the language of the user. Read/write Variant.
Orientation | Returns or sets the text orientation. Read/write Long.
Parent | Returns the parent for the specified object. Read-only Object.
Position | Returns or sets the position of the data label. Read/write XlDataLabelPosition.
ReadingOrder | Returns or sets an XlReadingOrder constant that represents the reading order for the specified object. Read/write Long.
Separator | Returns or sets the separator used for the data labels on a chart. Read/write Variant.
Shadow | Returns or sets a value that indicates whether the object has a shadow. Read/write Boolean.
ShowBubbleSize | True to show the bubble size for the data labels on a chart. False to hide the bubble size. Read/write Boolean.
ShowCategoryName | True to display the category name for the data labels on a chart. False to hide the category name. Read/write Boolean.
ShowLegendKey | True if the data label legend key is visible. Read/write Boolean.
ShowPercentage | True to display the percentage value for the data labels on a chart. False to hide the value. Read/write Boolean.
ShowRange | Set to True to display the Value From Cells range field for the specified chart data label. Set to False to hide that field. Read/write Boolean.
ShowSeriesName | True to show the series name for the data labels on a chart. False to hide the series name. Read/write Boolean.
ShowValue | True to display a specified chart's data label values. False to hide the values. Read/write Boolean.
Text | Returns or sets the text for the specified object. Read/write String.
Top | Returns or sets the distance, in points, from the top edge of the object to the top of the first row (on a worksheet) or the top of the chart area (on a chart). Read/write Double.
VerticalAlignment | Returns or sets the vertical alignment of the specified object. Read/write Variant.
Width | Returns the width, in points, of the object. Read-only.


HeaderFooter.Application Property (PowerPoint)

 Copy code hover
[image]

HeaderFooter.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a HeaderFooter object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

HeaderFooter Object

Other resources

HeaderFooter Object Members


ShapeRange.PickupAnimation Method (PowerPoint)

 Copy code hover
[image]

ShapeRange.PickupAnimation Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Picks up all animation from the ShapeRange object.

Syntax

expression .PickupAnimation

expression A variable that represents a ShapeRange object.

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


Axis.Parent Property (PowerPoint)

 Copy code hover
[image]

Axis.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents an Axis object.

See also

Concepts

Axis Object

Other resources

Axis Object Members


Chart.BackWall Property (PowerPoint)

 Copy code hover
[image]

Chart.BackWall Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an object that allows the user to individually format the back wall of a 3-D chart. Read-only Walls.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .BackWall

expression A variable that represents a Chart object.

See also

Concepts

Chart Object

Other resources

Chart Object Members


Series.Trendlines Method (PowerPoint)

 Copy code hover
[image]

Series.Trendlines Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a collection of all the trendlines for the series.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Trendlines(Index)

expression A variable that represents a Series object.

Return Value

A Trendlines object that represents all the treadlines for the series.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example adds a linear trendline to series one for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).Trendlines.Add Type:=xlLinear

    End If

End With

See also

Concepts

Series Object

Other resources

Series Object Members


Series.MarkerBackgroundColorIndex Property (PowerPoint)

 Copy code hover
[image]

Series.MarkerBackgroundColorIndex Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the marker background color as an index into the current color palette, or as one of the following XlColorIndex constants: xlColorIndexAutomatic or xlColorIndexNone. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .MarkerBackgroundColorIndex

expression A variable that represents a Series object.

Remarks

This property applies only to line, scatter, and radar charts.

See also

Concepts

Series Object

Other resources

Series Object Members


Timing.BounceEndIntensity Property (PowerPoint)

 Copy code hover
[image]

Timing.BounceEndIntensity Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Read/write

Version Information

Version Added: PowerPoint 2010

Syntax

expression .BounceEndIntensity

expression A variable that represents a Timing object.

See also

Concepts

Timing Object

Other resources

Timing Object Members


Axis.AxisGroup Property (PowerPoint)

 Copy code hover
[image]

Axis.AxisGroup Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the type of axis group. Read-only XlAxisGroup.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .AxisGroup

expression A variable that represents an Axis object.

See also

Concepts

Axis Object

Other resources

Axis Object Members


Comment.AuthorInitials Property (PowerPoint)

 Copy code hover
[image]

Comment.AuthorInitials Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the author's initials as a read-only String for a specified Comment object. Read-only.

Syntax

expression .AuthorInitials

expression A variable that represents an Comment object.

Return Value

String

Remarks

This property only returns the author's initials. To return the author's name use the Author property. Specify the author's initials when you add a new comment to the presentation.

Example

The following example returns the author's initials for a specified comment.

VBA Copy code Copy code
Sub GetAuthorName()

    With ActivePresentation.Slides(1)

        .Comments.Add Left:=100, Top:=100, Author:="Jeff Smith", _

            AuthorInitials:="JS", _

            Text:="This is a new comment added to the first slide."

        MsgBox .Comments(1).Author & .Comments(1).AuthorInitials

    End With

End Sub

See also

Concepts

Comment Object

Other resources

Comment Object Members


SlideShowWindow Object (PowerPoint)

 Copy code hover
[image]

SlideShowWindow Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a window in which a slide show runs.

Example

Use SlideShowWindows(index), where index is the slide show window index number, to return a single SlideShowWindow object. The following example activates slide show window two.

VBA Copy code Copy code
SlideShowWindows(2).Activate

Use the Run method to create a new slide show window and return a reference to this slide show window. The following example runs a slide show of the active presentation and reduces the height of the slide show window just enough so that you can see the taskbar (for monitors with a screen resolution of 800 by 600).

VBA Copy code Copy code
With ActivePresentation.SlideShowSettings

    .ShowType = ppShowTypeSpeaker

    With .Run

        .Height = 300

        .Width = 400

    End With

End With

Use the View property to return the view in the specified slide show window. The following example sets the view in slide show window one to display slide three in the presentation.

VBA Copy code Copy code
SlideShowWindows(1).View.GotoSlide 3

Use the Presentation property to return the presentation that's currently running in the specified slide show window. The following example displays the name of the presentation that's currently running in slide show window one.

VBA Copy code Copy code
MsgBox SlideShowWindows(1).Presentation.Name

See also

Concepts

PowerPoint Object Model Reference

Other resources

SlideShowWindow Object Members


Chart.ChartGroups Method (PowerPoint)

 Copy code hover
[image]

Chart.ChartGroups Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an object that represents either a single chart group or a collection of all the chart groups in the chart.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ChartGroups(Index)

expression A variable that represents a Chart object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Optional | Variant | The chart group number. If specified, a single ChartGroup object is returned. If omitted, a ChartGroups object is returned which contains a collection of every ChartGroup object for that chart.

Example

This example turns on up and down bars for the first chart group of the first chart, and then sets their colors. The example should be run on a 2-D line chart containing two series that intersect at one or more data points.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(1).Chart.ChartGroups(1)

    .HasUpDownBars = True

    .DownBars.Interior.ColorIndex = 3

    .UpBars.Interior.ColorIndex = 5

End With

See also

Concepts

Chart Object

Other resources

Chart Object Members


AnimationBehavior Methods (PowerPoint)

 Copy code hover
[image]

AnimationBehavior Methods (PowerPoint)
Send feedback

Published: July 12, 2012

This object has the following methods:

Methods

Name | Description
Delete | Deletes the specified AnimationBehavior object.


TextRange.Find Method (PowerPoint)

 Copy code hover
[image]

TextRange.Find Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Finds the specified text in a text range, and returns a TextRange object that represents the first text range where the text is found. Returns Nothing if no match is found.

Syntax

expression .Find(FindWhat, After, MatchCase, WholeWords)

expression A variable that represents a TextRange object.

Parameters

Name | Required/Optional | Data Type | Description
FindWhat | Required | String | The text to search for.
After | Optional | Long | The position of the character (in the specified text range) after which you want to search for the next occurrence of FindWhat. For example, if you want to search from the fifth character of the text range, specify 4 for After. If this argument is omitted, the first character of the text range is used as the starting point for the search.
MatchCase | Optional | MsoTriState | msoTrue for the search to distinguish between uppercase and lowercase characters.
WholeWords | Optional | MsoTriState | msoTrue for the search to find only whole words and not parts of larger words as well.

Return Value

TextRange

Example

This example finds every occurrence of "CompanyX" in the active presentation and formats it as bold.

VBA Copy code Copy code
For Each sld In Application.ActivePresentation.Slides
    For Each shp In sld.Shapes
        If shp.HasTextFrame Then
            Set txtRng = shp.TextFrame.TextRange
            Set foundText = txtRng.Find(FindWhat:="CompanyX")
            Do While Not (foundText Is Nothing)
                With foundText
                    .Font.Bold = True
                    Set foundText = _
                        txtRng.Find(FindWhat:="CompanyX", _
                        After:=.Start + .Length - 1)
                End With
            Loop
        End If
    Next
Next

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


MediaFormat Object (PowerPoint)

 Copy code hover
[image]

MediaFormat Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Contains methods and properties that allow access to and control over audio and video media.

See also

Concepts

PowerPoint Object Model Reference

Other resources

MediaFormat Object Members


ThemeVariants Methods (PowerPoint)

 Copy code hover
[image]

ThemeVariants Methods (PowerPoint)
Send feedback

This object has the following methods:

Methods

Name | Description
Item | Returns a single ThemeVariant object from the collection.


ChartArea.Creator Property (PowerPoint)

 Copy code hover
[image]

ChartArea.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents a ChartArea object.

See also

Concepts

ChartArea Object

Other resources

ChartArea Object Members


ChartFont.Background Property (PowerPoint)

 Copy code hover
[image]

ChartFont.Background Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets the type of background for text used in charts. Read/write Variant that is set to one of the constants of XlBackground.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Background

expression A variable that represents a ChartFont object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example adds a chart title to the first chart in the active document and then sets the font size and specifies a transparent background for the title.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart

            .HasTitle = True

            .ChartTitle.Text = "Rainfall Totals by Month"

            With .ChartTitle.Font

                .Size = 10

                .Background = xlBackgroundTransparent

            End With

        End With

    End If

End With

See also

Concepts

ChartFont Object

Other resources

ChartFont Object Members


PpDateTimeFormat Enumeration (PowerPoint)

 Copy code hover
[image]

PpDateTimeFormat Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the format for the automatically updated date and time.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppDateTimeddddMMMMddyyyy | 2 | ddddMMMMddyyyy
ppDateTimedMMMMyyyy | 3 | dMMMMyyyy
ppDateTimedMMMyy | 5 | dMMMyy
ppDateTimeFigureOut | 14 | Figure Out
ppDateTimeFormatMixed | -2 | Mixed Format
ppDateTimeHmm | 10 | Hmm
ppDateTimehmmAMPM | 12 | hmmAMPM
ppDateTimeHmmss | 11 | Hmmss
ppDateTimehmmssAMPM | 13 | hmmssAMPM
ppDateTimeMdyy | 1 | Mdyy
ppDateTimeMMddyyHmm | 8 | MMddyyHmm
ppDateTimeMMddyyhmmAMPM | 9 | MMddyyhmmAMPM
ppDateTimeMMMMdyyyy | 4 | MMMMdyyyy
ppDateTimeMMMMyy | 6 | MMMMyy
ppDateTimeMMyy | 7 | MMyy


CustomLayout.Guides Property (PowerPoint)

 Copy code hover
[image]

CustomLayout.Guides Property (PowerPoint)
Send feedback

Returns the Guides collection associated with a custom layout. Read-only.

Version information

Version Added: PowerPoint 2013

Syntax

expression .Guides

expression A variable that represents a CustomLayout object.

Property value

GUIDES


SlideShowWindow.Top Property (PowerPoint)

 Copy code hover
[image]

SlideShowWindow.Top Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a Single that represents the distance in points from the top edge of the document, application, and slide show window to the top edge of the application window's client area. Read/write.

Syntax

expression .Top

expression A variable that represents a SlideShowWindow object.

Return Value

Single

Remarks

Setting this property to a very large positive or negative value may position the window completely off the desktop.

Example

This example arranges windows one and two horizontally; in other words, each window occupies half the available vertical space and all the available horizontal space in the application window's client area. For this example to work, there must be only two document windows open.

VBA Copy code Copy code
Windows.Arrange ppArrangeTiled

sngHeight = Windows(1).Height                     ' available height

sngWidth = Windows(1).Width + Windows(2).Width    ' available width

With Windows(1)

    .Width = sngWidth

    .Height = sngHeight / 2

    .Left = 0

End With

With Windows(2)

    .Width = sngWidth

    .Height = sngHeight / 2

    .Top = sngHeight / 2

    .Left = 0

End With

See also

Concepts

SlideShowWindow Object

Other resources

SlideShowWindow Object Members


DataTable.Creator Property (PowerPoint)

 Copy code hover
[image]

DataTable.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents a DataTable object.

See also

Concepts

DataTable Object

Other resources

DataTable Object Members


Slide.Copy Method (PowerPoint)

 Copy code hover
[image]

Slide.Copy Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Copies the specified object to the Clipboard.

Syntax

expression .Copy

expression A variable that represents a Slide object.

Remarks

Use the Paste method to paste the contents of the Clipboard.

Example

This example copies slide one in the active presentation to the Clipboard.

VBA Copy code Copy code
ActivePresentation.Slides(1).Copy

See also

Concepts

Slide Object

Other resources

Slide Object Members


Series.Delete Method (PowerPoint)

 Copy code hover
[image]

Series.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Delete

expression A variable that represents a Series object.

See also

Concepts

Series Object

Other resources

Series Object Members


SeriesCollection Members (PowerPoint)

 Copy code hover
[image]

SeriesCollection Members (PowerPoint)
Send feedback

Published: July 12, 2012

Represents a collection of all the Series objects in the specified chart or chart group.

Methods

Name | Description
Add | Adds one or more new series to the collection.
Extend | Adds new data points to an existing series collection.
Item | Returns a single object from a collection.
NewSeries | Creates a new series.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Count | Returns the number of objects in the collection. Read-only Long.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Parent | Returns the parent for the specified object. Read-only Object.


XlReadingOrder Enumeration (PowerPoint)

 Copy code hover
[image]

XlReadingOrder Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the reading order for the specified object.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlContext | -5002 | According to context.
xlLTR | -5003 | Left-to-right.
xlRTL | -5004 | Right-to-left.


ChartGroup.Application Property (PowerPoint)

 Copy code hover
[image]

ChartGroup.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents a ChartGroup object.

See also

Concepts

ChartGroup Object

Other resources

ChartGroup Object Members


CategoryCollection Properties (PowerPoint)

 Copy code hover
[image]

CategoryCollection Properties (PowerPoint)
Send feedback

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Count | Returns a Long that represents the number of categories in the collection. Read-only.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
Parent | Returns the parent for the specified object. Read-only Object.


Comment.UserID Property (PowerPoint)

 Copy code hover
[image]

Comment.UserID Property (PowerPoint)
Send feedback

Returns a String that represents user ID of the contact. Read-only.

Version information

Version Added: PowerPoint 2013

Syntax

expression .UserID

expression A variable that represents a Comment object.

Property value

STRING


CalloutFormat Properties (PowerPoint)

 Copy code hover
[image]

CalloutFormat Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Accent | Determines whether a vertical accent bar separates the callout text from the callout line. Read/write.
Angle | Returns or sets the angle of the callout line. If the callout line contains more than one line segment, this property returns or sets the angle of the segment that is farthest from the callout text box. Read/write.
Application | Returns an Application object that represents the creator of the specified object.
AutoAttach | Determines whether the place where the callout line attaches to the callout text box changes, depending on whether the origin of the callout line (where the callout points to) is to the left or right of the callout text box. Read/write.
AutoLength | Determines whether the first segment of the callout retains the fixed length specified by the Length property, or is scaled automatically, whenever the callout is moved. Read-only.
Border | Determines whether the text in the specified callout is surrounded by a border. Read/write.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
Drop | For callouts with an explicitly set drop value, this property returns the vertical distance (in points) from the edge of the text bounding box to the place where the callout line attaches to the text box. Read-only.
DropType | Returns a value that indicates where the callout line attaches to the callout text box. Read-only.
Gap | Returns or sets the horizontal distance (in points) between the end of the callout line and the text bounding box. Read/write.
Length | When the AutoLength property of the specified callout is set to False, the Length property returns the length (in points) of the first segment of the callout line (the segment attached to the text callout box). Read-only.
Parent | Returns the parent object for the specified object.
Type | Represents the type of callout. Read/write.


ChartFont.Subscript Property (PowerPoint)

 Copy code hover
[image]

ChartFont.Subscript Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if the font is formatted as subscript. The default is False. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Subscript

expression A variable that represents a ChartFont object.

See also

Concepts

ChartFont Object

Other resources

ChartFont Object Members


Sequences.Item Method (PowerPoint)

 Copy code hover
[image]

Sequences.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single Sequence object from the specified Sequences collection.

Syntax

expression .Item(Index)

expression A variable that represents a Sequences object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Long | The index number of the single Sequence object in the collection to be returned.

Return Value

Sequence

See also

Concepts

Sequences Object

Other resources

Sequences Object Members


View.DisplaySlideMiniature Property (PowerPoint)

 Copy code hover
[image]

View.DisplaySlideMiniature Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines if and when the slide miniature window is displayed automatically. Read/write.

Syntax

expression .DisplaySlideMiniature

expression A variable that represents a View object.

Return Value

MsoTriState

Remarks

This property is not available in slide show view and slide sorter view. The slide miniature window isn't a member of either the Windows collection or the SlideShowWindows collection.

The fit percentage is determined by a combination of the size of the slide pane and the size of the presentation window. To determine the fit percentage, set the ZoomToFit property to True and then return the value of the Zoom property.

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

Constant | Description
msoFalse | The slide miniature window is not displayed automatically.
msoTrue | The slide miniature window is displayed automatically when the document window is in black-and-white view, the slide pane is zoomed to greater than 150% of the fit percentage, or a master view is visible.

Example

If document window one is in slide view, this example displays the slide miniature window.

VBA Copy code Copy code
With Windows(1).View

    If .Type = ppViewSlide Then .DisplaySlideMiniature = msoTrue

End With

See also

Concepts

View Object

Other resources

View Object Members


Font.Embeddable Property (PowerPoint)

 Copy code hover
[image]

Font.Embeddable Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the specified font can be embedded in the presentation. Read-only.

Syntax

expression .Embeddable

expression A variable that represents an Font object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified font cannot be embedded in the presentation.
msoTrue | The specified font can be embedded in the presentation.

Example

This example checks each font used in the active presentation to determine whether it is embeddable in the presentation.

VBA Copy code Copy code
For Each usedFont In Presentations(1).Fonts

    If usedFont.Embeddable Then

        MsgBox usedFont.Name & ": Embeddable"

    Else

        MsgBox usedFont.Name & ": Not embeddable"

    End If

Next usedFont

See also

Concepts

Font Object

Other resources

Font Object Members


Shape.Child Property (PowerPoint)

 Copy code hover
[image]

Shape.Child Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

MsoTrue if the shape is a child shape or if all shapes in a shape range are child shapes of the same parent. Read-only.

Syntax

expression .Child

expression A variable that represents a Shape object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The shape is not a child shape or, if a shape range, all child shapes do not belong to the same parent.
msoTrue | The shape is a child shape or, if a shape range, all child shapes belong to the same parent.

Example

This example selects the first shape in the canvas, and if the selected shape is a child shape, fills the shape with the specified color. This example assumes that the first shape in the active presentation is a drawing canvas that contains multiple shapes.

VBA Copy code Copy code
Sub FillChildShape()

    'Select the first shape in the drawing canvas

    ActivePresentation.Slides(1).Shapes(1).CanvasItems(1).Select

    'Fill selected shape if it is a child shape

    With ActiveWindow.Selection

        If .ShapeRange.Child = msoTrue Then

            .ShapeRange.Fill.ForeColor.RGB = RGB(Red:=100, Green:=0, Blue:=200)

        Else

            MsgBox "This shape is not a child shape."

        End If

    End With

End Sub

See also

Concepts

Shape Object

Other resources

Shape Object Members


PrintOptions.FitToPage Property (PowerPoint)

 Copy code hover
[image]

PrintOptions.FitToPage Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the slides will be scaled to fill the page they're printed on. Read/write.

Syntax

expression .FitToPage

expression A variable that represents a PrintOptions object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The default. The slides will have the dimensions specified in the Page Setup dialog box, whether or not those dimensions match the page they're printed on.
msoTrue | The specified slides will be scaled to fill the page they're printed on, regardless of the values in the Height and Width boxes in the Page Setup dialog box. (On the Design tab, click Page Setup.)

Example

This example prints the active presentation and scales each slide to fit the printed page.

VBA Copy code Copy code
With ActivePresentation

    .PrintOptions.FitToPage = msoTrue

    .PrintOut

End With

See also

Concepts

PrintOptions Object

Other resources

PrintOptions Object Members


Presentation.PrintOut Method (PowerPoint)

 Copy code hover
[image]

Presentation.PrintOut Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Prints the specified presentation.

Syntax

expression .PrintOut(From, To, PrintToFile, Copies, Collate)

expression A variable that represents a Presentation object.

Parameters

Name | Required/Optional | Data Type | Description
From | Optional | Integer | The number of the first page to be printed. If this argument is omitted, printing starts at the beginning of the presentation. Specifying the To and From arguments sets the contents of the PrintRanges object and sets the value of the RangeType property for the presentation.
To | Optional | Integer | The number of the last page to be printed. If this argument is omitted, printing continues to the end of the presentation. Specifying the To and From arguments sets the contents of the PrintRanges object and sets the value of the RangeType property for the presentation.
PrintToFile | Optional | String | The name of the file to print to. If you specify this argument, the file is printed to a file rather than sent to a printer. If this argument is omitted, the file is sent to a printer.
Copies | Optional | Integer | The number of copies to be printed. If this argument is omitted, only one copy is printed. Specifying this argument sets the value of the NumberOfCopies property.
Collate | Optional | MsoTriState | If this argument is omitted, multiple copies are collated. Specifying this argument sets the value of the Collate property.

Remarks

The Collate parameter value can be one of these MsoTriState constants.

Constant | Description
msoFalse | Prints all copies of one page before printing the first copy of the next page.
msoTrue | Prints a complete copy of the presentation before the first page of the next copy is printed.

Example

This example prints two uncollated copies of each slide — whether visible or hidden — from slide two to slide five in the active presentation.

VBA Copy code Copy code
With Application.ActivePresentation

    .PrintOptions.PrintHiddenSlides = True

    .PrintOut From:=2, To:=5, Copies:=2, Collate:=msoFalse

End With

This example prints a single copy of all slides in the active presentation to the file Testprnt.prn.

VBA Copy code Copy code
Application.ActivePresentation.PrintOut PrintToFile:="TestPrnt"

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


ThreeDFormat.Visible Property (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.Visible Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the visibility of the specified object or the formatting applied to the specified object. Read/write.

Syntax

expression .Visible

expression A variable that represents a ThreeDFormat object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified object or object formatting is not visible.
msoTrue | The specified object or object formatting is visible.

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


CustomLayout.Background Property (PowerPoint)

 Copy code hover
[image]

CustomLayout.Background Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a ShapeRange object that represents the slide background. Read-only.

Syntax

expression .Background

expression A variable that represents a CustomLayout object.

Return Value

ShapeRange

See also

Concepts

CustomLayout Object

Other resources

CustomLayout Object Members


ThreeDFormat.LightAngle Property (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.LightAngle Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Sets or returns the angle at which light impacts the shape whose three-dimensional format is represented by the specified object. Read/write.

Syntax

expression .LightAngle

expression An expression that returns a ThreeDFormat object.

Return Value

Single

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


Axes.Item Method (PowerPoint)

 Copy code hover
[image]

Axes.Item Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a single Axis object from an Axes collection.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Item(Type, AxisGroup)

expression A variable that represents an Axes object.

Parameters

Name | Required/Optional | Data Type | Description
Type | Required | XlAxisType | The axis type.
AxisGroup | Optional | XlAxisGroup | The axis.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the title text for the category axis for the first chart in the active document.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(1)

    If .HasChart Then

        With .Chart.Axes.Item(xlCategory)

            .HasTitle = True

            .AxisTitle.Caption = "1994"

        End With

    End If

End With

See also

Concepts

Axes Object

Other resources

Axes Object Members


TextEffectFormat Object (PowerPoint)

 Copy code hover
[image]

TextEffectFormat Object (PowerPoint)
See also Send feedback

Published: July 12, 2012

Contains properties and methods that apply to WordArt objects.

Example

Use the TextEffect property to return a TextEffectFormat object. The following example sets the font name and formatting for shape one on myDocument. For this example to work, shape one must be a WordArt object.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(1).TextEffect

    .FontName = "Courier New"

    .FontBold = True

    .FontItalic = True

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

TextEffectFormat Object Members


Slide Methods (PowerPoint)

 Copy code hover
[image]

Slide Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
ApplyTemplate | Applies a design template to the specified slide.
ApplyTemplate2 | Applies a design template and theme variant to the slide.
ApplyTheme | Applies a theme or design template to the specified slide.
ApplyThemeColorScheme | Applies a color scheme to the specified slide.
Copy | Copies the specified object to the Clipboard.
Cut | Deletes the specified object and places it on the Clipboard.
Delete | Deletes the specified Slide object.
Duplicate | Creates a duplicate of the specified Slide object, adds the new slide to the Slides collection immediately after the slide specified originally, and then returns a Slide object that represents the duplicate slide.
Export | Exports a slide, using the specified graphics filter, and saves the exported file under the specified file name.
MoveTo | Moves the specified object to a specific location within the same collection, renumbering all other items in the collection appropriately.
MoveToSectionStart | Moves the current slide to the start of the specified section.
PublishSlides | Publishes the specified slide to the specified location.
Select | Selects the specified object.


Designs.Item Method (PowerPoint)

 Copy code hover
[image]

Designs.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single Design object from the specified Designs collection.

Syntax

expression .Item(Index)

expression A variable that represents a Designs object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Variant | The name or index number of the single Design object in the collection to be returned.

Return Value

Design

See also

Concepts

Designs Object

Other resources

Designs Object Members


Presentation.CheckIn Method (PowerPoint)

 Copy code hover
[image]

Presentation.CheckIn Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a presentation from a local computer to a server, and sets the local file to read-only so that it cannot be edited locally.

Syntax

expression .CheckIn(SaveChanges, Comments, MakePublic)

expression A variable that represents a Presentation object.

Parameters

Name | Required/Optional | Data Type | Description
SaveChanges | Optional | Boolean | True saves the presentation to the server location. The default value is False.
Comments | Optional | Variant | Comments for the revision of the presentation being checked in (only applies if SaveChanges equals True).
MakePublic | Optional | Variant | True allows the user to perform a publish on the presentation after being checked in. This submits the document for the approval process, which can eventually result in a version of the presentation being published to users with read-only rights to the presentation (only applies if SaveChanges equals True).

Remarks

To take advantage of the collaboration features built into Microsoft PowerPoint, presentations must be stored on a Microsoft Office SharePoint Portal Server.

Example

This example checks the server to see if the specified presentation can be checked in and, if so, closes the presentation and checks it back into server.

VBA Copy code Copy code
Sub CheckInPresentation(strPresentation As String)

    If Presentations(strPresentation).CanCheckIn = True Then

        Presentations(strPresentation).CheckIn

        MsgBox strPresentation & " has been checked in."

    Else

        MsgBox strPresentation & " cannot be checked in at this time.  Please try again later."

    End If

End Sub

To call the subroutine above, use the following subroutine and replace the "http://servername/workspace/report.ppt" file name with an actual file located on a server mentioned in the Remarks section above.

VBA Copy code Copy code
Sub CheckInPresentation()

    Call CheckInPresentation(strPresentation:= "http://servername/workspace/report.ppt")

End Sub

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


CommandEffect.Command Property (PowerPoint)

 Copy code hover
[image]

CommandEffect.Command Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the command to be executed for the command effect. Read/write.

Syntax

expression .Command

expression A variable that represents a CommandEffect object.

Return Value

String

Remarks

You can send OLE verbs to embedded objects using this property.

If the shape is an OLE object, then the ole object will execute the command if it understands the verb.

If the shape is a media object (sound/video), Microsoft PowerPoint understands the following verbs: play, stop, pause, togglepause, resume and playfrom. Any other command sent to the shape will be ignored.

Example

The following example shows how to set a command effect animation behavior.

VBA Copy code Copy code
    Set bhvEffect = effectNew.Behaviors.Add(msoAnimTypeCommand)

    With bhvEffect.CommandEffect

         .Type = msoAnimCommandTypeVerb

         .Command = Play

    End With

See also

Concepts

CommandEffect Object

Other resources

CommandEffect Object Members


SlideRange.HasNotesPage Property (PowerPoint)

 Copy code hover
[image]

SlideRange.HasNotesPage Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Indicates whether the selected SlideRange has media that resides on a notes page. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .HasNotesPage

expression A variable that represents a SlideRange object.

Return Value

Boolean

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


Chart.Delete Method (PowerPoint)

 Copy code hover
[image]

Chart.Delete Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Deletes the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Delete

expression A variable that represents a Chart object.

See also

Concepts

Chart Object

Other resources

Chart Object Members


LegendEntries.Item Method (PowerPoint)

 Copy code hover
[image]

LegendEntries.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single object from a collection.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Item(Index)

expression A variable that represents a LegendEntries object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Variant | The index number for the object.

Return Value

A LegendEntry object that the collection contains.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example changes the font for the text of the legend entry at the top of the legend (this is usually the legend for series one) for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.Legend.LegendEntries.Item(1). _

            Font.Italic = True

    End If

End With

See also

Concepts

LegendEntries Object

Other resources

LegendEntries Object Members


CustomLayout Object (PowerPoint)

 Copy code hover
[image]

CustomLayout Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a custom layout associated with a presentation design. The CustomLayout object is a member of the CustomLayouts collection.

Remarks

Use the CustomLayout property of the Slide or SlideRange objects to access a CustomLayout object, for example:

VBA Copy code Copy code
ActiveWindow.Selection.SlideRange(1).CustomLayout
VBA Copy code Copy code
ActivePresentation.Slides(1).CustomLayout

Use the Add method of the CustomLayouts collection to add a new custom layout to the presentation design's custom layouts. Use the Item method to refer to a custom layout. Use the Paste method to paste the slides on the Clipboard into a custom layout and add the custom layout to the CustomLayouts collection.

See also

Concepts

PowerPoint Object Model Reference

Other resources

CustomLayout Object Members


CellRange.Item Method (PowerPoint)

 Copy code hover
[image]

CellRange.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single Cell object from the specified CellRange collection.

Syntax

expression .Item(Index)

expression A variable that represents a CellRange object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Long | The index number of the single Cell object in the collection to be returned.

Return Value

Cell

See also

Concepts

CellRange Object

Other resources

CellRange Object Members


ChartBorder.Weight Property (PowerPoint)

 Copy code hover
[image]

ChartBorder.Weight Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the weight of the border. Read/write XlBorderWeight.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Weight

expression A variable that represents a ChartBorder object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the border weight for the value axis of the first chart in the active document to medium.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.Axes(xlValue).Border.Weight = xlMedium

    End If

End With

See also

Concepts

ChartBorder Object

Other resources

ChartBorder Object Members


LineFormat Members (PowerPoint)

 Copy code hover
[image]

LineFormat Members (PowerPoint)
Send feedback

Published: July 12, 2012

Represents line and arrowhead formatting. For a line, the LineFormat object contains formatting information for the line itself; for a shape with a border, this object contains formatting information for the shape's border.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
BackColor | Returns or sets a ColorFormat object that represents the background color for the specified fill or patterned line. Read/write.
BeginArrowheadLength | Returns or sets the length of the arrowhead at the beginning of the specified line. Read/write.
BeginArrowheadStyle | Returns or sets the style of the arrowhead at the beginning of the specified line. Read/write.
BeginArrowheadWidth | Returns or sets the width of the arrowhead at the beginning of the specified line. Read/write.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
DashStyle | Returns or sets the dash style for the specified line. Read/write.
EndArrowheadLength | Returns or sets the length of the arrowhead at the end of the specified line. Read/write.
EndArrowheadStyle | Returns or sets the style of the arrowhead at the end of the specified line. Read/write.
EndArrowheadWidth | Returns or sets the width of the arrowhead at the end of the specified line. Read/write.
ForeColor | Returns or sets a ColorFormat object that represents the foreground color for the fill, line, or shadow. Read/write.
InsetPen | Detemines whether to draw lines on the inside of a specified shape. Read/write.
Parent | Returns the parent object for the specified object.
Pattern | Sets or returns a value that represents the pattern applied to the specified line. Read/write.
Style | Returns or sets the line style. Read/write.
Transparency | Returns or sets the degree of transparency of the specified fill, shadow, or line as a value between 0.0 (opaque) and 1.0 (clear). Read/write.
Visible | Returns or sets the visibility of the specified object or the formatting applied to the specified object. Read/write.
Weight | Returns or sets the thickness of the specified line, in points. Read/write.


ActionSetting.ShowAndReturn Property (PowerPoint)

 Copy code hover
[image]

ActionSetting.ShowAndReturn Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines if and under what circumstances Microsoft PowerPoint returns to the initiating slide show. Read/write.

Syntax

expression .ShowAndReturn

expression A variable that represents an ActionSetting object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | Default. PowerPoint doesn't return to the initiating slide show from the deactivated custom slide show.
msoTrue | PowerPoint returns to the initiating slide show from a deactivated custom slide show that was activated by using the ActionSetting object of the initiating presentation.

Example

This example sets the mouse click action for shape five on slide one in the active presentation to show the custom slide show named "techtalk." When the custom slide show is over, it automatically returns to the initiating presentation, in the state before the mouse click occurred.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(5).ActionSettings(ppMouseClick)

    .Action = ppActionNamedSlideShow

    .SlideShowName = "techtalk"

    .ShowandReturn = msoTrue

End With

See also

Concepts

ActionSetting Object

Other resources

ActionSetting Object Members


CalloutFormat Methods (PowerPoint)

 Copy code hover
[image]

CalloutFormat Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
AutomaticLength | Specifies that the first segment of the callout line (the segment attached to the text callout box) be scaled automatically when the callout is moved. Use the CustomLength method to specify that the first segment of the callout line retain the fixed length returned by the Length property whenever the callout is moved. Applies only to callouts whose lines consist of more than one segment (types msoCalloutThree and msoCalloutFour).
CustomDrop | Sets the vertical distance (in points) from the edge of the text bounding box to the place where the callout line attaches to the text box. This distance is measured from the top of the text box unless the AutoAttach property is set to True and the text box is to the left of the origin of the callout line (the place that the callout points to). In this case the drop distance is measured from the bottom of the text box.
CustomLength | Specifies that the first segment of the callout line (the segment attached to the text callout box) retain a fixed length whenever the callout is moved.
PresetDrop | Specifies whether the callout line attaches to the top, bottom, or center of the callout text box or whether it attaches at a point that's a specified distance from the top or bottom of the text box.


ChartArea.ClearFormats Method (PowerPoint)

 Copy code hover
[image]

ChartArea.ClearFormats Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Clears the formatting of the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ClearFormats

expression A variable that represents a ChartArea object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example clears the formatting from the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.ChartArea.ClearFormats

    End If

End With

See also

Concepts

ChartArea Object

Other resources

ChartArea Object Members


Presentation.PageSetup Property (PowerPoint)

 Copy code hover
[image]

Presentation.PageSetup Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a PageSetup object whose properties control slide setup attributes for the specified presentation. Read-only.

Syntax

expression .PageSetup

expression A variable that represents a Presentation object.

Return Value

PageSetup

Example

The following example sets the slide size and slide orientation for the presentation named "Pres1."

VBA Copy code Copy code
With Presentations("pres1").PageSetup

    .SlideSize = ppSlideSize35MM

    .SlideOrientation = msoOrientationHorizontal

End With

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


ProtectedViewWindow Object (PowerPoint)

 Copy code hover
[image]

ProtectedViewWindow Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a presentation window that is in protected view.

Version Information

Version Added: PowerPoint 2010

Remarks

Documents displayed in a protected view window cannot be edited and are restricted from running active content such as Visual Basic for Applications macros and data connections.

Use ProtectedViewWindows(Index), where Index is the index number to return a single ProtectedViewWindow object. The index number represents the position of the protected view window in the ProtectedViewWindows collection.

See also

Concepts

PowerPoint Object Model Reference

Other resources

ProtectedViewWindow Object Members


Timing.AutoReverse Property (PowerPoint)

 Copy code hover
[image]

Timing.AutoReverse Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether an effect should play forward and then in reverse, thereby doubling its duration. Read/write.

Syntax

expression .AutoReverse

expression A variable that represents an Timing object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The default. The effect does not play forward and then in reverse.
msoTrue | The effect plays forward and then in reverse.

Example

The following example adds a shape and an animation effect to it; then it sets the animation to reverse direction after it finishes its forward movement.

VBA Copy code Copy code
Sub SetEffectTiming()

    Dim effDiamond As Effect

    Dim shpRectangle As Shape

    'Adds rectangle and applies diamond effect

    Set shpRectangle = ActivePresentation.Slides(1).Shapes.AddShape _

        (Type:=msoShapeRectangle, Left:=100, _

        Top:=100, Width:=50, Height:=50)

    Set effDiamond = ActivePresentation.Slides(1).TimeLine _

        .MainSequence.AddEffect(Shape:=shpRectangle, _

         effectId:=msoAnimEffectPathDiamond)

    'Sets the duration of and reverses the effect

    With effDiamond.Timing

        .Duration = 5 ' Length of effect.

        .AutoReverse = msoTrue

    End With

End Sub

See also

Concepts

Timing Object

Other resources

Timing Object Members


Chart.SetBackgroundPicture Method (PowerPoint)

 Copy code hover
[image]

Chart.SetBackgroundPicture Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets the background graphic for a chart.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .SetBackgroundPicture(FileName)

expression A variable that represents a Chart object.

Parameters

Name | Required/Optional | Data Type | Description
FileName | Required | String | The name of the file for the graphic.

See also

Concepts

Chart Object

Other resources

Chart Object Members


ShadowFormat.Visible Property (PowerPoint)

 Copy code hover
[image]

ShadowFormat.Visible Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the visibility of the specified object or the formatting applied to the specified object. Read/write.

Syntax

expression .Visible

expression A variable that represents a ShadowFormat object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified object or object formatting is not visible.
msoTrue | The specified object or object formatting is visible.

Example

This example sets the horizontal and vertical offsets for the shadow of shape three on the first slide in the active presentation. The shadow is offset 5 points to the right of the shape and 3 points above it. If the shape doesn't already have a shadow, this example adds one to it and makes it visible.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(3).Shadow

    .Visible = msoTrue

    .OffsetX = 5

    .OffsetY = -3

End With

See also

Concepts

ShadowFormat Object

Other resources

ShadowFormat Object Members


DataLabels.ShowLegendKey Property (PowerPoint)

 Copy code hover
[image]

DataLabels.ShowLegendKey Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

True if the data label legend key is visible. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ShowLegendKey

expression A variable that represents a DataLabels object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the data labels for series one of the first chart in the active document to show values and the legend key.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).DataLabels. _

            ShowLegendKey = True

        .Chart.SeriesCollection(1).DataLabels.Type = xlShowValue

    End If

End With

See also

Concepts

DataLabels Object

Other resources

DataLabels Object Members


TickLabels Methods (PowerPoint)

 Copy code hover
[image]

TickLabels Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Delete | Deletes the object.
Select | Selects the object.


Walls.Parent Property (PowerPoint)

 Copy code hover
[image]

Walls.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents a Walls object.

See also

Concepts

Walls Object

Other resources

Walls Object Members


ActionSettings Members (PowerPoint)

 Copy code hover
[image]

ActionSettings Members (PowerPoint)
Send feedback

Published: July 16, 2012

A collection that contains the two ActionSetting objects for a shape or text range. One ActionSetting object represents how the specified object reacts when the user clicks it during a slide show, and the other ActionSetting object represents how the specified object reacts when the user moves the mouse pointer over it during a slide show.

Methods

Name | Description
Item | Returns a single action setting from the specified ActionSettings collection.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


Chart.ApplyLayout Method (PowerPoint)

 Copy code hover
[image]

Chart.ApplyLayout Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Applies the layouts shown in the Ribbon.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ApplyLayout(Layout, ChartType)

expression A variable that represents a Chart object.

Parameters

Name | Required/Optional | Data Type | Description
Layout | Required | Long | The type of layout. The type of layout is denoted by a number from 1 to 10.
ChartType | Optional | Variant | An XlChartType constant that represents the type of chart.

Remarks

When you use a layout on the current chart type, a number from 1 to 10 is applied to the chart type. You can also apply the layout of one chart type on another chart type. For example, you can apply the layouts that are available from a line chart to a column chart. The layout adds only chart elements that are available for that particular chart type.

See also

Concepts

Chart Object

Other resources

Chart Object Members


MsoAnimEffectAfter Enumeration (PowerPoint)

 Copy code hover
[image]

MsoAnimEffectAfter Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Not used with Microsoft PowerPoint 2013.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
msoAnimEffectAfterFreeze | 1 | After freeze.
msoAnimEffectAfterHold | 3 | After hold.
msoAnimEffectAfterRemove | 2 | After remove.
msoAnimEffectAfterTransition | 4 | After transition.


PropertyEffect Members (PowerPoint)

 Copy code hover
[image]

PropertyEffect Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a property effect for an AnimationBehavior object.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
From | Sets or returns a Variant that represents the starting value of an object's property. Read/write.
Parent | Returns the parent object for the specified object.
Points | Returns an AnimationPoints object that represents a point in an animation.
Property | Sets or returns an MsoAnimProperty constant that represents an animation property. Read/write.
To | Sets or returns a Variant that represents the ending value of an object's property. Read/write.


BulletFormat.Parent Property (PowerPoint)

 Copy code hover
[image]

BulletFormat.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a BulletFormat object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

BulletFormat Object

Other resources

BulletFormat Object Members


ChartGroup.SplitType Property (PowerPoint)

 Copy code hover
[image]

ChartGroup.SplitType Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets the way the two sections of either a pie-of-pie chart or a bar-of-pie chart are split. Read/write XlChartSplitType.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .SplitType

expression A variable that represents a ChartGroup object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example splits the two sections of the chart by value, combining all values under 10 in the primary pie and displaying them in the secondary section. You must run the example on either a pie-of-pie chart or a bar-of-pie chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.ChartGroups(1)

            .SplitType = xlSplitByValue

            .SplitValue = 10

            .VaryByCategories = True

        End With

    End If

End With

See also

Concepts

ChartGroup Object

Other resources

ChartGroup Object Members


Application Events (PowerPoint)

 Copy code hover
[image]

Application Events (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following events:

Events

Name | Description
AfterDragDropOnSlide | Occurs after a shape has been dropped onto a slide in an open presentation.
AfterNewPresentation | Occurs after a presentation is created.
AfterPresentationOpen | Occurs after an existing presentation is opened.
AfterShapeSizeChange | Occurs after an object (shape, picture, text box, chart, SmartArt as examples) has been resized on the slide.
ColorSchemeChanged | Occurs after a color scheme is changed.
NewPresentation | Occurs after a presentation is created, as it is added to the Presentations collection.
PresentationBeforeClose | Represents a Presentation object before it closes.
PresentationBeforeSave | Occurs before a presentation is saved.
PresentationClose | Occurs immediately before any open presentation closes, as it is removed from the Presentations collection.
PresentationCloseFinal | Represents closing the final Presentation object.
PresentationNewSlide | Occurs when a new slide is created in any open presentation, as the slide is added to the Slides collection.
PresentationOpen | Occurs after an existing presentation is opened, as it is added to the Presentations collection.
PresentationPrint | Occurs before a presentation is printed.
PresentationSave | Occurs before any open presentation is saved.
PresentationSync | Occurs when the local copy of a presentation that is part of a Document Workspace is synchronized with the copy on the server. Provides important status information regarding the success or failure of the synchronization of the presentation.
ProtectedViewWindowActivate | Occurs when any protected view window is activated.
ProtectedViewWindowBeforeClose | Occurs immediately before a protected view window or a document in a protected view window closes.
ProtectedViewWindowBeforeEdit | Occurs immediately before editing is enabled on the document in the specified protected view window.
ProtectedViewWindowDeactivate | Occurs when a protected view window is deactivated.
ProtectedViewWindowOpen | Occurs when a protected view window is opened.
SlideSelectionChanged | Occurs at different times depending on the current view.
SlideShowBegin | Occurs when you start a slide show.
SlideShowEnd | Occurs after a slide show ends, immediately after the last SlideShowNextSlide event occurs.
SlideShowNextBuild | Occurs upon mouse-click or timing animation, but before the animated object becomes visible. .
SlideShowNextClick | Occurs on the next click of the slide.
SlideShowNextSlide | Occurs immediately before the transition to the next slide. For the first slide, occurs immediately after the SlideShowBegin event.
SlideShowOnNext | Occurs when the user clicks Next to move within the current slide.
SlideShowOnPrevious | Occurs when the user clicks Previous to move within the current slide.
WindowActivate | Occurs when the application window or any document window is activated.
WindowBeforeDoubleClick | Occurs when you double-click the items in the views listed in the following table.
WindowBeforeRightClick | Occurs when you right-click a shape, a slide, a notes page, or some text. This event is triggered by the MouseUp event.
WindowDeactivate | Occurs when the application window or any document window is deactivated.
WindowSelectionChange | Occurs when the selection of text, a shape, or a slide in the active document window changes, whether in the user interface or in code.


DataLabels Object (PowerPoint)

 Copy code hover
[image]

DataLabels Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

A collection of all the DataLabel objects for the specified series.

Version Information

Version Added: PowerPoint 2007

Remarks

Each DataLabel object represents a data label for a point or trendline. For a series without definable points (such as an area series), the DataLabels collection contains a single data label.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

Use the DataLabels method to return the DataLabels collection. The following example sets the number format for data labels on the first series of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With Chart.SeriesCollection(1)

            .HasDataLabels = True

            .DataLabels.NumberFormat = "##.##"

        End With

    End If

End With

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

Use DataLabels(Index), where Index is the data label index number, to return a single DataLabel object. The following example sets the number format for the fifth data label in the first series of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With Chart.SeriesCollection(1).DataLabels(5)

            .NumberFormat = "0.000"

        End With

    End If

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

DataLabels Object Members


PublishObjects.Parent Property (PowerPoint)

 Copy code hover
[image]

PublishObjects.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a PublishObjects object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

PublishObjects Object

Other resources

PublishObjects Object Members


ShapeRange.AutoShapeType Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.AutoShapeType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the shape type for the specified ShapeRange object, which must represent an AutoShape other than a line, freeform drawing, or connector. Read/write.

Syntax

expression .AutoShapeType

expression A variable that represents a ShapeRange object.

Return Value

MsoAutoShapeType

Remarks

Use the Type property of the ConnectorFormat object to set or return the connector type.

Example

This example replaces all 16-point stars with 32-point stars in myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)
For Each s In myDocument.Shapes
    If s.AutoShapeType = msoShape16pointStar Then
        s.AutoShapeType = msoShape32pointStar
    End If
Next
Note Note

When you change the type of a shape, the shape retains its size, color, and other attributes.

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


How to: Set Control Properties

 Copy code hover
[image]

How to: Set Control Properties
Send feedback

You can set some control properties at design time (before any macro is running). In design mode, right-click a control and click Properties to display the Properties window. Property names are shown in the left column in the window, property values in the right column. You set a property value by entering the new value to the right of the property name.


AnimationBehavior.ColorEffect Property (PowerPoint)

 Copy code hover
[image]

AnimationBehavior.ColorEffect Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a ColorEffect object that represents the color properties for a specified animation behavior.

Syntax

expression .ColorEffect

expression A variable that represents an AnimationBehavior object.

Return Value

ColorEffect

Example

This example adds a shape to the first slide of the active presentation and sets a color effect behavior to change the fill color of the new shape.

VBA Copy code Copy code
Sub ChangeColorEffect()

    Dim sldFirst As Slide

    Dim shpHeart As Shape

    Dim effNew As Effect

    Dim bhvEffect As AnimationBehavior

    Set sldFirst = ActivePresentation.Slides(1)

    Set shpHeart = sldFirst.Shapes.AddShape(Type:=msoShapeHeart, _

        Left:=100, Top:=100, Width:=100, Height:=100)

    Set effNew = sldFirst.TimeLine.MainSequence.AddEffect _

        (Shape:=shpHeart, EffectID:=msoAnimEffectChangeFillColor, _

        Trigger:=msoAnimTriggerAfterPrevious)

    Set bhvEffect = effNew.Behaviors.Add(Type:=msoAnimTypeColor)

    With bhvEffect.ColorEffect

        .From.RGB = RGB(Red:=255, Green:=0, Blue:=0)

        .To.RGB = RGB(Red:=0, Green:=0, Blue:=255)

    End With

End Sub

See also

Concepts

AnimationBehavior Object

Other resources

AnimationBehavior Object Members


PlaceholderFormat Members (PowerPoint)

 Copy code hover
[image]

PlaceholderFormat Members (PowerPoint)
Send feedback

Published: July 16, 2012

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

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
ContainedType | Returns the type of the shape that contains the specified placeholder format. Read-only.
Name | Returns or sets the name of the specified object. Read/write.
Parent | Returns the parent object for the specified object.
Type | Represents the type of placeholder. Read-only.


Shape.IncrementLeft Method (PowerPoint)

 Copy code hover
[image]

Shape.IncrementLeft Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Moves the specified shape horizontally by the specified number of points.

Syntax

expression .IncrementLeft(Increment)

expression A variable that represents a Shape object.

Parameters

Name | Required/Optional | Data Type | Description
Increment | Required | Single | Specifies how far the shape is to be moved horizontally, in points. A positive value moves the shape to the right; a negative value moves it to the left.

Example

This example duplicates shape one on myDocument, sets the fill for the duplicate, moves it 70 points to the right and 50 points up, and rotates it 30 degrees clockwise.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(1).Duplicate

    .Fill.PresetTextured msoTextureGranite

    .IncrementLeft 70

    .IncrementTop -50

    .IncrementRotation 30

End With

See also

Concepts

Shape Object

Other resources

Shape Object Members


AnimationSettings.ChartUnitEffect Property (PowerPoint)

 Copy code hover
[image]

AnimationSettings.ChartUnitEffect Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets a value that indicates whether the graph range is animated by series, category, or element. Read/write.

Syntax

expression .ChartUnitEffect

expression A variable that represents a AnimationSettings object.

Return Value

PpChartUnitEffect

Remarks

If your graph doesn't become animated, make sure that the Animate property is set to True

The value of the ChartUnitEffect property can be one of these PpChartUnitEffect constants.

ppAnimateByCategory

ppAnimateByCategoryElements

ppAnimateBySeries

ppAnimateBySeriesElements

ppAnimateChartAllAtOnce

ppAnimateChartMixed

Example

This example sets shape two on slide three in the active presentation to be animated by series. Shape two must be a graph for this to work.

VBA Copy code Copy code
With ActivePresentation.Slides(3).Shapes(2)

    With .AnimationSettings

        .ChartUnitEffect = ppAnimateBySeries

        .EntryEffect = ppEffectFlyFromLeft

        .Animate = True

    End With

End With

See also

Concepts

AnimationSettings Object

Other resources

AnimationSettings Object Members


Guides.Item Method (PowerPoint)

 Copy code hover
[image]

Guides.Item Method (PowerPoint)
Send feedback

Returns a Guide object from the collection.

Version information

Version Added: PowerPoint 2013

Syntax

expression .Item(Index)

expression A variable that represents a Guides object.

Parameters

Name | Required/Optional | Data type | Description
Index | Required | Integer | The index number of the single Guide object in the collection to be returned.
Index | Required | INT |

Return value

Guide


PpSlideShowState Enumeration (PowerPoint)

 Copy code hover
[image]

PpSlideShowState Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Constants that specify the state of the slide show, passed to and returned by the State property of the SlideShowView object.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppSlideShowBlackScreen | 3 | Black screen
ppSlideShowDone | 5 | Done
ppSlideShowPaused | 2 | Paused
ppSlideShowRunning | 1 | Running
ppSlideShowWhiteScreen | 4 | White screen


AnimationPoints Members (PowerPoint)

 Copy code hover
[image]

AnimationPoints Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a collection of animation points for a PropertyEffect object.

Methods

Name | Description
Add | Returns an AnimationPoint object that represents a new animation point.
Item | Returns a single AnimationPoint object from the specified AnimationPoints collection.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.
Smooth | Determines whether the transition from one animation point to another is smoothed. Read/write.


Chart.Title Property (PowerPoint)

 Copy code hover
[image]

Chart.Title Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Gets or sets a String that represents the title of the chart. Read/write.

Syntax

expression .Title

expression A variable that represents a Chart object.

See also

Concepts

Chart Object

Other resources

Chart Object Members


Legend.Clear Method (PowerPoint)

 Copy code hover
[image]

Legend.Clear Method (PowerPoint)
See also Send feedback

Clears the entire object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Clear

expression A variable that represents a Legend object.

See also

Concepts

Legend Object

Other resources

Legend Object Members


ExtraColors.Count Property (PowerPoint)

 Copy code hover
[image]

ExtraColors.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents an ExtraColors object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

ExtraColors Object

Other resources

ExtraColors Object Members


ChartData Methods (PowerPoint)

 Copy code hover
[image]

ChartData Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Activate | Activates the first window of the workbook associated with the chart.
ActivateChartDataWindow | Opens a Microsoft Excel 2013 data grid window that contains the full source data for the specified chart.
BreakLink | Removes the link between the data for a chart and a Microsoft Excel workbook.


TextStyleLevel.Parent Property (PowerPoint)

 Copy code hover
[image]

TextStyleLevel.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a TextStyleLevel object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

TextStyleLevel Object

Other resources

TextStyleLevel Object Members


Options.ShowCoauthoringMergeChanges Property (PowerPoint)

 Copy code hover
[image]

Options.ShowCoauthoringMergeChanges Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the show changes mode. Read/write.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .ShowCoauthoringMergeChanges

expression A variable that represents an Options object.

Return Value

MsoTriState

Remarks

Set this value to msoTrue for the application to show changes. The default value is msoFalse.

See also

Concepts

Options Object

Other resources

Options Object Members


FileConverters Properties (PowerPoint)

 Copy code hover
[image]

FileConverters Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Count | Returns a Long that represents the number of file converters in the collection. Read-only.


Sequence Members (PowerPoint)

 Copy code hover
[image]

Sequence Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a collection of Effect objects for a slide's interactive animation sequences. The Sequence collection is a member of the Sequences collection.

Methods

Name | Description
AddEffect | Returns an Effect object that represents a new animation effect added to a sequence of animation effects.
AddTriggerEffect | Adds a trigger effect to the animation in a Sequence object.
Clone | Creates a copy of an Effect object, and adds it to the Sequences collection at the specified index position.
ConvertToAfterEffect | Specifies what an effect should do after it is finished. Returns an Effect object that represents an after effect.
ConvertToAnimateBackground | Determines whether the background will be animated separately from, or in addition to, its accompanying text. Returns an Effect object representing the newly-modified animation effect.
ConvertToAnimateInReverse | Determines whether text will be animated in reverse order. Returns an Effect object representing the text animation.
ConvertToBuildLevel | Changes the build level information for a specified animation effect. Returns an Effect object that represents the build level information.
ConvertToTextUnitEffect | Returns an Effect object that represents how text should be animated.
FindFirstAnimationFor | Returns an Effect object that represents the first animation for a given shape.
FindFirstAnimationForClick | Returns an Effect object that represents the first animation started by the specified click number.
Item | Returns a single Effect object from the specified Sequence collection.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


PublishObject Members (PowerPoint)

 Copy code hover
[image]

PublishObject Members (PowerPoint)
Send feedback

Published: July 12, 2012

Represents a complete or partial loaded presentation that is available for publishing to HTML. The PublishObject object is a member of the PublishObjects collection.

Methods

Name | Description
Publish | Creates a Web presentation (HTML format) from any loaded presentation. You can view the published presentation in a Web browser.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
FileName | Returns or sets the path and file name of the Web presentation created when all or part of the active presentation is published. Read/write.
HTMLVersion | Returns or sets the version of HTML for a published presentation. Read/write.
Parent | Returns the parent object for the specified object.
RangeEnd | Returns or sets the number of the last slide in a range of slides you are publishing as a Web presentation. Read/write.
RangeStart | Returns or sets the number of the first slide in a range of slides you are publishing as a Web presentation. Read/write.
SlideShowName | Returns or sets the name of the custom slide show to be published as a Web presentation. Read/write.
SourceType | Returns or sets the source type of the presentation to be published to HTML. Read/write.
SpeakerNotes | Determines whether speaker notes are to be published with the presentation. Read/write.


ShapeRange.UpgradeMedia Method (PowerPoint)

 Copy code hover
[image]

ShapeRange.UpgradeMedia Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Upgrades media within the specified ShapeRange object.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .UpgradeMedia

expression A variable that represents a ShapeRange object.

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


SlideShowWindows.Application Property (PowerPoint)

 Copy code hover
[image]

SlideShowWindows.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a SlideShowWindows object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

SlideShowWindows Object

Other resources

SlideShowWindows Object Members


DataLabel.ShowBubbleSize Property (PowerPoint)

 Copy code hover
[image]

DataLabel.ShowBubbleSize Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True to show the bubble size for the data labels on a chart. False to hide the bubble size. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ShowBubbleSize

expression A variable that represents a DataLabel object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example shows the bubble size for the data labels of the first series on the first chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).DataLabels. _

            ShowBubbleSize = True

    End If

End With

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


Presentation.CustomerData Property (PowerPoint)

 Copy code hover
[image]

Presentation.CustomerData Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a CustomerData object. Read-only.

Syntax

expression .CustomerData

expression An expression that returns a Presentation object.

Return Value

CustomerData

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


PropertyEffect.Parent Property (PowerPoint)

 Copy code hover
[image]

PropertyEffect.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a PropertyEffect object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

PropertyEffect Object

Other resources

PropertyEffect Object Members


Panes Object (PowerPoint)

 Copy code hover
[image]

Panes Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

A collection of Pane objects that represent the slide, outline, and notes panes in the document window for normal view, or the single pane of any other view in the document window.

Remarks

In normal view, the Panes collection contains three members. All other document window views have only a single pane, resulting in a Panes collection with one member.

Example

Use the Panes property to return the Panes collection. The following example tests for the number of panes in the active window. If the value is one, indicating any view other that normal view, then normal view is activated and the vertical pane divider is set to divide the document window at 15% outline pane and 85% slide pane.

VBA Copy code Copy code
With ActiveWindow

    If .Panes.Count = 1 Then

        .ViewType = ppViewNormal

        .SplitHorizontal = 15

    End If

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

Panes Object Members


ChartData Members (PowerPoint)

 Copy code hover
[image]

ChartData Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents access to the linked or embedded data associated with a chart.

Methods

Name | Description
Activate | Activates the first window of the workbook associated with the chart.
ActivateChartDataWindow | Opens a Microsoft Excel 2013 data grid window that contains the full source data for the specified chart.
BreakLink | Removes the link between the data for a chart and a Microsoft Excel workbook.

Properties

Name | Description
IsLinked | True if the data for the chart is linked to an external Microsoft Excel workbook. Read-only Boolean.
Workbook | Returns the workbook that contains the chart data associated with the chart. Read-only Object.


Application.SlideSelectionChanged Event (PowerPoint)

 Copy code hover
[image]

Application.SlideSelectionChanged Event (PowerPoint)
See also Send feedback

Published: July 16, 2012

Occurs at different times depending on the current view.

Syntax

expression .SlideSelectionChanged(SldRange)

expression A variable that represents an Application object.

Parameters

Name | Required/Optional | Data Type | Description
SldRange | Required | SlideRange | The selection of slides. In most cases this would be a single slide (for example, in Slide View you navigate to the next slide), but in some cases this could be multiple slides (for example, a marquee selection in Slide Sorter View).

Remarks

To access the Application events, declare an Application variable in the General Declarations section of your code. Then set the variable equal to the Application object for which you want to access events. For information about using events with the Microsoft PowerPoint Application object, see How to: Use Events with the Application Object.

The following table describes when the event occurs in each of the views.

View | Description
Normal, Master | Occurs when the slide in the slide pane changes.
Slide Sorter | Occurs when the selection changes.
Slide, Notes | Occurs when the slide changes.
Outline | Does not occur.

Example

This example displays a message every time a user selects a different slide. This example assumes that an Application object called PPTApp has been declared by using the WithEvents keyword.

VBA Copy code Copy code
Private Sub PPTApp_SlideSelectionChanged(ByVal SldRange As SlideRange)

    MsgBox "Slide selection changed."

End Sub

See also

Concepts

Application Object

Other resources

Application Object Members


AxisTitle.Format Property (PowerPoint)

 Copy code hover
[image]

AxisTitle.Format Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Format

expression A variable that represents an AxisTitle object.

See also

Concepts

AxisTitle Object

Other resources

AxisTitle Object Members


Selection Object (PowerPoint)

 Copy code hover
[image]

Selection Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the selection in the specified document window. The Selection object is deleted whenever you change slides in an active slide view (the Type property will return ppSelectionNone).

Example

Use the Selection property to return the Selection object. The following example places a copy of the selection in the active window on the Clipboard.

Copy code Copy code
ActiveWindow.Selection.Copy

Use the ShapeRange , SlideRange , or TextRange property to return a range of shapes, slides, or text from the selection.

The following example sets the fill foreground color for the selected shapes in window two, assuming that there's at least one shape selected, and assuming that all selected shapes have a fill whose forecolor can be set.

VBA Copy code Copy code
With Windows(2).Selection.ShapeRange.Fill

    .Visible = True

    .ForeColor.RGB = RGB(255, 0, 255)

End With

The following example sets the text in the first selected shape in window two if that shape contains a text frame.

VBA Copy code Copy code
With Windows(2).Selection.ShapeRange(1)

    If .HasTextFrame Then

        .TextFrame.TextRange = "Current Choice"

    End If

End With

The following example cuts the selected text in the active window and places it on the Clipboard.

VBA Copy code Copy code
ActiveWindow.Selection.TextRange.Cut

The following example duplicates all the slides in the selection (if you're in slide view, this duplicates the current slide).

VBA Copy code Copy code
ActiveWindow.Selection.SlideRange.Duplicate

If you don't have an object of the appropriate type selected when you use one of these properties (for instance, if you use the ShapeRange property when there are no shapes selected), an error occurs. Use the Type property to determine what kind of object or objects are selected. The following example checks to see whether the selection contains slides. If the selection does contain slides, the example sets the background for the first slide in the selection.

VBA Copy code Copy code
With Windows(2).Selection

    If .Type = ppSelectionSlides Then

        With .SlideRange(1)

            .FollowMasterBackground = False

            .Background.Fill.PresetGradient _

                msoGradientHorizontal, 1, msoGradientLateSunset

        End With

    End If

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

Selection Object Members


HeaderFooter Properties (PowerPoint)

 Copy code hover
[image]

HeaderFooter Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Format | Returns or sets the format for the automatically updated date and time. Read/write.
Parent | Returns the parent object for the specified object.
Text | Returns or sets a String that represents the text contained in the specified object. Read/write.
UseFormat | Determines whether the date and time object contains automatically updated information. Read/write.
Visible | Returns or sets the visibility of the specified object or the formatting applied to the specified object. Read/write.


PpSoundFormatType Enumeration (PowerPoint)

 Copy code hover
[image]

PpSoundFormatType Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Constants that specify the format of a sound file. In previous versions of Microsoft PowerPoint, these constants were passed to the Export method of the SoundFormat object and returned by the Type property of that object. In Microsoft Office PowerPoint 2007, the SoundFormat object was deprecated.

Name | Value | Description
ppSoundFormatCDAudio | 3 | CD Audio format
ppSoundFormatMIDI | 2 | MIDI format
ppSoundFormatMixed | -2 | Mixed format
ppSoundFormatNone | 0 | No format
ppSoundFormatWAV | 1 | WAV format


View.MediaControlsWidth Property (PowerPoint)

 Copy code hover
[image]

View.MediaControlsWidth Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the width, in points, of the media control bounding box. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .MediaControlsWidth

expression A variable that represents a View object.

Return Value

Single

See also

Concepts

View Object

Other resources

View Object Members


Axis.HasMajorGridlines Property (PowerPoint)

 Copy code hover
[image]

Axis.HasMajorGridlines Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if the axis has major gridlines. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .HasMajorGridlines

expression A variable that represents an Axis object.

Remarks

Only axes in the primary axis group can have gridlines.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the color of the major gridlines for the value axis of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.Axes(xlValue)

            If .HasMajorGridlines Then

                ' Set the color to red.

                .MajorGridlines.Border.ColorIndex = 3

            End If

        End With

    End If

End With

See also

Concepts

Axis Object

Other resources

Axis Object Members


TextFrame2 Methods (PowerPoint)

 Copy code hover
[image]

TextFrame2 Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
DeleteText | Deletes the text from a text frame and all the associated properties of the text, including font attributes.


NamedSlideShow Members (PowerPoint)

 Copy code hover
[image]

NamedSlideShow Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a custom slide show, which is a named subset of slides in a presentation.

Methods

Name | Description
Delete | Deletes the specified NamedSlideShow object.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Name | You cannot use this property to set the name for a custom slide show. Use the Add method to redefine a custom slide show under a new name. Read-only.
Parent | Returns the parent object for the specified object.
SlideIDs | Returns an array of slide IDs for the specified named slide show. Read-only.


PpSoundEffectType Enumeration (PowerPoint)

 Copy code hover
[image]

PpSoundEffectType Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Constants that specify the type of sound effect, passed to and returned by the Type property of the SoundEffect object.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppSoundEffectsMixed | -2 | Mixed
ppSoundFile | 2 | File
ppSoundNone | 0 | None
ppSoundStopPrevious | 1 | Stop Previous


FillFormat.PresetGradientType Property (PowerPoint)

 Copy code hover
[image]

FillFormat.PresetGradientType Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the preset gradient type for the specified fill. Read-only.

Syntax

expression .PresetGradientType

expression A variable that represents a FillFormat object.

Return Value

MsoPresetGradientType

Remarks

Use the PresetGradient method to set the preset gradient type for the fill.

The value of the PresetGradientType property can be one of these MsoPresetGradientType constants.

msoGradientBrass

msoGradientCalmWater

msoGradientChrome

msoGradientChromeII

msoGradientDaybreak

msoGradientDesert

msoGradientEarlySunset

msoGradientFire

msoGradientFog

msoGradientGold

msoGradientGoldII

msoGradientHorizon

msoGradientLateSunset

msoGradientMahogany

msoGradientMoss

msoGradientNightfall

msoGradientOcean

msoGradientParchment

msoGradientPeacock

msoGradientRainbow

msoGradientRainbowII

msoGradientSapphire

msoGradientSilver

msoGradientWheat

msoPresetGradientMixed

Example

This example changes the fill for all shapes in myDocument with the Moss preset gradient fill to the Fog preset gradient fill.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

For Each s In myDocument.Shapes

    With s.Fill

        If .PresetGradientType = msoGradientMoss Then

            .PresetGradient = msoGradientFog

        End If

    End With

Next

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


FileConverter Members (PowerPoint)

 Copy code hover
[image]

FileConverter Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a file converter that is used to open or save files. The FileConverter object is a member of the FileConverters collection. The FileConverters collection contains all the installed file converters for opening and saving files.

Properties

Name | Description
Application | Returns an Application object that represents the Microsoft PowerPoint application.
CanOpen | True if the specified file converter is designed to open files. Read-only Boolean.
CanSave | True if the specified file converter is designed to save files. Read-only Boolean.
ClassName | Returns a unique name that identifies the file converter. Read-only String.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Extensions | Returns the file name extensions associated with the specified FileConverter object. Read-only String.
FormatName | Returns the name of the specified file converter. Read-only String.
Name | Returns the name of the specified object. Read-only String.
OpenFormat | Returns the file format of the specified file converter. Read-only Long.
Parent | Returns an Object that represents the parent object of the specified FileConverter object.
Path | Returns the disk or Web path to the specified object. Read-only String.
SaveFormat | Returns the file format of the specified document or file converter. Read-only Long.


Office 2013 documentation copyright notice

 Copy code hover
[image]

Office 2013 documentation copyright notice
Send feedback

Published: July 16, 2012

This document is provided "as-is". Information and views expressed in this document, including URL and other Internet Web site references, may change without notice. You bear the risk of using it.

Some examples depicted herein are provided for illustration only and are fictitious. No real association or connection is intended or should be inferred.

This document does not provide you with any legal rights to any intellectual property in any Microsoft product. You may copy and use this document for your internal, reference purposes.

© 2013 Microsoft Corporation. All rights reserved.

Microsoft, Access, ActiveX, ClearType, Excel, FrontPage, InfoPath, IntelliSense, JScript, MSDN, MS-DOS, MSN, OneNote, Outlook, PowerPoint, SharePoint, Silverlight, SmartArt, SQL Server, Visio, Visual Basic, Visual C#, Visual C++, Visual Studio, Win32, Windows, Windows PowerShell, Windows Server, and Windows Vista are trademarks of the Microsoft group of companies.

All other trademarks are property of their respective owners.


ShapeRange.BlackWhiteMode Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.BlackWhiteMode Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a value that indicates how the specified shape appears when the presentation is viewed in black-and-white mode. Read/write.

Syntax

expression .BlackWhiteMode

expression A variable that represents a ShapeRange object.

Return Value

MsoBlackWhiteMode

Remarks

The value of the BlackWhiteMode property can be one of these MsoBlackWhiteMode constants.

msoBlackWhiteAutomatic

msoBlackWhiteBlack

msoBlackWhiteBlackTextAndLine

msoBlackWhiteDontShow

msoBlackWhiteGrayOutline

msoBlackWhiteGrayScale

msoBlackWhiteHighContrast

msoBlackWhiteInverseGrayScale

msoBlackWhiteLightGrayScale

msoBlackWhiteMixed

msoBlackWhiteWhite

Example

This example sets shape one on myDocument to appear in black-and-white mode. When you view the presentation in black-and-white mode, shape one will appear black, regardless of what color it is in color mode.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes(1).BlackWhiteMode = msoBlackWhiteBlack

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


SoundEffect.Application Property (PowerPoint)

 Copy code hover
[image]

SoundEffect.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a SoundEffect object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

SoundEffect Object

Other resources

SoundEffect Object Members


MediaFormat.IsLinked Property (PowerPoint)

 Copy code hover
[image]

MediaFormat.IsLinked Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns whether the media file is linked. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .IsLinked

expression An expression that returns a MediaFormat object.

Return Value

Boolean

See also

Concepts

MediaFormat Object

Other resources

MediaFormat Object Members


CustomerData Methods (PowerPoint)

 Copy code hover
[image]

CustomerData Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Add | Adds a CustomXMLPart to the CustomerData collection of a CustomLayout, Master, Presentation, Shape, or Slide object and returns the CustomXMLPart object created.
Delete | Deletes the specified CustomXMLPart object from the CustomerData collection of a CustomLayout, Master, Presentation, Shape, or Slide object.
Item | Returns the specified CustomXMLPart object from the CustomerData collection. Read-only.


Axis.Width Property (PowerPoint)

 Copy code hover
[image]

Axis.Width Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the width, in points, of the object. Read-only Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Width

expression A variable that represents an Axis object.

See also

Concepts

Axis Object

Other resources

Axis Object Members


SlideRange.Export Method (PowerPoint)

 Copy code hover
[image]

SlideRange.Export Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Exports a range of slides, using the specified graphics filter, and saves the exported file under the specified file name.

Syntax

expression .Export(FileName, FilterName, ScaleWidth, ScaleHeight)

expression A variable that represents a SlideRange object.

Parameters

Name | Required/Optional | Data Type | Description
FileName | Required | String | The name of the file to be exported and saved to disk. You can include a full path; if you don't, Microsoft PowerPoint creates a file in the current folder.
FilterName | Required | String | The graphics format in which you want to export slides. The specified graphics format must have an export filter registered in the Windows registry. You can specify either the registered extension or the registered filter name. Microsoft PowerPoint will first search for a matching extension in the registry. If no extension that matches the specified string is found, PowerPoint will look for a filter name that matches.
ScaleWidth | Optional | Long | The width in pixels of an exported slide.
ScaleHeight | Optional | Long | The height in pixels of an exported slide.

Remarks

Exporting a presentation doesn't set the Saved property of a presentation to True.

PowerPoint uses the specified graphics filter to save each individual slide. The names of the slides exported and saved to disk are determined by PowerPoint. They are typically saved by using the following naming convention: Slide1.wmf, Slide2.wmf. The path of the saved files is specified in the FileName argument.

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


TextRange.ChangeCase Method (PowerPoint)

 Copy code hover
[image]

TextRange.ChangeCase Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Changes the case of the specified text.

Syntax

expression .ChangeCase(Type)

expression A variable that represents a TextRange object.

Parameters

Name | Required/Optional | Data Type | Description
Type | Required | PpChangeCase | Specifies the way the case will be changed.

Example

This example sets title case capitalization for the title on slide one in the the active presentation.

VBA Copy code Copy code
Application.ActivePresentation.Slides(1).Shapes.Title.TextFrame _

    .TextRange.ChangeCase ppCaseTitle

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


DataLabel Object (PowerPoint)

 Copy code hover
[image]

DataLabel Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the data label on a chart point or trendline.

Version Information

Version Added: PowerPoint 2007

Remarks

On a series, the DataLabel object is a member of the DataLabels collection. The DataLabels collection contains a DataLabel object for each point. For a series without definable points (such as an area series), the DataLabels collection contains a single DataLabel object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

Use DataLabels(Index), where Index is the data label index number, to return a single DataLabel object. The following example sets the number format for the fifth data label in the first series of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).DataLabels(5).NumberFormat = "0.000"

    End If

End With

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

Use the Point.DataLabel property to return the DataLabel object for a single point. The following example turns on the data label for the second point in the first series of the first chart in the active document and sets the data label text to "Saturday."

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.SeriesCollection(1).Points(2)

            .HasDataLabel = True

            .DataLabel.Text = "Saturday"

        End With

    End If

End With

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

On a trendline, the Trendline.DataLabel property returns the text shown with the trendline. This can be the equation, the R-squared value, or both (if both are showing). The following example sets the trendline text for the first trendline in the first series of the first chart in the active document to show only the equation.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.SeriesCollection(1).Trendlines(1)

            .DisplayRSquared = False

            .DisplayEquation = True

        End With

    End If

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

DataLabel Object Members


ChartGroup.FullCategoryCollection Method (PowerPoint)

 Copy code hover
[image]

ChartGroup.FullCategoryCollection Method (PowerPoint)
Send feedback

Returns all the categories in the chart group, or the specified category, whether visible or filtered out.

Version information

Version Added: PowerPoint 2013

Syntax

expression .FullCategoryCollection(Index)

expression A variable that represents a ChartGroup object.

Parameters

Name | Required/Optional | Data type | Description
Index | Optional | Variant | The index number in the full category collection of the category to return.
Index | Optional | VARIANT |

Return value

OBJECT


FillFormat.PresetTextured Method (PowerPoint)

 Copy code hover
[image]

FillFormat.PresetTextured Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets the specified fill to a preset texture.

Syntax

expression .PresetTextured(PresetTexture)

expression A variable that represents a FillFormat object.

Parameters

Name | Required/Optional | Data Type | Description
PresetTexture | Required | MsoPresetTexture | The preset texture.

Remarks

The value of the PresetTexturedargument can be one of these MsoPresetTexture constants.

msoPresetTextureMixed

msoTextureBlueTissuePaper

msoTextureBouquet

msoTextureBrownMarble

msoTextureCanvas

msoTextureCork

msoTextureDenim

msoTextureFishFossil

msoTextureGranite

msoTextureGreenMarble

msoTextureMediumWood

msoTextureNewsprint

msoTextureOak

msoTexturePaperBag

msoTexturePapyrus

msoTextureParchment

msoTexturePinkTissuePaper

msoTexturePurpleMesh

msoTextureRecycledPaper

msoTextureSand

msoTextureStationery

msoTextureWalnut

msoTextureWaterDroplets

msoTextureWhiteMarble

msoTextureWovenMat

Example

This example adds a rectangle with a green-marble textured fill to myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes.AddShape(msoShapeCan, 90, 90, 40, 80) _

    .Fill.PresetTextured msoTextureGreenMarble

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


PlaySettings.PauseAnimation Property (PowerPoint)

 Copy code hover
[image]

PlaySettings.PauseAnimation Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the slide show pauses until the specified media clip is finished playing. Read/write.

Syntax

expression .PauseAnimation

expression A variable that represents a PlaySettings object.

Return Value

MsoTriState

Remarks

For the PauseAnimation property setting to take effect, the PlayOnEntry property of the specified shape must be set to msoTrue.

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

Constant | Description
msoFalse | The slide show continues while the media clip plays in the background.
msoTrue | The slide show pauses until the specified media clip is finished playing.

Example

This example specifies that shape three on slide one in the active presentation will be played automatically when it is animated and that the slide show won't continue while the movie is playing in the background. Shape three must be a sound or movie object.

VBA Copy code Copy code
Set OLEobj = ActivePresentation.Slides(1).Shapes(3)

With OLEobj.AnimationSettings.PlaySettings

    .PlayOnEntry = msoTrue

    .PauseAnimation = msoTrue

End With

See also

Concepts

PlaySettings Object

Other resources

PlaySettings Object Members


XlLegendPosition Enumeration (PowerPoint)

 Copy code hover
[image]

XlLegendPosition Enumeration (PowerPoint)
Send feedback

Published: July 12, 2012

Specifies the position of the legend on a chart.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlLegendPositionBottom | -4107 | Below the chart.
xlLegendPositionCorner | 2 | In the upper-right corner of the chart border.
xlLegendPositionCustom | -4161 | A custom position.
xlLegendPositionLeft | -4131 | Left of the chart.
xlLegendPositionRight | -4152 | Right of the chart.
xlLegendPositionTop | -4160 | Above the chart.


Axis.BaseUnit Property (PowerPoint)

 Copy code hover
[image]

Axis.BaseUnit Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets the base unit for the specified category axis. Read/write XlTimeUnit.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .BaseUnit

expression A variable that represents an Axis object.

Remarks

Setting this property has no visible effect if the CategoryType property for the specified axis is set to xlCategoryScale. The set value is retained, however, and takes effect when the CategoryType property is set to xlTimeScale.

You cannot set this property for a value axis.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the category axis for the first chart in the active document to use a time scale, using months as the base unit.

VBA Copy code Copy code

With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart

            .Axes(xlCategory).CategoryType = xlTimeScale

            .Axes(xlCategory).BaseUnit = xlMonths

        End With

    End If

End With

See also

Concepts

Axis Object

Other resources

Axis Object Members


TextFrame Methods (PowerPoint)

 Copy code hover
[image]

TextFrame Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
DeleteText | Deletes the text associated with the specified shape.


ScaleEffect.FromY Property (PowerPoint)

 Copy code hover
[image]

ScaleEffect.FromY Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a Single that represents the starting height of a ScaleEffect object, specified as a percentage of the screen width. Read/write.

Syntax

expression .FromY

expression A variable that represents a ScaleEffect object.

Return Value

Single

Remarks

The default value of this property is Empty, in which case the current position of the object is used.

Use this property in conjunction with the ToY property to resize or jump from one position to another.

Do not confuse this property with the From property of the ColorEffect , RotationEffect , or PropertyEffect objects, which is used to set or change colors, rotations, or other properties of an animation behavior, respectively.

See also

Concepts

ScaleEffect Object

Other resources

ScaleEffect Object Members


ColorScheme.Parent Property (PowerPoint)

 Copy code hover
[image]

ColorScheme.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a ColorScheme object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

ColorScheme Object

Other resources

ColorScheme Object Members


Application.SlideShowNextSlide Event (PowerPoint)

 Copy code hover
[image]

Application.SlideShowNextSlide Event (PowerPoint)
See also Send feedback

Published: July 16, 2012

Occurs immediately before the transition to the next slide. For the first slide, occurs immediately after the SlideShowBegin event.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .SlideShowNextSlide(Wn)

expression An expression that returns a Application object.

Parameters

Name | Required/Optional | Data Type | Description
Wn | Required | SlideShowWindow | The active slide show window.

Remarks

For information about using events with the Application object, see How to: Use Events with the Application Object.

Example

This example determines the slide position for the slide following the SlideShowNextSlide event. If the next slide is slide three, the example changes the type of pointer to a pen and the pen color to red.

VBA Copy code Copy code
Private Sub App_SlideShowNextSlide(ByVal Wn As SlideShowWindow)

   Dim Showpos As Integer

   Showpos = Wn.View.CurrentShowPosition + 1

If Showpos = 3 Then

         With ActivePresentation.SlideShowSettings.Run.View

            .PointerColor.RGB = RGB(255, 0, 0)

            .PointerType = ppSlideShowPointerPen

         End With

      Else

         With ActivePresentation.SlideShowSettings.Run.View

            .PointerColor.RGB = RGB(0, 0, 0)

            .PointerType = ppSlideShowPointerArrow

         End With

      End If

End Sub

This example sets a global counter variable to zero. Then it calculates the number of shapes on the slide following this event, determines which shapes have animation, and fills a global array with the animation order and the number of each shape.

Note Note

The array created in this example is also used in the SlideShowNextBuild event example.

VBA Copy code Copy code
Private Sub App_SlideShowNextSlide(ByVal Wn As SlideShowWindow)

   Dim i as Integer, j as Integer, numShapes As Integer

   Dim objSld As Slide

   Set objSld = ActivePresentation.Slides _

        (ActivePresentation.SlideShowWindow.View _

        .CurrentShowPosition + 1)

      With objSld.Shapes

         numShapes = .Count

         If numShapes > 0 Then

            j = 1

            ReDim shpAnimArray(1 To 2, 1 To numShapes)

            For i = 1 To numShapes

               If .Item(i).AnimationSettings.Animate Then

                  shpAnimArray(1, j) = _

                     .Item(i).AnimationSettings.AnimationOrder

                     shpAnimArray(2, j) = i

                     j = j + 1

               End If

            Next

         End If

      End With

End Sub

See also

Concepts

Application Object

Other resources

Application Object Members


Chart.SetDefaultChart Method (PowerPoint)

 Copy code hover
[image]

Chart.SetDefaultChart Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Specifies the name of the chart template that Microsoft Word uses when it creates new charts.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .SetDefaultChart(Name)

expression A variable that represents a Chart object.

Parameters

Name | Required/Optional | Data Type | Description
Name | Required | Variant | Specifies the name of the default chart template that Word uses when it creates new charts. This name can be set to either the name of a user-defined chart template in the gallery or a special XlChartGallery constant, xlBuiltIn, to specify a built-in chart template.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the default chart template to a custom chart template named "Monthly Sales."

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SetDefaultChart Name:="Monthly Sales"

    End If

End With

See also

Concepts

Chart Object

Other resources

Chart Object Members


Shape.Parent Property (PowerPoint)

 Copy code hover
[image]

Shape.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a Shape object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

Shape Object

Other resources

Shape Object Members


Presentation.Name Property (PowerPoint)

 Copy code hover
[image]

Presentation.Name Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

The name of the presentation includes the file name extension (for file types that are registered) but doesn't include its path. You cannot use this property to set the name. Use the SaveAs method to save the presentation under a different name if you need to change the name. Read-only.

Syntax

expression .Name

expression A variable that represents a Presentation object.

Return Value

String

Remarks

You can use the object's name in conjunction with the Item method to return a reference to the object if the Item method for the collection that contains the object takes a Variant argument. For example, if the value of the Name property for a shape is Rectangle 2, then .Shapes("Rectangle 2") will return a reference to that shape.

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


Slide.Duplicate Method (PowerPoint)

 Copy code hover
[image]

Slide.Duplicate Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Creates a duplicate of the specified Slide object, adds the new slide to the Slides collection immediately after the slide specified originally, and then returns a Slide object that represents the duplicate slide.

Syntax

expression .Duplicate

expression A variable that represents a Slide object.

Return Value

SlideRange

Example

This example creates a duplicate of slide one in the active presentation and then sets the background shading and the title text of the new slide. The new slide will be slide two in the presentation.

VBA Copy code Copy code
Set newSlide = ActivePresentation.Slides(1).Duplicate

With newSlide

    .Background.Fill.PresetGradient msoGradientVertical, _

        1, msoGradientGold

    .Shapes.Title.TextFrame.TextRange _

        .Text = "Second Quarter Earnings"

End With

See also

Concepts

Slide Object

Other resources

Slide Object Members


Concepts (PowerPoint 2013 developer reference)

 Copy code hover
[image]

Concepts (PowerPoint 2013 developer reference)
Send feedback

This section contains the following overviews about programmability in PowerPoint:

  • Control and Dialog Box Events

  • Language-Specific Properties and Methods

  • Learn About Language-Specific Information

  • OLE Programmatic Identifiers


LeaderLines.Select Method (PowerPoint)

 Copy code hover
[image]

LeaderLines.Select Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Selects the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Select

expression A variable that represents a LeaderLines object.

See also

Concepts

LeaderLines Object

Other resources

LeaderLines Object Members


ShadowFormat.IncrementOffsetY Method (PowerPoint)

 Copy code hover
[image]

ShadowFormat.IncrementOffsetY Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Changes the vertical offset of the shadow by the specified number of points.

Syntax

expression .IncrementOffsetY(Increment)

expression A variable that represents an ShadowFormat object.

Parameters

Name | Required/Optional | Data Type | Description
Increment | Required | Single | Specifies how far the shadow offset is to be moved vertically, in points. A positive value moves the shadow down; a negative value moves it up.

Remarks

Use the OffsetY property to set the absolute vertical shadow offset.

Example

This example moves the shadow for shape three on myDocument up by 3 points.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes(3).Shadow.IncrementOffsetY -3

See also

Concepts

ShadowFormat Object

Other resources

ShadowFormat Object Members


Chart.ShowReportFilterFieldButtons Property (PowerPoint)

 Copy code hover
[image]

Chart.ShowReportFilterFieldButtons Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a value that indicates whether to display the report filter field buttons on a PivotChart. Read/write.

Syntax

expression .ShowReportFilterFieldButtons

expression A variable that represents a Chart object.

Return Value

Boolean

Remarks

This member is part of the shared chart object model infrastructure between Microsoft Word, Microsoft Excel, and Microsoft PowerPoint and is not meant to be called directly from your code. Reading or setting this property causes a run-time error. In PowerPoint 2013, you cannot create a PivotChart, and copying or pasting a valid PivotChart from Microsoft Excel to a Microsoft PowerPoint presentation will convert the PivotChart to a Chart.

See also

Concepts

Chart Object

Other resources

Chart Object Members


HiLoLines.Border Property (PowerPoint)

 Copy code hover
[image]

HiLoLines.Border Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the border of the object. Read-only ChartBorder.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Border

expression A variable that represents a HiLoLines object.

See also

Concepts

HiLoLines Object

Other resources

HiLoLines Object Members


TextRange.InsertSymbol Method (PowerPoint)

 Copy code hover
[image]

TextRange.InsertSymbol Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a TextRange object that represents a symbol inserted into the specified text range.

Syntax

expression .InsertSymbol(FontName, CharNumber, UniCode)

expression A variable that represents an TextRange object.

Parameters

Name | Required/Optional | Data Type | Description
FontName | Required | String | The font name.
CharNumber | Required | Long | The Unicode or ASCII character number.
Unicode | Optional | MsoTriState | Specifies whether the CharNumber argument represents an ASCII or Unicode character.

Return Value

TextRange

Remarks

The CharNumber parameter value can be one of these MsoTriState constants.

Constant | Description
msoFalse | The default. The CharNumber argument represents an ASCII character number.
msoTrue | The CharNumber argument represents a Unicode character.

Example

This example inserts the registered trademark symbol after the first sentence of the first paragraph in a new text box on the first slide in the active presentation.

VBA Copy code Copy code
Sub Symbol()

    Dim txtBox As Shape

    'Add text box

    Set txtBox = Application.ActivePresentation.Slides(1) _

        .Shapes.AddTextbox(Orientation:=msoTextOrientationHorizontal, _

            Left:=100, Top:=100, Width:=100, Height:=100)

    'Add symbol to text box

    txtBox.TextFrame.TextRange.InsertSymbol _

        FontName:="Symbol", CharNumber:=226

End Sub

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


Timing Properties (PowerPoint)

 Copy code hover
[image]

Timing Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Accelerate | Returns or sets the percentage of the duration over which a timing acceleration should take place. Read/write.
Application | Returns an Application object that represents the creator of the specified object.
AutoReverse | Determines whether an effect should play forward and then in reverse, thereby doubling its duration. Read/write.
BounceEnd | Read/write
BounceEndIntensity | Read/write
Decelerate | Sets or returns the percentageof the duration over which a timing deceleration should take place. Read/write.
Duration | Returns or sets the length of an animation in seconds. Read/write.
Parent | Returns the parent object for the specified object.
RepeatCount | Sets or returns the number of times to repeat an animation. Read/write.
RepeatDuration | Sets or returns how long repeated animations should last, in seconds. Read/write.
Restart | Represents whether the animation effect restarts after the effect has started once. Read/write.
RewindAtEnd | Represents whether an object returns to its beginning position after an animation has ended. Read/write.
SmoothEnd | Determines whether an animation should decelerate as it ends. Read/write.
SmoothStart | Determines whether an animation should accelerate when it starts. Read/write.
Speed | Returns or sets the speed, in seconds, of the specified animation. Read/write.
TriggerBookmark | Read/write
TriggerDelayTime | Sets or returns the delay, in seconds, from when an animation trigger is enabled. Read/write.
TriggerShape | Sets or returns a Shape object that represents the shape associated with an animation trigger. Read/write.
TriggerType | Represents the trigger that starts an animation. Read/write.


MediaFormat.SetDisplayPicture Method (PowerPoint)

 Copy code hover
[image]

MediaFormat.SetDisplayPicture Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets the display picture at the specified time position.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .SetDisplayPicture(Position)

expression An expression that returns a MediaFormat object.

Parameters

Name | Required/Optional | Data Type | Description
Position | Required | Long | The time position in the media to set the display picture.

Return Value

Nothing

See also

Concepts

MediaFormat Object

Other resources

MediaFormat Object Members


Chart.Floor Property (PowerPoint)

 Copy code hover
[image]

Chart.Floor Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the floor of the 3-D chart. Read-only Floor.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Floor

expression A variable that represents a Chart object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the floor color of the first chart in the active document to blue. You should run the example on a 3-D chart (the Floor property fails on 2-D charts).

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.Floor.Interior.ColorIndex = 5

    End If

End With

See also

Concepts

Chart Object

Other resources

Chart Object Members


XlEndStyleCap Enumeration (PowerPoint)

 Copy code hover
[image]

XlEndStyleCap Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the end style for error bars.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlCap | 1 | Caps are applied.
xlNoCap | 2 | No caps are applied.


HeadersFooters.Footer Property (PowerPoint)

 Copy code hover
[image]

HeadersFooters.Footer Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a HeaderFooter object that represents the footer that appears at the bottom of a slide or in the lower-left corner of a notes page, handout, or outline. Read-only.

Syntax

expression .Footer

expression A variable that represents a HeadersFooters object.

Return Value

HeaderFooter

Example

This example sets the text for the footer on the slide master in the active presentation and sets the footer, date and time, and slide number to appear on the title slide.

VBA Copy code Copy code
With Application.ActivePresentation.SlideMaster.HeadersFooters

    .Footer.Text = "Introduction"

    .DisplayOnTitleSlide = True

End With

See also

Concepts

HeadersFooters Object

Other resources

HeadersFooters Object Members


DataLabel.ReadingOrder Property (PowerPoint)

 Copy code hover
[image]

DataLabel.ReadingOrder Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets an XlReadingOrder constant that represents the reading order for the specified object. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ReadingOrder

expression A variable that represents a DataLabel object.

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


ChartFont Properties (PowerPoint)

 Copy code hover
[image]

ChartFont Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Background | Returns or sets the type of background for text used in charts. Read/write Variant that is set to one of the constants of XlBackground.
Bold | True if the font is bold. Read/write Variant.
Color | Returns or sets the primary color of the object. Read/write Variant.
ColorIndex | Returns or sets the color of the font. Read/write Variant.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
FontStyle | Returns or sets the font style. Read/write String.
Italic | True if the font style is italic. Read/write Boolean.
Name | Returns or sets the name of the object. Read/write String.
Parent | Returns the parent for the specified object. Read-only Object.
Size | Returns or sets the size of the font. Read/write Variant.
Strikethrough | True if the font is struck through with a horizontal line. Read/write Boolean.
Subscript | True if the font is formatted as subscript. The default is False. Read/write Variant.
Superscript | True if the font is formatted as superscript. The default is False. Read/write Variant.
Underline | Returns or sets the type of underline applied to the font. Can be one of the XlUnderlineStyle constants. Read/write Variant.


DisplayUnitLabel.Parent Property (PowerPoint)

 Copy code hover
[image]

DisplayUnitLabel.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents a DisplayUnitLabel object.

See also

Concepts

DisplayUnitLabel Object

Other resources

DisplayUnitLabel Object Members


Design.Name Property (PowerPoint)

 Copy code hover
[image]

Design.Name Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the name of the specified object. Read/write.

Syntax

expression .Name

expression A variable that represents a Design object.

Return Value

String

Remarks

You can use the object's name in conjunction with the Item method to return a reference to the object if the Item method for the collection that contains the object takes a Variant argument. For example, if the value of the Name property for a shape is Rectangle 2, then .Shapes("Rectangle 2") will return a reference to that shape.

See also

Concepts

Design Object

Other resources

Design Object Members


Timing.TriggerType Property (PowerPoint)

 Copy code hover
[image]

Timing.TriggerType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the trigger that starts an animation. Read/write.

Syntax

expression .TriggerType

expression A variable that represents a Timing object.

Return Value

MsoAnimTriggerType

Remarks

The value of the TriggerType property can be one of these MsoAnimTriggerType constants. The default is msoAnimTriggerOnPageClick.

msoAnimTriggerAfterPrevious

msoAnimTriggerMixed

msoAnimTriggerNone

msoAnimTriggerOnPageClick

msoAnimTriggerOnShapeClick

msoAnimTriggerWithPrevious

Example

The following example adds a shape to a slide, adds an animation to the shape, and instructs the shape to begin the animation three seconds after it is clicked.

VBA Copy code Copy code
Sub AddShapeSetTiming()

    Dim effDiamond As Effect
    Dim shpRectangle As Shape

    Set shpRectangle = ActivePresentation.Slides(1).Shapes _
        .AddShape(Type:=msoShapeRectangle, Left:=100, _
        Top:=100, Width:=50, Height:=50)
    Set effDiamond = ActivePresentation.Slides(1).TimeLine.MainSequence _
        .AddEffect(Shape:=shpRectangle, effectId:=msoAnimEffectPathDiamond)

    With effDiamond.Timing
        .Duration = 5
        .TriggerType = msoAnimTriggerWithPrevious
        .TriggerDelayTime = 3
    End With

End Sub

See also

Concepts

Timing Object

Other resources

Timing Object Members


DisplayUnitLabel.Delete Method (PowerPoint)

 Copy code hover
[image]

DisplayUnitLabel.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Delete

expression A variable that represents a DisplayUnitLabel object.

See also

Concepts

DisplayUnitLabel Object

Other resources

DisplayUnitLabel Object Members


ChartArea.Name Property (PowerPoint)

 Copy code hover
[image]

ChartArea.Name Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the name of the object. Read-only String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Name

expression A variable that represents a ChartArea object.

See also

Concepts

ChartArea Object

Other resources

ChartArea Object Members


XlHAlign Enumeration (PowerPoint)

 Copy code hover
[image]

XlHAlign Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the horizontal alignment for the object.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlHAlignCenter | -4108 | Center.
xlHAlignCenterAcrossSelection | 7 | Center across selection.
xlHAlignDistributed | -4117 | Distribute.
xlHAlignFill | 5 | Fill.
xlHAlignGeneral | 1 | Align according to data type.
xlHAlignJustify | -4130 | Justify.
xlHAlignLeft | -4131 | Left.
xlHAlignRight | -4152 | Right.


TextFrame Members (PowerPoint)

 Copy code hover
[image]

TextFrame Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents the text frame in a Shape object. Contains the text in the text frame and the properties and methods that control the alignment and anchoring of the text frame.

Methods

Name | Description
DeleteText | Deletes the text associated with the specified shape.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
AutoSize | Returns or sets a value that indicates whether the size of the specified shape is changed automatically to fit text within its boundaries. Read/write.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
HasText | Returns whether the specified shape has text associated with it. Read-only.
HorizontalAnchor | Returns or sets the horizontal alignment of text in a text frame. Read/write.
MarginBottom | Returns or sets the distance (in points) between the bottom of the text frame and the bottom of the inscribed rectangle of the shape that contains the text. Read/write.
MarginLeft | Returns or sets the distance (in points) between the left edge of the text frame and the left edge of the inscribed rectangle of the shape that contains the text. Read/write.
MarginRight | Returns or sets the distance (in points) between the right edge of the text frame and the right edge of the inscribed rectangle of the shape that contains the text. Read/write.
MarginTop | Returns or sets the distance (in points) between the top of the text frame and the top of the inscribed rectangle of the shape that contains the text. Read/write.
Orientation | Returns or sets text orientation. Read/write.
Parent | Returns the parent object for the specified object.
Ruler | Returns a Ruler object that represents the ruler for the specified text. Read-only.
TextRange | Returns a TextRange object that represents the text in the specified text frame. Read-only.
VerticalAnchor | Returns or sets the vertical alignment of text in a text frame. Read/write.
WordWrap | Determines whether lines break automatically to fit inside the shape. Read/write.


Comment.AuthorIndex Property (PowerPoint)

 Copy code hover
[image]

Comment.AuthorIndex Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Long representing the index number of a comment for a given author. The first comment for a given author has an index number of 1, their second comment has an index number of 2. Read-only.

Syntax

expression .AuthorIndex

expression A variable that represents an Comment object.

Return Value

Long

Example

The following example provide information about the authors and their comment indexes for a given slide.

VBA Copy code Copy code
Sub GetCommentAuthorInfo()

    Dim cmtComment As Comment

    Dim strAuthorInfo As String

    With ActivePresentation.Slides(1)

        If .Comments.Count > 0 Then

            For Each cmtComment In .Comments

                strAuthorInfo = strAuthorInfo & "Comment Number:  " & _

                    cmtComment.AuthorIndex & vbLf & _

                    "Made by:  " & cmtComment.Author & vbLf & _

                    "Says:  " & cmtComment.Text & vbLf & vbLf

            Next cmtComment

        End If

    End With

    MsgBox "The comments for this slide are as follows: " & _

        vbLf & vbLf & strAuthorInfo

End Sub

See also

Concepts

Comment Object

Other resources

Comment Object Members


Theme.Parent Property (PowerPoint)

 Copy code hover
[image]

Theme.Parent Property (PowerPoint)
Send feedback

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2013

Syntax

expression .Parent

expression A variable that represents a Theme object.


Row.Height Property (PowerPoint)

 Copy code hover
[image]

Row.Height Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets the height of the specified object, in points. Read/write.

Syntax

expression .Height

expression A variable that represents a Row object.

Return Value

Single

Remarks

The Height property of a Shape object returns or sets the height of the forward-facing surface of the specified shape. This measurement doesn't include shadows or 3-D effects.

Example

This example sets the height of document window two to half the height of the application window.

VBA Copy code Copy code
Windows(2).Height = Application.Height / 2

This example sets the height for row two in the specified table to 100 points (72 points per inch).

VBA Copy code Copy code
ActivePresentation.Slides(2).Shapes(5).Table.Rows(2).Height = 100

See also

Concepts

Row Object

Other resources

Row Object Members


Master.Shapes Property (PowerPoint)

 Copy code hover
[image]

Master.Shapes Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Shapes collection that represents all the elements that have been placed or inserted on the specified slide, slide master, or range of slides. Read-only.

Syntax

expression .Shapes

expression A variable that represents a Master object.

Return Value

Shapes

Remarks

The Shapes collection returned can contain the drawings, shapes, OLE objects, pictures, text objects, titles, headers, footers, slide numbers, and date and time objects on a slide, or on the slide image on a notes page.

Example

This example adds a rectangle that's 100 points wide and 50 points high, and whose upper-left corner is 5 points from the left edge of slide one in the active presentation and 25 points from the top of the slide.

VBA Copy code Copy code
Set firstSlide = ActivePresentation.Slides(1)

firstSlide.Shapes.AddShape msoShapeRectangle, 5, 25, 100, 50

This example sets the fill texture for shape three on slide one in the active presentation.

VBA Copy code Copy code
Set newRect = ActivePresentation.Slides(1).Shapes(3)

newRect.Fill.PresetTextured msoTextureOak

Assuming that slide one in the active presentation contains a title, both the second and third lines of code in the following example set the title text on slide one in the presentation.

VBA Copy code Copy code
Set firstSl = ActivePresentation.Slides(1)

firstSl.Shapes.Title.TextFrame.TextRange.Text = "Some title text"

firstSl.Shapes(1).TextFrame.TextRange.Text = "Other title text"

Assuming that shape two on slide two in the active presentation contains a text frame, the following example adds a series of paragraphs to the slide. Note that Chr(13) is used to insert paragraph marks within the text.

VBA Copy code Copy code
Set tShape = ActivePresentation.Slides(2).Shapes(2)

tShape.TextFrame.TextRange.Text = "First Item" & Chr(13) & _

    "Second Item" & Chr(13) & "Third Item"

For most slide layouts, the first shapes on the slide are text placeholders, and the following example accomplishes the same task as the preceding example.

VBA Copy code Copy code
Set testShape = ActivePresentation.Slides(2).Shapes.Placeholders(2)

testShape.TextFrame.TextRange.Text = "First Item" & _

    Chr(13) & "Second Item" & Chr(13) & "Third Item"

See also

Concepts

Master Object

Other resources

Master Object Members


MediaFormat.StartPoint Property (PowerPoint)

 Copy code hover
[image]

MediaFormat.StartPoint Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Gets or sets the start point of the trim region. Read/write.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .StartPoint

expression An expression that returns a MediaFormat object.

Return Value

Long

Remarks

The start point must be before the end point.

See also

Concepts

MediaFormat Object

Other resources

MediaFormat Object Members


ChartGroup.SplitValue Property (PowerPoint)

 Copy code hover
[image]

ChartGroup.SplitValue Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the threshold value separating the two sections of either a pie-of-pie chart or a bar-of-pie chart. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .SplitValue

expression A variable that represents a ChartGroup object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example splits the two sections of the chart by value, combining all values under 10 in the primary pie and displaying them in the secondary section. You must run this example on either a pie-of-pie chart or a bar-of-pie chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.ChartGroups(1)

            .SplitType = xlSplitByValue

            .SplitValue = 10

            .VaryByCategories = True

        End With

    End If

End With

See also

Concepts

ChartGroup Object

Other resources

ChartGroup Object Members


Legend.LegendEntries Method (PowerPoint)

 Copy code hover
[image]

Legend.LegendEntries Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a collection of legend entries for the legend.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .LegendEntries

expression A variable that represents a Legend object.

Return Value

A LegendEntries object that represents the legend entries for the legend.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the font for legend entry one on the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.Legend.LegendEntries(1).Font.Name = "Arial"

    End If

End With

See also

Concepts

Legend Object

Other resources

Legend Object Members


CustomerData.Count Property (PowerPoint)

 Copy code hover
[image]

CustomerData.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of CustomXMLPart objects in the CustomerData collection. Read-only.

Syntax

expression .Count

expression An expression that returns a CustomerData object.

Return Value

Long

See also

Concepts

CustomerData Collection

Other resources

CustomerData Object Members


ActionSetting.Application Property (PowerPoint)

 Copy code hover
[image]

ActionSetting.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents an ActionSetting object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

ActionSetting Object

Other resources

ActionSetting Object Members


ThreeDFormat.IncrementRotationY Method (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.IncrementRotationY Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Changes the rotation of the specified shape around the y-axis by the specified number of degrees.

Syntax

expression .IncrementRotationY(Increment)

expression A variable that represents an ThreeDFormat object.

Parameters

Name | Required/Optional | Data Type | Description
Increment | Required | Single | Specifies how much (in degrees) the rotation of the shape around the y-axis is to be changed. Can be a value from - 90 through 90. A positive value tilts the shape to the left; a negative value tilts it to the right.

Remarks

Use the RotationY property to set the absolute rotation of the shape around the y-axis.

To change the rotation of a shape around the x-axis, use the IncrementRotationX method. To change the rotation around the z-axis, use the IncrementRotation method.

You cannot adjust the rotation around the y-axis of the specified shape past the upper or lower limit for the RotationY property (90 degrees to - 90 degrees). For example, if the RotationY property is initially set to 80 and you specify 40 for the Increment argument, the resulting rotation will be 90 (the upper limit for the RotationY property) instead of 120.

Example

This example tilts shape one on myDocument 10 degrees to the right. Shape one must be an extruded shape for you to see the effect of this code.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes(1).ThreeD.IncrementRotationY -10

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


Series.ErrorBar Method (PowerPoint)

 Copy code hover
[image]

Series.ErrorBar Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Applies error bars to the series.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ErrorBar(Direction, Include, Type, Amount, MinusValues)

expression A variable that represents a Series object.

Parameters

Name | Required/Optional | Data Type | Description
Direction | Required | XlErrorBarDirection | One of the enumeration values that specifies the error bar direction.
Include | Required | XlErrorBarInclude | One of the enumeration values that specifies the error bar parts to include.
Type | Required | XlErrorBarType | One of the enumeration values that specifies the error bar type.
Amount | Optional | Variant | The error amount. Used for only the positive error amount when Type is xlErrorBarTypeCustom.
MinusValues | Optional | Variant | The negative error amount when Type is xlErrorBarTypeCustom.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example applies standard error bars along the y-axis for series one of the first chart in the active document. The error bars are applied in the positive and negative directions. The example should be run on a 2-D line chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).ErrorBar _

            Direction:=xlY, Include:=xlErrorBarIncludeBoth, _

            Type:=xlErrorBarTypeStError

    End If

End With

See also

Concepts

Series Object

Other resources

Series Object Members


BulletFormat.Picture Method (PowerPoint)

 Copy code hover
[image]

BulletFormat.Picture Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets the graphics file to be used for bullets in a bulleted list when the Type property of the BulletFormat object is set to ppBulletPicture.

Syntax

expression .Picture

expression A variable that represents a BulletFormat object.

Remarks

Valid graphics files include files with the following extensions: .bmp, .cdr, .cgm, .drw, .dxf, .emf, .eps, .gif, .jpg, .jpeg, .pcd, .pct, .pcx, .pict, .png, .tga, .tiff, .wmf, and .wpg.

Example

This example sets the bullets in the text box specified by shape two on slide one to a bitmap picture of a blue rivet.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(2).TextFrame

    With .TextRange.ParagraphFormat.Bullet

        .Type = ppBulletPicture

        .Picture ("C:\Windows\Blue Rivets.bmp")

    End With

End With

See also

Concepts

BulletFormat Object

Other resources

BulletFormat Object Members


AnimationBehavior.PropertyEffect Property (PowerPoint)

 Copy code hover
[image]

AnimationBehavior.PropertyEffect Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a PropertyEffect object for a given animation behavior. Read-only.

Syntax

expression .PropertyEffect

expression A variable that represents an AnimationBehavior object.

Return Value

PropertyEffect

Example

The following example adds a shape with an effect to the active presentation and sets the animation effect properties for the shape to change colors.

VBA Copy code Copy code
Sub AddShapeSetAnimFill()

    Dim effBlinds As Effect

    Dim shpRectangle As Shape

    Dim animBlinds As AnimationBehavior

    'Adds rectangle and sets animiation effect

    Set shpRectangle = ActivePresentation.Slides(1).Shapes _

        .AddShape(Type:=msoShapeRectangle, Left:=100, _

        Top:=100, Width:=50, Height:=50)

    Set effBlinds = ActivePresentation.Slides(1).TimeLine.MainSequence _

        .AddEffect(Shape:=shpRectangle, effectId:=msoAnimEffectBlinds)

    'Sets the duration of the animation

    effBlinds.Timing.Duration = 3

    'Adds a behavior to the animation

    Set animBlinds = effBlinds.Behaviors.Add(msoAnimTypeProperty)

    'Sets the animation color effect and the formula to use

    With animBlinds.PropertyEffect

        .Property = msoAnimColor

        .From = RGB(Red:=0, Green:=0, Blue:=255)

        .To = RGB(Red:=255, Green:=0, Blue:=0)

    End With

End Sub

See also

Concepts

AnimationBehavior Object

Other resources

AnimationBehavior Object Members


SlideShowView.Previous Method (PowerPoint)

 Copy code hover
[image]

SlideShowView.Previous Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Shows the slide immediately preceding the slide that's currently displayed.

Syntax

expression .Previous

expression A variable that represents a SlideShowView object.

Remarks

If you are currently on the first slide in a kiosk slide show, the Previous method takes you to the last slide in a slide show; otherwise, it has no effect if the first slide in the presentation is currently displayed. Use the View property of the SlideShowWindow object to return the SlideShowView object.

Example

This example shows the slide immediately preceding the currently displayed slide on slide show window one.

VBA Copy code Copy code
SlideShowWindows(1).View.Previous

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


SlideShowView.IsNamedShow Property (PowerPoint)

 Copy code hover
[image]

SlideShowView.IsNamedShow Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether a custom (named) slide show is displayed in the specified slide show view. Read-only.

Syntax

expression .IsNamedShow

expression A variable that represents an SlideShowView object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | A custom (named) slide show is not displayed in the specified slide show view.
msoTrue | A custom (named) slide show is displayed in the specified slide show view.

Example

If the slide show running in slide show window one is a custom slide show, this example displays its name.

VBA Copy code Copy code
With SlideShowWindows(1).View

    If .IsNamedShow Then

        MsgBox "Now showing in slide show window 1: " _

           & .SlideShowName

    End If

End With

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


XlCopyPictureFormat Enumeration (PowerPoint)

 Copy code hover
[image]

XlCopyPictureFormat Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the format of the picture being copied.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlBitmap | 2 | A bitmap (.bmp, .jpg, .gif).
xlPicture | -4147 | A drawn picture (.png, .wmf, .mix).


ShapeNodes.Delete Method (PowerPoint)

 Copy code hover
[image]

ShapeNodes.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes a shape node.

Syntax

expression .Delete(Index)

expression A variable that represents a ShapeNodes object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Long | Specifies the node to be deleted.

Remarks

The segment following the Index node is also deleted. If the node is a control point of a curve, the curve and all of its nodes are deleted.

See also

Concepts

ShapeNodes Object

Other resources

ShapeNodes Object Members


CustomLayout.CustomerData Property (PowerPoint)

 Copy code hover
[image]

CustomLayout.CustomerData Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a CustomerData object.

Syntax

expression .CustomerData

expression An expression that returns a CustomLayout object.

Return Value

CustomerData

See also

Concepts

CustomLayout Object

Other resources

CustomLayout Object Members


ThreeDFormat.ResetRotation Method (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.ResetRotation Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Resets the extrusion rotation around the x-axis and the y-axis to 0 (zero) so that the front of the extrusion faces forward. This method doesn't reset the rotation around the z-axis.

Syntax

expression .ResetRotation

expression A variable that represents a ThreeDFormat object.

Remarks

To set the extrusion rotation around the x-axis and the y-axis to anything other than 0 (zero), use the RotationX and RotationY properties of the ThreeDFormat object. To set the extrusion rotation around the z-axis, use the Rotation property of the Shape object that represents the extruded shape.

Example

This example resets the rotation around the x-axis and the y-axis to 0 (zero) for the extrusion of shape one on myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes(1).ThreeD.ResetRotation

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


HiLoLines.Format Property (PowerPoint)

 Copy code hover
[image]

HiLoLines.Format Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Format

expression A variable that represents a HiLoLines object.

See also

Concepts

HiLoLines Object

Other resources

HiLoLines Object Members


LinkFormat.Application Property (PowerPoint)

 Copy code hover
[image]

LinkFormat.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a LinkFormat object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

LinkFormat Object

Other resources

LinkFormat Object Members


How to: Use Control Values While Code Is Running

 Copy code hover
[image]

How to: Use Control Values While Code Is Running
Send feedback

Some control properties can be set and returned while Microsoft Visual Basic code is running. The following example sets the Text property of a text box to "Hello."

VBA Copy code Copy code
TextBox1.Text = "Hello"

The data entered on a form by a user is lost when the form is closed. If you return the values of controls on a form after the form has been unloaded, you get the initial values for the controls rather than the values the user entered.

If you want to save the data entered on a form, you can save the information to module-level variables while the form is still running. The following example displays a form and saves the form data.

Copy code Copy code
'Code in module to declare public variables
Public strRegion As String
Public intSalesPersonID As Integer
Public blnCanceled As Boolean

'Code in form
Private Sub cmdCancel_Click()
    Module1.blnCanceled = True
    Unload Me
End Sub

Private Sub cmdOK_Click()
    'Save data
    intSalesPersonID = txtSalesPersonID.Text
    strRegion = lstRegions.List(lstRegions.ListIndex)
    Module1.blnCanceled = False
    Unload Me
End Sub

Private Sub UserForm_Initialize()
    Module1.blnCanceled = True
End Sub

'Code in module to display form
Sub LaunchSalesPersonForm()
    frmSalesPeople.Show
    If blnCanceled = True Then
        MsgBox "Operation Canceled!", vbExclamation
    Else
        MsgBox "The Salesperson's ID is: " &
            intSalesPersonID & _
            "The Region is: " & strRegion
    End If
End Sub


ColorEffect Properties (PowerPoint)

 Copy code hover
[image]

ColorEffect Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
By | Returns a ColorFormat object that represents a change to the color of the object by the specified number, expressed in RGB format. Read-only.
From | Sets or returns a ColorFormat object that represents the starting RGB color value of an animation behavior.
Parent | Returns the parent object for the specified object.
To | Sets or returns a ColorFormat object that represents the RGB color value of an animation behavior. Read/write.


Font Members (PowerPoint)

 Copy code hover
[image]

Font Members (PowerPoint)
Send feedback

Published: July 12, 2012

Represents character formatting for text or a bullet. The Font object is a member of the Fonts collection. The Fonts collection contains all the fonts used in a presentation.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
AutoRotateNumbers | Returns or sets lateral compression. Read/write.
BaselineOffset | Returns or sets the baseline offset for the specified superscript or subscript characters. Read/write.
Bold | Determines whether the character format is bold. Read/write.
Color | Returns the color of the current Font object. Read-only.
Embeddable | Determines whether the specified font can be embedded in the presentation. Read-only.
Embedded | Determines whether the specified font is embedded in the presentation. Read-only.
Emboss | Determines whether the character format is embossed. Read/write.
Italic | True if the font or range is formatted as italic. Read/write Long.
Name | Returns or sets the name of the specified object. Read/write.
NameAscii | Returns or sets the font used for ASCII characters (characters with character set numbers within the range of 0 to 127). Read/write.
NameComplexScript | Returns or sets the complex script font name. Used for mixed language text. Read/write.
NameFarEast | Returns or sets the Asian font name. Read/write.
NameOther | Returns or sets the font used for characters whose character set numbers are greater than 127. Read/write.
Parent | Returns the parent object for the specified object.
Shadow | Determines whether the specified text has a shadow. Read/write.
Size | Returns or sets the character size, in points. Read/write.
Subscript | Determines whether the specified text is subscript. Read/write.
Superscript | Determines whether the specified text is superscript. Read/write.
Underline | Determines whether the specified text (for the Font object) or the font style (for the FontInfo object) is underlined. Read/write.


GroupShapes Methods (PowerPoint)

 Copy code hover
[image]

GroupShapes Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Item | Returns a single Shape object from the specified GroupShapes collection.
Range | Returns a ShapeRange object.


Adjustments.Creator Property (PowerPoint)

 Copy code hover
[image]

Adjustments.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.

Syntax

expression .Creator

expression A variable that represents an Adjustments object.

Return Value

Long

Remarks

The Creator property is designed to be used in Microsoft Office applications for the Macintosh.

Example

This example displays a message about the creator of myObject.

VBA Copy code Copy code
Set myObject = Application.ActivePresentation.Slides(1).Shapes(1)

If myObject.Creator = &h50575054 Then

    MsgBox "This is a PowerPoint object"

Else

    MsgBox "This is not a PowerPoint object"

End If

See also

Concepts

Adjustments Object

Other resources

Adjustments Object Members


SlideShowView.ResetSlideTime Method (PowerPoint)

 Copy code hover
[image]

SlideShowView.ResetSlideTime Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Resets the elapsed time (represented by the SlideElapsedTime property) for the slide that's currently displayed to 0 (zero).

Syntax

expression .ResetSlideTime

expression A variable that represents a SlideShowView object.

Example

This example resets the elapsed time for the slide that's currently displayed in slide show window one to 0 (zero).

VBA Copy code Copy code
SlideShowWindows(1).View.ResetSlideTime

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


ShapeRange.LinkFormat Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.LinkFormat Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a LinkFormat object that contains the properties that are unique to linked OLE objects. Read-only.

Syntax

expression .LinkFormat

expression A variable that represents a ShapeRange object.

Return Value

LinkFormat

Example

This example updates the links between any OLE objects on slide one in the active presentation and their source files.

VBA Copy code Copy code
For Each sh In ActivePresentation.Slides(1).Shapes

    If sh.Type = msoLinkedOLEObject Then

        With sh.LinkFormat

            .Update

        End With

    End If

Next

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


SlideShowWindows Object (PowerPoint)

 Copy code hover
[image]

SlideShowWindows Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

A collection of all the SlideShowWindow objects that represent the open slide shows in Microsoft PowerPoint.

Example

Use the SlideShowWindows property to return the SlideShowWindows collection. Use SlideShowWindows(index), where index is the window index number, to return a single SlideShowWindow object. The following example reduces the height of slide show window one if it is a full-screen window.

VBA Copy code Copy code
With SlideShowWindows(1)

    If .IsFullScreen Then

        .Height = .Height - 20

    End If

End With

Use the Run method to create a new slide show window and add it to the SlideShowWindows collection. The following example runs a slide show of the active presentation.

VBA Copy code Copy code
ActivePresentation.SlideShowSettings.Run

See also

Concepts

PowerPoint Object Model Reference

Other resources

SlideShowWindows Object Members


Chart.ChartWizard Method (PowerPoint)

 Copy code hover
[image]

Chart.ChartWizard Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Modifies the properties of the given chart. You can use this method to quickly format a chart without setting all the individual properties. This method is noninteractive, and it changes only the specified properties.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ChartWizard(Source, Gallery, Format, PlotBy, CategoryLabels, SeriesLabels, HasLegend, Title, CategoryTitle, ValueTitle, ExtraTitle)

expression A variable that represents a Chart object.

Parameters

Name | Required/Optional | Data Type | Description
Source | Optional | Variant | The range that contains the source data for the new chart. If this argument is omitted, Microsoft Word edits the active chart sheet or the selected chart on the active worksheet.
Gallery | Optional | Variant | One of the XlChartType constants that specifies the chart type.
Format | Optional | Variant | The option number for the built-in autoformats. Can be a number from 1 through 10, depending on the gallery type. If this argument is omitted, Word chooses a default value based on the gallery type and data source.
PlotBy | Optional | Variant | Specifies whether the data for each series is in rows or columns. Can be one of the following XlRowCol constants: xlRows or xlColumns.
CategoryLabels | Optional | Variant | An integer that specifies the number of rows or columns within the source range that contain category labels. Allowed values are from 0 (zero) through one less than the maximum number of the corresponding categories or series.
SeriesLabels | Optional | Variant | An integer that specifies the number of rows or columns within the source range that contain series labels. Allowed values are from 0 (zero) through one less than the maximum number of the corresponding categories or series.
HasLegend | Optional | Variant | True to include a legend.
Title | Optional | Variant | The chart title text.
CategoryTitle | Optional | Variant | The category axis title text.
ValueTitle | Optional | Variant | The value axis title text.
ExtraTitle | Optional | Variant | The series axis title for 3-D charts or the second value axis title for 2-D charts.

Remarks

If the Source parameter is omitted and the selection is not a chart on the active document, this method fails and an error occurs.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example reformats the first chart as a line chart, adds a legend, and adds category and value axis titles.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1).Chart
    .ChartWizard _
        Gallery:=xlLine, _
        HasLegend:=True, _
        CategoryTitle:="Year", _
        ValueTitle:="Sales"
End With

See also

Concepts

Chart Object

Other resources

Chart Object Members


Font.BaselineOffset Property (PowerPoint)

 Copy code hover
[image]

Font.BaselineOffset Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the baseline offset for the specified superscript or subscript characters. Read/write.

Syntax

expression .BaselineOffset

expression A variable that represents a Font object.

Return Value

Single

Remarks

The BaselineOffset property value be a floating-point value from - 1 through 1. A value of - 1 represents an offset of - 100 percent, and a value of 1 represents an offset of 100 percent.

Setting the BaselineOffset property to a negative value automatically sets the Subscript property to True and the Superscript property to False.

Setting the BaselineOffset property to a positive value automatically sets the Subscript property to False and the Superscript property to True.

Setting the Subscript property to True automatically sets the BaselineOffset property to 0.3 (30 percent).

Setting the Superscript property to True automatically sets the BaselineOffset property to - 0.25 ( - 25 percent).

Example

This example sets the text for shape two on slide one and then makes the second character subscript with a 20-percent offset.

VBA Copy code Copy code
With Application.ActivePresentation.Slides(1) _

        .Shapes(2).TextFrame.TextRange

    .Text = "H2O"

    .Characters(2, 1).Font.BaselineOffset = -0.2

End With

See also

Concepts

Font Object

Other resources

Font Object Members


ColorFormat.Parent Property (PowerPoint)

 Copy code hover
[image]

ColorFormat.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a ColorFormat object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

ColorFormat Object

Other resources

ColorFormat Object Members


Slide.ThemeColorScheme Property (PowerPoint)

 Copy code hover
[image]

Slide.ThemeColorScheme Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a ThemeColorScheme object that represents the color scheme associated with the specified slide. Read-only.

Syntax

expression .ThemeColorScheme

expression A variable that represents a Slide object.

Return Value

ThemeColorScheme

See also

Concepts

Slide Object

Other resources

Slide Object Members


Application.Path Property (PowerPoint)

 Copy code hover
[image]

Application.Path Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a String that represents the path to the specified Application object. Read-only.

Syntax

expression .Path

expression A variable that represents an Application object.

Return Value

String

Remarks

The path doesn't include the final backslash (\) or the name of the specified object. Use the Name property of the Presentation object to return the file name without the path, and use the FullName property to return the file name and the path together.

Example

This example saves the active presentation in the same folder as PowerPoint.

VBA Copy code Copy code
With Application

    fName = .Path & "\test presentation"

    ActivePresentation.SaveAs fName

End With

See also

Concepts

Application Object

Other resources

Application Object Members


XlTickMark Enumeration (PowerPoint)

 Copy code hover
[image]

XlTickMark Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the position of major and minor tick marks for an axis.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlTickMarkCross | 4 | Crosses the axis.
xlTickMarkInside | 2 | Inside the axis.
xlTickMarkNone | -4142 | No mark.
xlTickMarkOutside | 3 | Outside the axis.


ShapeRange.HasTable Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.HasTable Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns whether the specified shape is a table. Read-only.

Syntax

expression .HasTable

expression A variable that represents a ShapeRange object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified shape is not a table.
msoTrue | The specified shape is a table.

Example

This example checks the currently selected shape to see if it is a table. If it is, the code sets the width of column one to one inch (72 points).

VBA Copy code Copy code
With ActiveWindow.Selection.ShapeRange

    If .HasTable = msoTrue Then

       .Table.Columns(1).Width = 72

    End If

End With

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


LegendKey.Parent Property (PowerPoint)

 Copy code hover
[image]

LegendKey.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents a LegendKey object.

See also

Concepts

LegendKey Object

Other resources

LegendKey Object Members


TextStyles.Application Property (PowerPoint)

 Copy code hover
[image]

TextStyles.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a TextStyles object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

TextStyles Object

Other resources

TextStyles Object Members


AxisTitle.Parent Property (PowerPoint)

 Copy code hover
[image]

AxisTitle.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents an AxisTitle object.

See also

Concepts

AxisTitle Object

Other resources

AxisTitle Object Members


Comments.Add Method (PowerPoint)

 Copy code hover
[image]

Comments.Add Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Comment object that represents a new comment added to a slide.

Syntax

expression .Add(Left, Top, Author, AuthorInitials, Text)

expression A variable that represents a Comments object.

Parameters

Name | Required/Optional | Data Type | Description
Left | Required | Single | The position, measured in points, of the left edge of the comment, relative to the left edge of the presentation.
Top | Required | Single | The position, measured in points, of the top edge of the comment, relative to the top edge of the presentation.
Author | Required | String | The author of the comment.
AuthorInitials | Required | String | The author's initials.
Text | Required | String | The comment's text.

Return Value

Comment

See also

Concepts

Comments Object

Other resources

Comments Object Members


PublishObjects.Count Property (PowerPoint)

 Copy code hover
[image]

PublishObjects.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a PublishObjects object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

PublishObjects Object

Other resources

PublishObjects Object Members


SlideShowWindows Properties (PowerPoint)

 Copy code hover
[image]

SlideShowWindows Properties (PowerPoint)
Send feedback

Published: July 12, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


Hyperlinks.Parent Property (PowerPoint)

 Copy code hover
[image]

Hyperlinks.Parent Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a Hyperlinks object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

Hyperlinks Object

Other resources

Hyperlinks Object Members


Chart.CopyPicture Method (PowerPoint)

 Copy code hover
[image]

Chart.CopyPicture Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Copies the selected object to the Clipboard as a picture.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .CopyPicture(Appearance, Format, Size)

expression A variable that represents a Chart object.

Parameters

Name | Required/Optional | Data Type | Description
Appearance | Optional | XlPictureAppearance | One of the enumeration values that specifies how the picture should be copied. The default is xlScreen.
Format | Optional | XlCopyPictureFormat | One of the enumeration values that specifies the format of the picture. The default is xlPicture.
Size | Optional | XlPictureAppearance | One of the enumeration values that specifies the size of the copied picture when the object is a chart on a chart sheet (not embedded on a worksheet). The default is xlPrinter.

See also

Concepts

Chart Object

Other resources

Chart Object Members


Master.HeadersFooters Property (PowerPoint)

 Copy code hover
[image]

Master.HeadersFooters Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a HeadersFooters collection that represents the header, footer, date and time, and slide number associated with the slide, slide master, or range of slides. Read-only.

Syntax

expression .HeadersFooters

expression A variable that represents a Master object.

Return Value

HeadersFooters

Example

This example sets the footer text and the date and time format for the notes master in the active presentation and sets the date and time to be updated automatically.

VBA Copy code Copy code
With ActivePresentation.NotesMaster.HeadersFooters

    .Footer.Text = "Regional Sales"

    With .DateAndTime

        .UseFormat = True

        .Format = ppDateTimeHmmss

    End With

End With

See also

Concepts

Master Object

Other resources

Master Object Members


LegendEntries Object (PowerPoint)

 Copy code hover
[image]

LegendEntries Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

A collection of all the LegendEntry objects in the specified chart legend.

Version Information

Version Added: PowerPoint 2007

Remarks

Each legend entry has two parts:

  • The text of the entry, which is the name of the series or trendline associated with the legend entry.

  • The entry marker, which visually links the legend entry with its associated series or trendline in the chart.

The formatting properties for the entry marker and its associated series or trendline are contained in the LegendKey object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

Use the LegendEntries method to return the LegendEntries collection. The following example loops through the collection of legend entries for the first chart in the active document and changes their font color.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.Legend

            For i = 1 To .LegendEntries.Count

                .LegendEntries(i).Font.ColorIndex = 5

            Next

        End With

    End If

End With

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

Use LegendEntries(index), where index is the legend entry index number, to return a single LegendEntry object. You cannot return legend entries by name.

The index number represents the position of the legend entry in the legend. LegendEntries(1) is at the top of the legend; LegendEntries(LegendEntries.Count) is at the bottom. The following example changes the font style for the text of the legend entry at the top of the legend (this is usually the legend for series one) for the first chart in the active document to italic.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.Legend.LegendEntries(1).Font.Italic = True

    End If

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

LegendEntries Object Members


Trendline.Creator Property (PowerPoint)

 Copy code hover
[image]

Trendline.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents a Trendline object.

See also

Concepts

Trendline Object

Other resources

Trendline Object Members


ColorScheme.Colors Method (PowerPoint)

 Copy code hover
[image]

ColorScheme.Colors Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an RGBColor object that represents a single color in a color scheme.

Syntax

expression .Colors(SchemeColor)

expression A variable that represents a ColorScheme object.

Parameters

Name | Required/Optional | Data Type | Description
SchemeColor | Required | PpColorSchemeIndex | The individual color in the specified color scheme.

Return Value

RGBColor

Example

This example sets the title color for slides one and three in the active presentation.

VBA Copy code Copy code
Set mySlides = ActivePresentation.Slides.Range(Array(1, 3))

mySlides.ColorScheme.Colors(ppTitle).RGB = RGB(0, 255, 0)

See also

Concepts

ColorScheme Object

Other resources

ColorScheme Object Members


DisplayUnitLabel.Caption Property (PowerPoint)

 Copy code hover
[image]

DisplayUnitLabel.Caption Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the display unit label text. Read/write String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Caption

expression A variable that represents a DisplayUnitLabel object.

See also

Concepts

DisplayUnitLabel Object

Other resources

DisplayUnitLabel Object Members


Shape.SmartArt Property (PowerPoint)

 Copy code hover
[image]

Shape.SmartArt Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Microsoft Office SmartArt object that represents the SmartArt diagram of the Shape object. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .SmartArt

expression A variable that represents a Shape object.

Remarks

The returned Microsoft Office SmartArt object replaces the PowerPoint Diagram object, which is deprecated as of Microsoft PowerPoint 2010.

See also

Concepts

Shape Object

Other resources

Shape Object Members


ChartGroup.GapWidth Property (PowerPoint)

 Copy code hover
[image]

ChartGroup.GapWidth Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

For bar and column charts, returns or sets the space, as a percentage of the bar or column width, between bar or column clusters. For pie-of-pie and bar-of-pie charts, returns or sets the space between the primary and secondary sections of the chart. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .GapWidth

expression A variable that represents a ChartGroup object.

Remarks

The value of this property must be between 0 and 500.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the space between column clusters for the first chart in the active document to be 50 percent of the column width.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.ChartGroups(1).GapWidth = 50

    End If

End With

See also

Concepts

ChartGroup Object

Other resources

ChartGroup Object Members


ChartTitle.Left Property (PowerPoint)

 Copy code hover
[image]

ChartTitle.Left Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the distance, in points, from the left edge of the object to the left edge of the chart area. Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Left

expression A variable that represents a ChartTitle object.

See also

Concepts

ChartTitle Object

Other resources

ChartTitle Object Members


Application.ShowStartupDialog Property (PowerPoint)

 Copy code hover
[image]

Application.ShowStartupDialog Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether to display the New Presentation task pane when Microsoft PowerPoint is started. Read/write.

Syntax

expression .ShowStartupDialog

expression A variable that represents a Application object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | Hides the New Presentation task pane.
msoTrue | The default. Displays the New Presentation task pane.

Example

The following line of code hides the New Presentation task pane when PowerPoint starts.

VBA Copy code Copy code
Sub DontShowStartup()

    Application.ShowStartupDialog = msoFalse

End Sub

See also

Concepts

Application Object

Other resources

Application Object Members


ThemeVariants.Item Method (PowerPoint)

 Copy code hover
[image]

ThemeVariants.Item Method (PowerPoint)
Send feedback

Returns a single ThemeVariant object from the collection.

Version information

Version Added: PowerPoint 2013

Syntax

expression .Item(Index)

expression A variable that represents a ThemeVariants object.

Parameters

Name | Required/Optional | Data type | Description
Index | Required | Integer | The index number of the single ThemeVariant object in the collection to be returned.
Index | Required | INT |

Return value

ThemeVariant


ChartFont.Superscript Property (PowerPoint)

 Copy code hover
[image]

ChartFont.Superscript Property (PowerPoint)
Send feedback

True if the font is formatted as superscript. The default is False. Read/write Variant.

Version information

Version Added: PowerPoint 2007

Syntax

expression .Superscript

expression A variable that represents a ChartFont object.

Property value

VARIANT


Designs Methods (PowerPoint)

 Copy code hover
[image]

Designs Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Add | Returns a Design object that represents a new slide design.
Clone | Creates a copy of a Design object.
Item | Returns a single Design object from the specified Designs collection.
Load | Returns a Design object that represents a design loaded into the master list of the specified presentation.


PictureFormat.IncrementContrast Method (PowerPoint)

 Copy code hover
[image]

PictureFormat.IncrementContrast Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Changes the contrast of the picture by the specified amount.

Syntax

expression .IncrementContrast(Increment)

expression A variable that represents an PictureFormat object.

Parameters

Name | Required/Optional | Data Type | Description
Increment | Required | Single | Specifies how much to change the value of the Contrast property for the picture. A positive value increases the contrast; a negative value decreases the contrast.

Remarks

Use the Contrast property to set the absolute contrast for the picture.

You cannot adjust the contrast of a picture past the upper or lower limit for the Contrast property. For example, if the Contrast property is initially set to 0.9 and you specify 0.3 for the Increment argument, the resulting contrast level will be 1.0, which is the upper limit for the Contrast property, instead of 1.2.

Example

This example increases the contrast for all pictures on myDocument that aren't already set to maximum contrast.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

For Each s In myDocument.Shapes

    If s.Type = msoPicture Then

        s.PictureFormat.IncrementContrast 0.1

    End If

Next

See also

Concepts

PictureFormat Object

Other resources

PictureFormat Object Members


AxisTitle.Formula Property (PowerPoint)

 Copy code hover
[image]

AxisTitle.Formula Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the object's formula in A1-style notation. Read-only.

Syntax

expression .Formula

expression A variable that represents an AxisTitle object.

See also

Concepts

AxisTitle Object

Other resources

AxisTitle Object Members


Chart.Copy Method (PowerPoint)

 Copy code hover
[image]

Chart.Copy Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Not supported for this object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Copy(Before, After)

expression A variable that represents a Chart object.

Parameters

Name | Required/Optional | Data Type | Description
Before | Optional | Variant | Not supported for this object.
After | Optional | Variant | Not supported for this object.

See also

Concepts

Chart Object

Other resources

Chart Object Members


Font Object (PowerPoint)

 Copy code hover
[image]

Font Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents character formatting for text or a bullet. The Font object is a member of the Fonts collection. The Fonts collection contains all the fonts used in a presentation.

Example

The following examples describes how to do the following:

  • Return the Font object that represents the font attributes of a specified bullet, a specified range of text, or all text at a specified outline level

  • Return a Font object from the collection of all the fonts used in the presentation

Use the Font property to return the Font object that represents the font attributes for a specific bullet, text range, or outline level. The following example sets the title text on slide one and sets the font properties.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes.Title _

        .TextFrame.TextRange

    .Text = "Volcano Coffee"

    With .Font

        .Italic = True

        .Name = "Palatino"

        .Color.RGB = RGB(0, 0, 255)

    End With

End With

Use Fonts(index), where index is the font's name or index number, to return a single Font object. The following example checks to see whether font one in the active presentation is embedded in the presentation.

VBA Copy code Copy code
If ActivePresentation.Fonts(1).Embedded = _

    True Then MsgBox "Font 1 is embedded"

See also

Concepts

PowerPoint Object Model Reference

Other resources

Font Object Members


Application.ShowWindowsInTaskbar Property (PowerPoint)

 Copy code hover
[image]

Application.ShowWindowsInTaskbar Property (PowerPoint)
See also Send feedback

Determines whether there is a separate Windows taskbar button for each open presentation. Read/write.

Syntax

expression .ShowWindowsInTaskbar

expression A variable that represents a Application object.

Return Value

MsoTriState

Remarks

When set to True, this property simulates the look of a single-document interface (SDI), which makes it easier to navigate between open presentations. However, if you work with multiple presentations while other applications are open, you may want to set this property to False to avoid filling your taskbar with unnecessary buttons.

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

Constant | Description
msoFalse | There is not a separate Windows taskbar button for each open presentation.
msoTrue | The default. There is a separate Windows taskbar button for each open presentation.

Example

This example specifies that each open presentation doesn't have a separate Windows taskbar button.

VBA Copy code Copy code
Application.ShowWindowsInTaskbar = msoFalse

See also

Concepts

Application Object

Other resources

Application Object Members


SectionProperties.AddBeforeSlide Method (PowerPoint)

 Copy code hover
[image]

SectionProperties.AddBeforeSlide Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Adds a section immediately before the specified slide index, and returns the index of the new section.

Syntax

expression .AddBeforeSlide(SlideIndex, sectionName)

expression A variable that represents a SectionProperties object.

Parameters

Name | Required/Optional | Data Type | Description
SlideIndex | Required | Integer | The index of the slide before which to add the section.
sectionName | Required | String | The name of the new section.

Return Value

Integer

Remarks

The indices of sections after the newly inserted section are automatically incremented by one.

If a section break exists immediately before the specified slide index, the new section is placed after the section break, with the result that the preceding section is now empty, and the specified slide index is now the first slide of the new section.

If the presentation does not contain any sections and you call this method, passing a SlideIndex value greater than 1, a new section is created before the first slide and given the default section name.

See also

Concepts

SectionProperties Object

Other resources

SectionProperties Object Members


Font.Subscript Property (PowerPoint)

 Copy code hover
[image]

Font.Subscript Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the specified text is subscript. Read/write.

Syntax

expression .Subscript

expression A variable that represents a Font object.

Return Value

MsoTriState

Remarks

Setting the BaselineOffset property to a negative value automatically sets the Subscript property to msoTrue and the Superscript property to msoFalse.

Setting the BaselineOffset property to a positive value automatically sets the Subscript property to msoFalse and the Superscript property to msoTrue.

Setting the Subscript property to msoTrue automatically sets the BaselineOffset property to - 0.25 ( - 25 percent).

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

Constant | Description
msoFalse | The specified text is not subscript. The default.
msoTriStateMixed | Some characters are subscript and some aren't.
msoTrue | The specified text is subscript.

Example

This example enlarges the first character in the title on slide one if that character is subscript.

VBA Copy code Copy code
With Application.ActivePresentation.Slides(1) _

        .Shapes.Title.TextFrame.TextRange

    With .Characters(1, 1).Font

        If .Subscript Then

            scaleChar = -20 * .BaselineOffset

            .Size = .Size * scaleChar

        End If

    End With

End With

See also

Concepts

Font Object

Other resources

Font Object Members


PlaceholderFormat.Type Property (PowerPoint)

 Copy code hover
[image]

PlaceholderFormat.Type Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the type of placeholder. Read-only.

Syntax

expression .Type

expression A variable that represents a PlaceholderFormat object.

Return Value

PpPlaceholderType

Remarks

The value of the Type property can be one of these PpPlaceholderType constants.

ppPlaceholderBitmap

ppPlaceholderBody

ppPlaceholderCenterTitle

ppPlaceholderChart

ppPlaceholderDate

ppPlaceholderFooter

ppPlaceholderHeader

ppPlaceholderMediaClip

ppPlaceholderMixed

ppPlaceholderObject

ppPlaceholderOrgChart

ppPlaceholderSlideNumber

ppPlaceholderSubtitle

ppPlaceholderTable

ppPlaceholderTitle

ppPlaceholderVerticalBody

ppPlaceholderVerticalTitle

See also

Concepts

PlaceholderFormat Object

Other resources

PlaceholderFormat Object Members


Axis.HasDisplayUnitLabel Property (PowerPoint)

 Copy code hover
[image]

Axis.HasDisplayUnitLabel Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if the label specified by the DisplayUnit or DisplayUnitCustom property is displayed on the specified axis. The default is True. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .HasDisplayUnitLabel

expression A variable that represents an Axis object.

Example

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the units on the value axis of the first chart in the active document to increments of 500 but keeps the unit label hidden.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.Axes(xlValue)

            .DisplayUnit = xlCustom

            .DisplayUnitCustom = 500

            .AxisTitle.Caption = "Rebate Amounts"

            .HasDisplayUnitLabel = False

        End With

    End If

End With

See also

Concepts

Axis Object

Other resources

Axis Object Members


HeadersFooters.DisplayOnTitleSlide Property (PowerPoint)

 Copy code hover
[image]

HeadersFooters.DisplayOnTitleSlide Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Determines whether the footer, date and time, and slide number appear on the title slide. Applies to slide masters. Read/write.

Syntax

expression .DisplayOnTitleSlide

expression A variable that represents a HeadersFooters object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The footer, date and time, and slide number appears on all slides except the title slide.
msoTrue | The footer, date and time, and slide number appear on the title slide.

Example

This example sets the footer, date and time, and slide number to not appear on the title slide.

VBA Copy code Copy code
Application.ActivePresentation.SlideMaster.HeadersFooters.DisplayOnTitleSlide = msoFalse

See also

Concepts

HeadersFooters Object

Other resources

HeadersFooters Object Members


ActionSetting.Parent Property (PowerPoint)

 Copy code hover
[image]

ActionSetting.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents an ActionSetting object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

ActionSetting Object

Other resources

ActionSetting Object Members


Axis.Creator Property (PowerPoint)

 Copy code hover
[image]

Axis.Creator Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents an Axis object.

See also

Concepts

Axis Object

Other resources

Axis Object Members


PpViewType Enumeration (PowerPoint)

 Copy code hover
[image]

PpViewType Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Constants that specify the type of view, passed to and returned by the DocumentWindow object, and returned by the Pane object.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppViewHandoutMaster | 4 | Handout Master
ppViewMasterThumbnails | 12 | Master Thumbnails
ppViewNormal | 9 | Normal
ppViewNotesMaster | 5 | Notes Master
ppViewNotesPage | 3 | Notes Page
ppViewOutline | 6 | Outline
ppViewPrintPreview | 10 | Print Preview
ppViewSlide | 1 | Slide
ppViewSlideMaster | 2 | Slide Master
ppViewSlideSorter | 7 | Slide Sorter
ppViewThumbnails | 11 | Thumbnails
ppViewTitleMaster | 8 | Title Master


TextEffectFormat.RotatedChars Property (PowerPoint)

 Copy code hover
[image]

TextEffectFormat.RotatedChars Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether characters in the specified WordArt are rotated 90 degrees relative to the WordArt's bounding shape. Read/write.

Syntax

expression .RotatedChars

expression A variable that represents a TextEffectFormat object.

Return Value

MsoTriState

Remarks

If the WordArt has horizontal text, setting the RotatedChars property to msoTrue rotates the characters 90 degrees counterclockwise. If the WordArt has vertical text, setting the RotatedChars property to msoFalse rotates the characters 90 degrees clockwise. Use the ToggleVerticalText method to switch between horizontal and vertical text flow.

The Flip method and Rotation property of the Shape object and the RotatedChars property and ToggleVerticalText method of the TextEffectFormat object all affect the character orientation and direction of text flow in a Shape object that represents WordArt. You may have to experiment to find out how to combine the effects of these properties and methods to get the result you want.

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

Constant | Description
msoFalse | Characters in the specified WordArt retain their original orientation relative to the bounding shape.
msoTrue | Characters in the specified WordArt are rotated 90 degrees relative to the WordArt's bounding shape.

Example

This example adds WordArt that contains the text "Test" to myDocument and rotates the characters 90 degrees counterclockwise.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

Set newWordArt = myDocument.Shapes.AddTextEffect _

    (PresetTextEffect:=msoTextEffect1, Text:="Test", _

    FontName:="Arial Black", FontSize:=36, _

    FontBold:=msoFalse, FontItalic:=msoFalse, Left:=10, Top:=10)

newWordArt.TextEffect.RotatedChars = msoTrue

See also

Concepts

TextEffectFormat Object

Other resources

TextEffectFormat Object Members


Coauthoring Object (PowerPoint)

 Copy code hover
[image]

Coauthoring Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Contains properties and methods for manipulating co-authoring in a presentation.

Remarks

The Presentation.Coauthoring property returns a Coauthoring object.

See also

Concepts

PowerPoint Object Model Reference

Other resources

Coauthoring Object Members


SeriesCollection.Item Method (PowerPoint)

 Copy code hover
[image]

SeriesCollection.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single object from a collection.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Item(Index)

expression A variable that represents a SeriesCollection object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Variant | The name or index number for the object.

Return Value

A Series object contained by the collection.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the number of units that the trendline on the first chart in the active document extends forward and backward. The example should be run on a 2-D column chart that contains a single series with a trendline.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.SeriesCollection.Item(1).Trendlines.Item(1)

            .Forward = 5

            .Backward = .5

        End With

    End If

End With

See also

Concepts

SeriesCollection Object

Other resources

SeriesCollection Object Members


ChartGroup.HasRadarAxisLabels Property (PowerPoint)

 Copy code hover
[image]

ChartGroup.HasRadarAxisLabels Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if a radar chart has axis labels. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .HasRadarAxisLabels

expression A variable that represents a ChartGroup object.

Remarks

This property applies only to radar charts.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example enables radar axis labels for chart group one of the first chart in the active document and sets their color. You should run the example on a radar chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.ChartGroups(1)

            .HasRadarAxisLabels = True

            .RadarAxisLabels.Font.ColorIndex = 3

        End With

    End If

End With

See also

Concepts

ChartGroup Object

Other resources

ChartGroup Object Members


TextFrame2 Object (PowerPoint)

 Copy code hover
[image]

TextFrame2 Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the text frame in a Shape or ShapeRange object. Contains the text in the text frame and exposes properties and methods that control the alignment and anchoring of the text frame.

Remarks

Use the TextFrame2 property of the Shape and ShapeRange objects to return a TextFrame2 object.

Use the HasTextFrame property to determine whether a shape or shape range has a text frame, and use the HasText property to determine whether the text frame contains text.

Example

The following example adds a rectangle to a slide, adds text to the rectangle, and then sets the margins for the text frame.

VBA Copy code Copy code
Public Sub TextFrame2_Example()

    Set pptSlide = ActivePresentation.Slides(1)

    With pptSlide.Shapes.AddShape(msoShapeRectangle, 0, 0, 250, 140).TextFrame2

        .TextRange.Text = "Here is some sample text"

        .MarginBottom = 10

        .MarginLeft = 10

        .MarginRight = 10

        .MarginTop = 10

    End With

End Sub

The following example shows how to use the HasTextFrame property to determine whether a shape has a text frame, and then how to use the HasText property to determine whether the text frame contains text.

VBA Copy code Copy code
Public Sub HasTextFrame_Example()

    Set pptSlide = ActivePresentation.Slides(1)

    For Each pptShape In pptSlide.Shapes

        If pptShape.HasTextFrame Then

            With pptShape.TextFrame2

                If .HasText Then MsgBox .TextRange.Text

            End With

        End If

    Next

End Sub

See also

Concepts

PowerPoint Object Model Reference

Other resources

TextFrame2 Object Members


Master.ApplyTheme Method (PowerPoint)

 Copy code hover
[image]

Master.ApplyTheme Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Applies a theme or design template to the specified slide master, title master, handout master, notes master, or design master.

Syntax

expression .ApplyTheme(themeName)

expression A variable that represents a Master object.

Parameters

Name | Required/Optional | Data Type | Description
themeName | Required | String | The path and name of the theme file (.thmx) or design template file (.pot) to apply to the Master object.

Example

This example applies a saved theme to a slide master:

VBA Copy code Copy code
ActivePresentation.SlideMaster.ApplyTheme "C:\Program Files\Microsoft Office\Templates\MyTheme.thmx"

This example applies a saved design template to a slide master:

VBA Copy code Copy code
ActivePresentation.SlideMaster.ApplyTheme "C:\Program Files\Microsoft Office\Templates\MyTheme.pot"

See also

Concepts

Master Object

Other resources

Master Object Members


ShapeNodes.SetEditingType Method (PowerPoint)

 Copy code hover
[image]

ShapeNodes.SetEditingType Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Sets the editing type of the specified node.

Syntax

expression .SetEditingType(Index, EditingType)

expression A variable that represents a ShapeNodes object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Long | The node whose editing type is to be set.
EditingType | Required | MsoEditingType | The editing type.

Remarks

If the node specified by Index is a control point for a curved segment, this method sets the editing type of the node adjacent to it that joins two segments. Note that, depending on the editing type, this method may affect the position of adjacent nodes.

The EditingType parameter value can be one of these MsoEditingType constants.

msoEditingAuto

msoEditingCorner

msoEditingSmooth

msoEditingSymmetric

Example

This example changes all corner nodes to smooth nodes in shape three on myDocument. Shape three must be a freeform drawing.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(3).Nodes

    For n = 1 to .Count

        If .Item(n).EditingType = msoEditingCorner Then

            .SetEditingType n, msoEditingSmooth

        End If

    Next

End With

See also

Concepts

ShapeNodes Object

Other resources

ShapeNodes Object Members


TickLabels.NumberFormat Property (PowerPoint)

 Copy code hover
[image]

TickLabels.NumberFormat Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the format code for the object. Read/write String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .NumberFormat

expression A variable that represents a TickLabels object.

Remarks

The format code is the same string as the Format Codes option in the Format Cells dialog box. The Format function uses different format code strings than do the NumberFormat and NumberFormatLocal properties.

See also

Concepts

TickLabels Object

Other resources

TickLabels Object Members


Presentation.Sync Property (PowerPoint)

 Copy code hover
[image]

Presentation.Sync Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Sync object that enables you to manage the synchronization of the local and server copies of a shared presentation stored in a Microsoft SharePoint Server shared workspace. Read-only.

Syntax

expression .Sync

expression A variable that represents a Presentation object.

Return Value

Sync

Remarks

The Status property of the Sync object returns important information about the current state of synchronization. Use the GetUpdate method to refresh the sync status. Use the LastSyncTime, ErrorType, and WorkspaceLastChangedBy properties to return additional information.

For more information on the differences and conflicts that can exist between the local and server copies of shared presentations, see the Status property.

Use the PutUpdate method to save local changes to the server. Close and re-open the document to retrieve the latest version from the server when no local changes have been made. Use the ResolveConflict method to resolve differences between the local and the server copies, or the OpenVersion method to open a different version along with the currently open local version of the document.

The GetUpdate, PutUpdate, and ResolveConflict methods of the Sync object do not return status codes because they complete their tasks asynchronously. The Sync object provides important status information by firing a single event, called the PresentationSync event of the Application object.

The PresentationSync event returns one of the following MsoSyncEventType constants.

msoSyncEventDownloadInitiated

msoSyncEventDownloadSucceeded

msoSyncEventDownloadFailed

msoSyncEventUploadInitiated

msoSyncEventUploadSucceeded

msoSyncEventUploadFailed

msoSyncEventDownloadNoChange

msoSyncEventOffline

The Sync object model is available whether sharing and synchronization are enabled or disabled on the active document. The Sync property of the Presentation object does not return Nothing when the active document is not shared or synchronization is not enabled. Use the Status property to determine whether the document is shared and whether synchronization is enabled.

Not all document synchronization problems raise run-time errors that can be trapped. After using the methods of the Sync object, it is a good idea to check the Status property. If the Status property value is msoSyncStatusError, check the ErrorType property for additional information on the type of error that has occurred.

In many circumstances, the recommended way to resolve an error condition is to call the GetUpdate method. For example, if a call to PutUpdate results in an error condition, a call to GetUpdate will reset the status to msoSyncStatusLocalChanges.

Example

The following example displays the name of the last person to modify the active presentation if the active presentation is a shared document in a Document Workspace.

VBA Copy code Copy code
Dim eStatus As MsoSyncStatusType

Dim strLastUser As String

eStatus = ActivePresentation.Sync.Status

If eStatus = msoSyncStatusLatest Then

    strLastUser = ActivePresentation.Sync.WorkspaceLastChangedBy

    MsgBox "You have the most up-to-date copy." & _

        "This file was last modified by " & strLastUser

End If
Note Note

This object or member has been deprecated, but it remains part of the object model for backward compatibility. You should not use it in new applications.

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


PageSetup Object (PowerPoint)

 Copy code hover
[image]

PageSetup Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Contains information about the page setup for slides, notes pages, handouts, and outlines in a presentation.

Example

Use the PageSetup property to return the PageSetup object. The following example sets all slides in the active presentation to be 11 inches wide and 8.5 inches high and sets the slide numbering for the presentation to start at 17.

VBA Copy code Copy code
With ActivePresentation.PageSetup

    .SlideWidth = 11 * 72

    .SlideHeight = 8.5 * 72

    .FirstSlideNumber = 17

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

PageSetup Object Members


FilterEffect Members (PowerPoint)

 Copy code hover
[image]

FilterEffect Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a filter effect for an animation behavior.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Parent | Returns the parent object for the specified object.
Reveal | Determines how the embedded objects will be revealed. Read/write.
Subtype | Sets or returns the subtype of the filter effect. Read/write.
Type | Represents the type of animation. Read/write.


ChartGroups Methods (PowerPoint)

 Copy code hover
[image]

ChartGroups Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Item | Returns a single object from a collection.


Borders Object (PowerPoint)

 Copy code hover
[image]

Borders Object (PowerPoint)
See also Send feedback

Published: July 12, 2012

A collection of LineFormat objects that represent the borders and diagonal lines of a cell or range of cells in a table.

Remarks

Each Cell object or CellRange collection has six elements in the Borders collection. You cannot add objects to the Borders collection.

Use Borders(index), where index identifies the cell border or diagonal line, to return a single Border object. The index value can be any PPBorderType constant.

ppBorderBottom

ppBorderLeft

ppBorderRight

ppBorderTop

ppBorderDiagonalDown

ppBorderDiagonalUp

Example

Use the DashStyle property to apply a dashed line style to a Border object. This example selects the second row from the table and applies a dashed line style to the bottom border.

VBA Copy code Copy code
ActiveWindow.Selection.ShapeRange.Table.Rows(2).Cells.Borders(ppBorderBottom).DashStyle = msoLineDash

See also

Concepts

PowerPoint Object Model Reference

Other resources

Borders Object Members


Trendlines Methods (PowerPoint)

 Copy code hover
[image]

Trendlines Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Add | Creates a new trendline.
Item | Returns a single object from a collection.


Sequence.Application Property (PowerPoint)

 Copy code hover
[image]

Sequence.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a Sequence object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

Sequence Object

Other resources

Sequence Object Members


MediaBookmark.Name Property (PowerPoint)

 Copy code hover
[image]

MediaBookmark.Name Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the name of the bookmark. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Name

expression A variable that represents a MediaBookmark object.

See also

Concepts

MediaBookmark Object

Other resources

MediaBookmark Object Members


Comment.Application Property (PowerPoint)

 Copy code hover
[image]

Comment.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a Comment object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

Comment Object

Other resources

Comment Object Members


Shapes.AddPicture Method (PowerPoint)

 Copy code hover
[image]

Shapes.AddPicture Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Creates a picture from an existing file. Returns a Shape object that represents the new picture.

Syntax

expression .AddPicture(FileName, LinkToFile, SaveWithDocument, Left, Top, Width, Height)

expression A variable that represents a Shapes object.

Parameters

Name | Required/Optional | Data Type | Description
FileName | Required | String | The file from which the OLE object is to be created.
LinkToFile | Required | MsoTriState | Determines whether the picture will be linked to the file from which it was created.
SaveWithDocument | Required | MsoTriState | Determines whether the linked picture will be saved with the document into which it is inserted. This argument must be msoTrue if LinkToFile is msoFalse.
Left | Required | Single | The position, measured in points, of the left edge of the picture relative to the left edge of the slide.
Top | Required | Single | The position, measured in points, of the top edge of the picture relative to the top edge of the slide.
Width | Optional | Single | The width of the picture, measured in points.
Height | Optional | Single | The height of the picture, measured in points.

Return Value

Shape

Example

This example adds a picture created from the file Music.bmp to myDocument. The inserted picture is linked to the file from which it was created and is saved with myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)
myDocument.Shapes.AddPicture FileName:="c:\microsoft office\" & _
    "clipart\music.bmp", LinkToFile:=msoTrue, SaveWithDocument:=msoTrue, _
    Left:=100, Top:=100, Width:=70, Height:=70

See also

Concepts

Shapes Object

Other resources

Shapes Object Members


Point.MarkerBackgroundColor Property (PowerPoint)

 Copy code hover
[image]

Point.MarkerBackgroundColor Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Sets the marker background color as an RGB value or returns the corresponding color index value. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .MarkerBackgroundColor

expression A variable that represents a Point object.

Remarks

This property applies only to line, scatter, and radar charts.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the marker background and foreground colors for the second point in series one for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.SeriesCollection(1).Points(2)

            ' Set the background color to green.

            .MarkerBackgroundColor = RGB(0,255,0)

            ' Set the foreground color to red.

            .MarkerForegroundColor = RGB(255,0,0)

        End With

    End If

End With

See also

Concepts

Point Object

Other resources

Point Object Members


GroupShapes Properties (PowerPoint)

 Copy code hover
[image]

GroupShapes Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
Parent | Returns the parent object for the specified object.


TextStyles.Count Property (PowerPoint)

 Copy code hover
[image]

TextStyles.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a TextStyles object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

TextStyles Object

Other resources

TextStyles Object Members


Slide Object (PowerPoint)

 Copy code hover
[image]

Slide Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a slide. The Slides collection contains all the Slide objects in a presentation.

Remarks

Note Note

Don't be confused if you're trying to return a reference to a single slide but you end up with a SlideRange object. A single slide can be represented either by a Slide object or by a SlideRange collection that contains only one slide, depending on how you return a reference to the slide. For example, if you create and return a reference to a slide by using the Add method, the slide is represented by a Slide object. However, if you create and return a reference to a slide by using the Duplicate method, the slide is represented by a SlideRange collection that contains a single slide. Because all the properties and methods that apply to a Slide object also apply to a SlideRange collection that contains a single slide, you can work with the returned slide in the same way, regardless of whether it is represented by a Slide object or a SlideRange collection.

The following examples describe how to:

  • Return a slide that you specify by name, index number, or slide ID number

  • Return a slide in the selection

  • Return the slide that's currently displayed in any document window or slide show window you specify

  • Create a new slide

Example

Use Slides(index), where index is the slide name or index number, or use Slides.FindBySlideID(index), where index is the slide ID number, to return a single Slide object. The following example sets the layout for slide one in the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(1).Layout = ppLayoutTitle

The following example sets the layout for the slide with the ID number 265.

VBA Copy code Copy code
ActivePresentation.Slides.FindBySlideID(265).Layout = ppLayoutTitle

Use Selection.SlideRange(index), where index is the slide name or index number within the selection, to return a single Slide object. The following example sets the layout for slide one in the selection in the active window, assuming that there's at least one slide selected.

VBA Copy code Copy code
ActiveWindow.Selection.SlideRange(1).Layout = ppLayoutTitle

If there's only one slide selected, you can use Selection.SlideRange to return a SlideRange collection that contains the selected slide. The following example sets the layout for slide one in the current selection in the active window, assuming that there's exactly one slide selected.

VBA Copy code Copy code
ActiveWindow.Selection.SlideRange.Layout = ppLayoutTitle

Use the Slide property to return the slide that's currently displayed in the specified document window or slide show window view. The following example copies the slide that's currently displayed in document window two to the Clipboard.

VBA Copy code Copy code
Windows(2).View.Slide.Copy

Use the Add method to create a new slide and add it to the presentation. The following example adds a title slide to the beginning of the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides.Add 1, ppLayoutTitleOnly

See also

Concepts

PowerPoint Object Model Reference

Other resources

Slide Object Members


Series.HasDataLabels Property (PowerPoint)

 Copy code hover
[image]

Series.HasDataLabels Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if the series has data labels. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .HasDataLabels

expression A variable that represents a Series object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example enables data labels for series three of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.SeriesCollection(3)

            .HasDataLabels = True

            .ApplyDataLabels Type:=xlValue

        End With

    End If

End With

See also

Concepts

Series Object

Other resources

Series Object Members


ChartTitle.Position Property (PowerPoint)

 Copy code hover
[image]

ChartTitle.Position Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the position of the chart title on the chart. Read/write XlChartElementPosition.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Position

expression A variable that represents a ChartTitle object.

See also

Concepts

ChartTitle Object

Other resources

ChartTitle Object Members


ConnectorFormat.EndConnect Method (PowerPoint)

 Copy code hover
[image]

ConnectorFormat.EndConnect Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Attaches the end of the specified connector to a specified shape.

Syntax

expression .EndConnect(ConnectedShape, ConnectionSite)

expression A variable that represents a ConnectorFormat object.

Parameters

Name | Required/Optional | Data Type | Description
ConnectedShape | Required | Shape | The shape to attach the end of the connector to. The specified Shape object must be in the same Shapes collection as the connector.
ConnectionSite | Required | Long | A connection site on the shape specified by ConnectedShape. Must be an integer between 1 and the integer returned by the ConnectionSiteCount property of the specified shape. If you want the connector to automatically find the shortest path between the two shapes it connects, specify any valid integer for this argument and then use the RerouteConnections method after the connector is attached to shapes at both ends.

Remarks

If there's already a connection between the end of the connector and another shape, that connection is broken. If the end of the connector isn't already positioned at the specified connecting site, this method moves the end of the connector to the connecting site and adjusts the size and position of the connector. Use the BeginConnect method to attach the beginning of the connector to a shape.

When you attach a connector to an object, the size and position of the connector are automatically adjusted, if necessary.

Example

This example adds two rectangles to the first slide in the active presentation and connects them with a curved connector. Notice that the RerouteConnections method makes it irrelevant what values you supply for the ConnectionSite arguments used with the BeginConnect and EndConnect methods.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

Set s = myDocument.Shapes

Set firstRect = s.AddShape(msoShapeRectangle, 100, 50, 200, 100)

Set secondRect = s.AddShape(msoShapeRectangle, 300, 300, 200, 100)

With s.AddConnector(msoConnectorCurve, 0, 0, 100, 100) _

        .ConnectorFormat

    .BeginConnect ConnectedShape:=firstRect, ConnectionSite:=1

    .EndConnect ConnectedShape:=secondRect, ConnectionSite:=1

    .Parent.RerouteConnections

End With

See also

Concepts

ConnectorFormat Object

Other resources

ConnectorFormat Object Members


Tags Properties (PowerPoint)

 Copy code hover
[image]

Tags Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


PlaySettings.LoopUntilStopped Property (PowerPoint)

 Copy code hover
[image]

PlaySettings.LoopUntilStopped Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the specified movie or sound loops continuously until either the next movie or sound starts, the user clicks the slide, or a slide transition occurs. Read/write.

Syntax

expression .LoopUntilStopped

expression A variable that represents a PlaySettings object.

Remarks

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

Constant | Description
msoFalse | The specified movie or sound does not loop continuously.
msoTrue | The specified movie or sound loops continuously until either the next movie or sound starts, the user clicks the slide, or a slide transition occurs.

Example

This example specifies that shape three on slide one in the active presentation will start to play in the animation order and will continue to play until the next media clip starts. Shape three must be a sound or movie object.

VBA Copy code Copy code
ActivePresentation.Slides(1).Shapes(3) _

    .AnimationSettings.PlaySettings.LoopUntilStopped = msoTrue

See also

Concepts

PlaySettings Object

Other resources

PlaySettings Object Members


Slides.Count Property (PowerPoint)

 Copy code hover
[image]

Slides.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a Slides object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

Slides Object

Other resources

Slides Object Members


CategoryCollection.Item Method (PowerPoint)

 Copy code hover
[image]

CategoryCollection.Item Method (PowerPoint)
Send feedback

Returns an individual chart category.

Version information

Version Added: PowerPoint 2013

Syntax

expression .Item(Index)

expression A variable that represents a CategoryCollection object.

Parameters

Name | Required/Optional | Data type | Description
Index | Required | VARIANT | The name or index number for the object.
Index | Required | VARIANT |

Return value

CHARTCATEGORY


SectionProperties.Rename Method (PowerPoint)

 Copy code hover
[image]

SectionProperties.Rename Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Renames the specified section with the specified name.

Syntax

expression .Rename(sectionIndex, sectionName)

expression A variable that represents a SectionProperties object.

Parameters

Name | Required/Optional | Data Type | Description
sectionIndex | Required | Integer | The index of the section to rename.
sectionName | Required | String | The new name of the section.

Remarks

If sectionName is empty, the section is assigned the default section name.

See also

Concepts

SectionProperties Object

Other resources

SectionProperties Object Members


FilterEffect.Application Property (PowerPoint)

 Copy code hover
[image]

FilterEffect.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a FilterEffect object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

FilterEffect Object

Other resources

FilterEffect Object Members


TextRange.InsertDateTime Method (PowerPoint)

 Copy code hover
[image]

TextRange.InsertDateTime Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Inserts the date and time in the specified text range. Returns a TextRange object that represents the inserted text.

Syntax

expression .InsertDateTime(DateTimeFormat, InsertAsField)

expression A variable that represents a TextRange object.

Parameters

Name | Required/Optional | Data Type | Description
DateTimeFormat | Required | PpDateTimeFormat | A format for the date and time.
InsertAsField | Optional | MsoTriState | Determines whether the inserted date and time will be updated each time the presentation is opened.

Return Value

TextRange

Remarks

The DateTimeFormat parameter value can be one of these PpDateTimeFormat constants.

ppDateTimeddddMMMMddyyyy

ppDateTimedMMMMyyyy

ppDateTimedMMMyy

ppDateTimeFormatMixed

ppDateTimeHmm

ppDateTimehmmAMPM

ppDateTimeHmmss

ppDateTimehmmssAMPM

ppDateTimeMdyy

ppDateTimeMMddyyHmm

ppDateTimeMMddyyhmmAMPM

ppDateTimeMMMMdyyyy

ppDateTimeMMMMyy

ppDateTimeMMyy

The InsertAsField parameter value can be one of these MsoTriState constants.

Constant | Description
msoFalse | The default.
msoTrue | Updates the inserted date and time each time the presentation is opened.

Example

This example inserts the date and time after the first sentence of the first paragraph in shape two on slide one in the active presentation.

VBA Copy code Copy code
Set sh = Application.ActivePresentation.Slides(1).Shapes(2)

Set sentOne = sh.TextFrame.TextRange.Paragraphs(1).Sentences(1)

sentOne.InsertAfter.InsertDateTime ppDateTimeMdyy

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


TextStyle Members (PowerPoint)

 Copy code hover
[image]

TextStyle Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents one of three text styles: title text, body text, or default text. Each text style contains a TextFrame object that describes how text is placed within the text bounding box, a Ruler object that contains tab stops and outline indent formatting information, and a TextStyleLevels collection that contains outline text formatting information. The TextStyle object is a member of the TextStyles collection.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Levels | Returns a TextStyleLevels object that represents outline text formatting. Read-only.
Parent | Returns the parent object for the specified object.
Ruler | Returns a Ruler object that represents the ruler for the specified text. Read-only.
TextFrame | Returns a TextFrame object that contains the alignment and anchoring properties for the specified shape or master text style.


Column Properties (PowerPoint)

 Copy code hover
[image]

Column Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Cells | Returns a CellRange collection that represents the cells in a table column or row. Read-only.
Parent | Returns the parent object for the specified object.
Width | Returns or sets the width of the specified object, in points. Read/write.


RGBColor.Parent Property (PowerPoint)

 Copy code hover
[image]

RGBColor.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a RGBColor object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

RGBColor Object

Other resources

RGBColor Object Members


ChartCharacters.PhoneticCharacters Property (PowerPoint)

 Copy code hover
[image]

ChartCharacters.PhoneticCharacters Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the phonetic text for the object. Read/write String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .PhoneticCharacters

expression A variable that represents a ChartCharacters object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example replaces the first three characters in the title of the first chart in the active document with Furigana characters.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.Title.Characters(1,3).PhoneticCharacters = "Invalid DDUE based on source, error:image not allowed in code, image filename:543934d2-a0ba-508d-09a6-f71880d969e4Invalid DDUE based on source, error:image not allowed in code, image filename:a10b3c7d-b1d8-6602-439a-071c70a35d5bInvalid DDUE based on source, error:image not allowed in code, image filename:add897d6-e820-bf7c-b867-8727538c8534Invalid DDUE based on source, error:image not allowed in code, image filename:6fad4588-0ab9-3701-681a-34f2765b0aa0"

    End If

End With

See also

Concepts

ChartCharacters Object

Other resources

ChartCharacters Object Members


Table.LastRow Property (PowerPoint)

 Copy code hover
[image]

Table.LastRow Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether to display special formatting for the last row of the specified table. Read/write.

Syntax

expression .LastRow

expression A variable that represents a Table object.

Return Value

Boolean

See also

Concepts

Table Object

Other resources

Table Object Members


FileConverters.Count Property (PowerPoint)

 Copy code hover
[image]

FileConverters.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Long that represents the number of file converters in the collection. Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Count

expression Required. A variable that represents a FileConverters object.

See also

Concepts

FileConverters Object

Other resources

FileConverters Object Members


Comments.Count Property (PowerPoint)

 Copy code hover
[image]

Comments.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a Comments object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

Comments Object

Other resources

Comments Object Members


Sequence.Count Property (PowerPoint)

 Copy code hover
[image]

Sequence.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a Sequence object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

Sequence Object

Other resources

Sequence Object Members


Presentation.RejectAll Method (PowerPoint)

 Copy code hover
[image]

Presentation.RejectAll Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Rejects all changes.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .RejectAll

expression A variable that represents a Presentation object.

Return Value

None

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


PictureFormat.TransparentBackground Property (PowerPoint)

 Copy code hover
[image]

PictureFormat.TransparentBackground Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Determines whether parts of the picture that are the color defined as the transparent color appear transparent. Applies to bitmaps only. Read/write.

Syntax

expression .TransparentBackground

expression A variable that represents a PictureFormat object.

Return Value

MsoTriState

Remarks

Use the TransparencyColor property to set the transparent color.

If you want to be able to see through the transparent parts of the picture all the way to the objects behind the picture, you must set the Visible property of the picture's FillFormat object to msoFalse. If your picture has a transparent color and the Visible property of the picture's FillFormat object is set to msoTrue, the picture's fill will be visible through the transparent color, but objects behind the picture will be obscured.

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

Constant | Description
msoFalse | Parts of the picture that are the color defined as the transparent color do not appear transparent.
msoTrue | Parts of the picture that are the color defined as the transparent color appear transparent.

Example

This example sets the color that has the RGB value returned by the function RGB(0, 24, 240) as the transparent color for shape one on myDocument. For the example to work, shape one must be a bitmap.

VBA Copy code Copy code
blueScreen = RGB(0, 0, 255)

Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(1)

    With .PictureFormat

        .TransparentBackground = msoTrue

        .TransparencyColor = blueScreen

    End With

    .Fill.Visible = msoFalse

End With

See also

Concepts

PictureFormat Object

Other resources

PictureFormat Object Members


Broadcast.End Method (PowerPoint)

 Copy code hover
[image]

Broadcast.End Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Elevates to the system to delete the document from the Broadcast Documents library.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .End

expression A variable that represents a Broadcast object.

Parameters

Name | Required/Optional | Data Type | Description
Required | FileID | String | The file to be removed from the Broadcast Documents library.

Return Value

None

Remarks

This method validates that the user who made the request is the creator of the document. Elevation is necessary because presenters do not have access to directly delete documents from the Broadcast Documents library.

See also

Concepts

Broadcast Object

Other resources

Broadcast Object Members


ChartFont.Underline Property (PowerPoint)

 Copy code hover
[image]

ChartFont.Underline Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the type of underline applied to the font. Can be one of the XlUnderlineStyle constants. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Underline

expression A variable that represents a ChartFont object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the font in the title of the first chart in the active document to single underline.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.ChartTitle.Font.Underline = xlUnderlineStyleSingle

    End If

End With

See also

Concepts

ChartFont Object

Other resources

ChartFont Object Members


Series Properties (PowerPoint)

 Copy code hover
[image]

Series Properties (PowerPoint)
Send feedback

Published: July 12, 2012

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
ApplyPictToEnd | True if a picture is applied to the end of the point or all points in the series. Read/write Boolean.
ApplyPictToFront | True if a picture is applied to the front of the point or all points in the series. Read/write Boolean.
ApplyPictToSides | True if a picture is applied to the sides of the point or all points in the series. Read/write Boolean.
AxisGroup | Returns the type of axis group. Read/write XlAxisGroup.
BarShape | Returns or sets the shape used for a single series in a 3-D bar or column chart. Read/write XlBarShape.
BubbleSizes | Returns or sets a string that refers to the worksheet cells that contain the x-value, y-value, and size data for the bubble chart. Read/write Variant.
ChartType | Returns or sets the chart type. Read/write XlChartType.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
ErrorBars | Returns the error bars for the series. Read-only ErrorBars.
Explosion | Returns or sets the explosion value for a pie-chart or doughnut-chart slice. Read/write Long.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Formula | Returns or sets the object's formula in A1-style notation and in the language of the macro. Read/write String.
FormulaLocal | Returns or sets the formula for the object, using A1-style references in the language of the user. Read/write String.
FormulaR1C1 | Returns or sets the formula for the object, using R1C1-style notation in the language of the macro. Read/write String.
FormulaR1C1Local | Returns or sets the formula for the object, using R1C1-style notation in the language of the user. Read/write String.
Has3DEffect | True if the series has a three-dimensional appearance. Read/write Boolean.
HasDataLabels | True if the series has data labels. Read/write Boolean.
HasErrorBars | True if the series has error bars. Read/write Boolean.
HasLeaderLines | True if the series has leader lines. Read/write Boolean.
InvertColor | Returns or sets the fill color for negative data points in a series. Read/write.
InvertColorIndex | Returns or sets the fill color for negative data points in a series. Read/write.
InvertIfNegative | True if Microsoft Word inverts the pattern in the object when it corresponds to a negative number. Read/write Variant.
IsFiltered | Returns or sets a Boolean that determines whether the specified chart series is filtered out from the chart. Read-write.
LeaderLines | Returns the leader lines for the series. Read-only LeaderLines.
MarkerBackgroundColor | Sets the marker background color as an RGB value or returns the corresponding color index value. Read/write Long.
MarkerBackgroundColorIndex | Returns or sets the marker background color as an index into the current color palette, or as one of the following XlColorIndex constants: xlColorIndexAutomatic or xlColorIndexNone. Read/write Long.
MarkerForegroundColor | Sets the marker foreground color as an RGB value or returns the corresponding color index value. Read/write Long.
MarkerForegroundColorIndex | Returns or sets the marker foreground color as an index into the current color palette, or as one of the following XlColorIndex constants: xlColorIndexAutomatic or xlColorIndexNone. Read/write Long.
MarkerSize | Returns or sets the data-marker size, in points. Read/write Long.
MarkerStyle | Returns or sets the marker style for a point or series in a line chart, scatter chart, or radar chart. Read/write XlMarkerStyle.
Name | Returns or sets the name of the object. Read/write String.
Parent | Returns the parent for the specified object. Read-only Object.
PictureType | Returns or sets a value that specifies how pictures are displayed on a column or bar picture chart. Read/write XlChartPictureType.
PictureUnit2 | Returns or sets the unit for each picture on the chart if the PictureType property is set to xlStackScale; otherwise, this property is ignored. Read/write Double.
PlotColorIndex | Returns an index value that is used internally to associate series formatting with chart elements. Read-only.
PlotOrder | Returns or sets the plot order for the selected series within the chart group. Read/write Long.
Shadow | Returns or sets a value that indicates whether the object has a shadow. Read/write Boolean.
Smooth | True if curve smoothing is enabled for the line chart or scatter chart. Read/write Boolean.
Type | Returns or sets the series type. Read/write Long.
Values | Returns or sets a collection of all the values in the series. Read/write Variant.
XValues | Returns or sets an array of x values for a chart series. Read/write Variant.


HeadersFooters Members (PowerPoint)

 Copy code hover
[image]

HeadersFooters Members (PowerPoint)
Send feedback

Published: July 16, 2012

Contains all the HeaderFooter objects on the specified slide, notes page, handout, or master.

Methods

Name | Description
Clear | Clears the header and footer from the specified slide or slides.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
DateAndTime | Returns a HeaderFooter object that represents the date and time item that appears in the lower-left corner of a slide or in the upper-right corner of a notes page, handout, or outline. Read-only.
DisplayOnTitleSlide | Determines whether the footer, date and time, and slide number appear on the title slide. Applies to slide masters. Read/write.
Footer | Returns a HeaderFooter object that represents the footer that appears at the bottom of a slide or in the lower-left corner of a notes page, handout, or outline. Read-only.
Header | Returns a HeaderFooter object that represents the header that appears at the top of a slide or in the upper-left corner of a notes page, handout, or outline. Read-only.
Parent | Returns the parent object for the specified object.
SlideNumber | Returns a HeaderFooter object that represents the slide number in the lower-right corner of a slide, or the page number in the lower-right corner of a notes page or a page of a printed handout or outline. Read-only.


TextStyles Methods (PowerPoint)

 Copy code hover
[image]

TextStyles Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Item | Returns a single text style from the specified TextStyles collection.


Shape.TextEffect Property (PowerPoint)

 Copy code hover
[image]

Shape.TextEffect Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a TextEffectFormat object that contains text-effect formatting properties for the specified shape. Read-only.

Syntax

expression .TextEffect

expression A variable that represents a Shape object.

Return Value

TextEffectFormat

Remarks

Applies to Shape objects that represent WordArt.

Example

This example sets the font style to bold for shape three on myDocument if the shape is WordArt.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(3)

    If .Type = msoTextEffect Then

        .TextEffect.FontBold = True

    End If

End With

See also

Concepts

Shape Object

Other resources

Shape Object Members


ConnectorFormat.EndConnected Property (PowerPoint)

 Copy code hover
[image]

ConnectorFormat.EndConnected Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Determines whether the end of the specified connector is connected to a shape. Read-only.

Syntax

expression .EndConnected

expression A variable that represents an ConnectorFormat object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The end of the specified connector is not connected to a shape.
msoTrue | The end of the specified connector is connected to a shape.

Example

If the end of the connector represented by shape three on the first slide in the active presentation is connected to a shape, this example stores the connection site number in the variable oldEndConnSite, stores a reference to the connected shape in the object variable oldEndConnShape, and then disconnects the end of the connector from the shape.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(3)

    If .Connector Then

        With .ConnectorFormat

            If .EndConnected Then

                oldEndConnSite = .EndConnectionSite

                Set oldEndConnShape = .EndConnectedShape

                .EndDisconnect

            End If

        End With

    End If

End With

See also

Concepts

ConnectorFormat Object

Other resources

ConnectorFormat Object Members


Shapes.Parent Property (PowerPoint)

 Copy code hover
[image]

Shapes.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a Shapes object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

Shapes Object

Other resources

Shapes Object Members


ShadowFormat.Style Property (PowerPoint)

 Copy code hover
[image]

ShadowFormat.Style Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the shadow style. Read/write.

Syntax

expression .Style

expression A variable that represents a ShadowFormat object.

Return Value

MsoShadowStyle

See also

Concepts

ShadowFormat Object

Other resources

ShadowFormat Object Members


AnimationBehaviors Members (PowerPoint)

 Copy code hover
[image]

AnimationBehaviors Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a collection of AnimationBehavior objects.

Methods

Name | Description
Add | Returns an AnimationBehavior object that represents a new animation behavior.
Item | Returns a single AnimationBehavior object from the specified AnimationBehaviors collection.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


ChartData Object (PowerPoint)

 Copy code hover
[image]

ChartData Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents access to the linked or embedded data associated with a chart.

Version Information

Version Added: PowerPoint 2007

Remarks

Use the ChartData property to return the ChartData object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example uses the Activate method to display the data associated with the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1).Chart.ChartData

    .Activate

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

ChartData Object Members


LeaderLines.Border Property (PowerPoint)

 Copy code hover
[image]

LeaderLines.Border Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the border of the object. Read-only ChartBorder.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Border

expression A variable that represents a LeaderLines object.

See also

Concepts

LeaderLines Object

Other resources

LeaderLines Object Members


DataLabel.Caption Property (PowerPoint)

 Copy code hover
[image]

DataLabel.Caption Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the data label text. Read/write String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Caption

expression A variable that represents a DataLabel object.

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


ResampleMediaTask.VideoCompressionType Property (PowerPoint)

 Copy code hover
[image]

ResampleMediaTask.VideoCompressionType Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the video compression format of the sample. Read-only.

Syntax

expression .VideoCompressionType

expression A variable that represents a ResampleMediaTask object.

See also

Concepts

ResampleMediaTask Object

Other resources

ResampleMediaTask Object Members


Series.ApplyPictToSides Property (PowerPoint)

 Copy code hover
[image]

Series.ApplyPictToSides Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if a picture is applied to the sides of the point or all points in the series. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ApplyPictToSides

expression A variable that represents a Series object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example applies pictures to the sides of all points in the first series of the first chart in the active document. The series must already have pictures applied to it (setting this property changes the picture orientation).

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).ApplyPictToSides = True

    End If

End With

See also

Concepts

Series Object

Other resources

Series Object Members


Slides.InsertFromFile Method (PowerPoint)

 Copy code hover
[image]

Slides.InsertFromFile Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Inserts slides from a file into a presentation, at the specified location. Returns an Integer that represents the number of slides inserted.

Syntax

expression .InsertFromFile(FileName, Index, SlideStart, SlideEnd)

expression A variable that represents a Slides object.

Parameters

Name | Required/Optional | Data Type | Description
FileName | Required | String | The name of the file that contains the slides you want to insert.
Index | Required | Long | The index number of the Slide object in the specified Slides collection you want to insert the new slides after.
SlideStart | Optional | Long | The index number of the first Slide object in the Slides collection in the file denoted by FileName.
SlideEnd | Optional | Long | The index number of the last Slide object in the Slides collection in the file denoted by FileName.

Return Value

Integer

Example

This example inserts slides three through six from C:\Ppt\Sales.ppt after slide two in the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides.InsertFromFile _

    "c:\ppt\sales.ppt", 2, 3, 6

See also

Concepts

Slides Object

Other resources

Slides Object Members


AddIns Members (PowerPoint)

 Copy code hover
[image]

AddIns Members (PowerPoint)
Send feedback

Published: July 16, 2012

A collection of AddIn objects that represent all the Microsoft PowerPoint-specific add-ins available to PowerPoint, regardless of whether or not they are loaded. This does not include Component Object Model (COM) add-ins.

Methods

Name | Description
Add | Returns an AddIn object that represents an add-in file added to the list of add-ins.
Item | Returns a single Addin object from the specified Addins collection.
Remove | Removes an add-in from the collection of add-ins.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


TextRange.Words Method (PowerPoint)

 Copy code hover
[image]

TextRange.Words Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a TextRange object that represents the specified subset of text words.

Syntax

expression .Words(Start, Length)

expression A variable that represents a TextRange object.

Parameters

Name | Required/Optional | Data Type | Description
Start | Optional | Long | The first word in the returned range.
Length | Optional | Long | The number of words to be returned.

Return Value

TextRange

Remarks

For information about counting or looping through the words in a text range, see the TextRange object.

If both Start and Length are omitted, the returned range starts with the first word and ends with the last paragraph in the specified range.

If Start is specified but Length is omitted, the returned range contains one word.

If Length is specified but Start is omitted, the returned range starts with the first word in the specified range.

If Start is greater than the number of words in the specified text, the returned range starts with the last word in the specified range.

If Length is greater than the number of words from the specified starting word to the end of the text, the returned range contains all those words.

Example

This example formats as bold the second, third, and fourth words in the first paragraph in shape two on slide one in the active presentation.

VBA Copy code Copy code
Application.ActivePresentation.Slides(1).Shapes(2) _

    .TextFrame.TextRange.Paragraphs(1).Words(2, 3).Font _

    .Bold = True

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


Shape.Id Property (PowerPoint)

 Copy code hover
[image]

Shape.Id Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Long that identifies the shape or range of shapes. Read-only.

Syntax

expression .Id

expression A variable that represents a Shape object.

Return Value

Long

Example

This example adds a new shape to the active presentation, then fills the shape according to the value of the Id property.

VBA Copy code Copy code
Sub ShapeID()

    With ActivePresentation.Slides(1).Shapes.AddShape _

            (Type:=msoShape5pointStar, Left:=100, _

            Top:=100, Width:=100, Height:=100)

        Select Case .Id

            Case 0 To 500

                .Fill.ForeColor.RGB = RGB(Red:=255, Green:=0, Blue:=0)

            Case 500 To 1000

                .Fill.ForeColor.RGB = RGB(Red:=255, Green:=255, Blue:=0)

            Case 1000 To 1500

                .Fill.ForeColor.RGB = RGB(Red:=255, Green:=0, Blue:=255)

            Case 1500 To 2000

                .Fill.ForeColor.RGB = RGB(Red:=0, Green:=255, Blue:=0)

            Case 2000 To 2500

                .Fill.ForeColor.RGB = RGB(Red:=0, Green:=255, Blue:=255)

            Case Else

                .Fill.ForeColor.RGB = RGB(Red:=0, Green:=0, Blue:=255)

        End Select

    End With

End Sub

See also

Concepts

Shape Object

Other resources

Shape Object Members


ShapeRange.Width Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.Width Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the width of the specified object, in points. Read/write.

Syntax

expression .Width

expression A variable that represents a ShapeRange object.

Return Value

Single

Example

This example arranges windows one and two horizontally; in other words, each window occupies half the available vertical space and all the available horizontal space in the application window's client area. For this example to work, there must be only two document windows open.

VBA Copy code Copy code
Windows.Arrange ppArrangeTiled

ah = Windows(1).Height                      ' available height

aw = Windows(1).Width + Windows(2).Width    ' available width

With Windows(1)

    .Width = aw

    .Height = ah / 2

    .Left = 0

End With

With Windows(2)

    .Width = aw

    .Height = ah / 2

    .Top = ah / 2

    .Left = 0

End With

This example sets the width for column one in the specified table to 80 points (72 points per inch).

VBA Copy code Copy code
ActivePresentation.Slides(2).Shapes(5).Table.Columns(1).Width = 80

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


ThreeDFormat.SetPresetCamera Method (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.SetPresetCamera Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Specifies the effects camera type and rotation to use for the specified ThreeDFormat object.

Syntax

expression .SetPresetCamera(PresetCamera)

expression A variable that represents a ThreeDFormat object.

Parameters

Name | Required/Optional | Data Type | Description
PresetCamera | Required | MsoLightRigType | The ThreeDFormat object's effects camera type and rotation.

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


Shape.Vertices Property (PowerPoint)

 Copy code hover
[image]

Shape.Vertices Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the coordinates of the specified freeform drawing's vertices (and control points for Bézier curves) as a series of coordinate pairs. Read-only.

Syntax

expression .Vertices

expression A variable that represents a Shape object.

Return Value

Variant

Remarks

You can use the array returned by this property as an argument to the AddCurve method or AddPolyline method.

The following table shows how the Vertices property associates the values in the array vertArray() with the coordinates of a triangle's vertices.

VertArray element | Contains
VertArray(1, 1) | The horizontal distance from the first vertex to the left side of the slide
VertArray(1, 2) | The vertical distance from the first vertex to the top of the slide
VertArray(2, 1) | The horizontal distance from the second vertex to the left side of the slide
VertArray(2, 2) | The vertical distance from the second vertex to the top of the slide
VertArray(3, 1) | The horizontal distance from the third vertex to the left side of the slide
VertArray(3, 2) | The vertical distance from the third vertex to the top of the slide

Example

This example assigns the vertex coordinates for shape one on myDocument to the array variable vertArray() and displays the coordinates for the first vertex.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(1)

    vertArray = .Vertices

    x1 = vertArray(1, 1)

    y1 = vertArray(1, 2)

    MsgBox "First vertex coordinates: " & x1 & ", " & y1

End With

This example creates a curve that has the same geometric description as shape one on myDocument. Shape one must contain 3n+1 vertices for this example to succeed.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    .AddCurve .Item(1).Vertices

End With

See also

Concepts

Shape Object

Other resources

Shape Object Members


XlLineStyle Enumeration (PowerPoint)

 Copy code hover
[image]

XlLineStyle Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the line style for the border.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlContinuous | 1 | A continuous line.
xlDash | -4115 | A dashed line.
xlDashDot | 4 | Alternating dashes and dots.
xlDashDotDot | 5 | A dash followed by two dots.
xlDot | -4118 | A dotted line.
xlDouble | -4119 | A double line.
xlLineStyleNone | -4142 | No line.
xlSlantDashDot | 13 | Slanted dashes.


DataLabel.NumberFormat Property (PowerPoint)

 Copy code hover
[image]

DataLabel.NumberFormat Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the format code for the object. Read/write String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .NumberFormat

expression A variable that represents a DataLabel object.

Remarks

The format code is the same string as the Format Codes option in the Format Cells dialog box. The Format function uses different format code strings than do the NumberFormat and NumberFormatLocal properties.

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


XlChartItem Enumeration (PowerPoint)

 Copy code hover
[image]

XlChartItem Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the type of the chart item.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlAxis | 21 | Axis.
xlAxisTitle | 17 | Axis title.
xlChartArea | 2 | Chart area.
xlChartTitle | 4 | Chart title.
xlCorners | 6 | Corners.
xlDataLabel | 0 | Data label.
xlDataTable | 7 | Data table.
xlDisplayUnitLabel | 30 | Display unit label.
xlDownBars | 20 | Down bars.
xlDropLines | 26 | Drop lines.
xlErrorBars | 9 | Error bars.
xlFloor | 23 | Floor.
xlHiLoLines | 25 | HiLo lines.
xlLeaderLines | 29 | Leader lines.
xlLegend | 24 | Legend.
xlLegendEntry | 12 | Legend entry.
xlLegendKey | 13 | Legend key.
xlMajorGridlines | 15 | Major gridlines.
xlMinorGridlines | 16 | Minor gridlines.
xlNothing | 28 | Nothing.
xlPivotChartDropZone | 32 | PivotChart drop zone.
xlPivotChartFieldButton | 31 | PivotChart field button.
xlPlotArea | 19 | Plot area.
xlRadarAxisLabels | 27 | Radar axis labels.
xlSeries | 3 | Series.
xlSeriesLines | 22 | Series lines.
xlShape | 14 | Shape.
xlTrendline | 8 | Trend line.
xlUpBars | 18 | Up bars.
xlWalls | 5 | Walls.
xlXErrorBars | 10 | X error bars.
xlYErrorBars | 11 | Y error bars.


Application.OpenThemeFile Method (PowerPoint)

 Copy code hover
[image]

Application.OpenThemeFile Method (PowerPoint)
Send feedback

Opens the specified theme file (*thmx).

Version information

Version Added: PowerPoint 2013

Syntax

expression .OpenThemeFile(themeFileName)

expression A variable that represents a Application object.

Parameters

Name | Required/Optional | Data type | Description
themeFileName | Required | String | The path of the theme file (*.thmx) to open.
themeFileName | Required | STRING |

Return value

Theme

Example

This example opens a theme file, gets the ID of the third variant in the theme, and applies it to the first slide in the presentation.

VBA Copy code Copy code
Sub ChangeThemeVariant()

    Dim name As String
    Dim path As String
    Dim variantID As String

    ' Get the name of the active theme family.
    name = ActivePresentation.TemplateName

    ' You need access to the Theme Family in order to access the variants.
    path = "C:\Program Files (x86)\Microsoft Office\Document Themes 15\" & _
        ActivePresentation.TemplateName & ".thmx"

    ' Get the variant ID of the third Variant
    ' and apply that variant to the presentation.
    variantID = PowerPoint.Application.OpenThemeFile(path).ThemeVariants(3).Id
    ActivePresentation.Slides(1).ApplyTemplate2 path, variantID

End Sub


View.ZoomToFit Property (PowerPoint)

 Copy code hover
[image]

View.ZoomToFit Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Determines whether the view is zoomed to fit the dimensions of the document window every time the document window is resized. Read/write.

Syntax

expression .ZoomToFit

expression A variable that represents a View object.

Return Value

MsoTriState

Remarks

This property applies only to slide view, notes page view, or master view.

When the value of the Zoom property is explicitly set, the value of the ZoomToFit property is automatically set to msoFalse.

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

Constant | Description
msoFalse | The view is not zoomed to fit the dimensions of the document window every time the document window is resized.
msoTrue | The view is zoomed to fit the dimensions of the document window every time the document window is resized.

Example

The following example sets the view in document window one to slide view, with the zoom automatically set to fit the dimensions of the window.

VBA Copy code Copy code
With Windows(1)

    .ViewType = ppViewSlide

    .View.ZoomToFit = msoTrue

End With

See also

Concepts

View Object

Other resources

View Object Members


SlideShowView.GotoClick Method (PowerPoint)

 Copy code hover
[image]

SlideShowView.GotoClick Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Plays an animation associated with a specified mouse click and any animations that follow on the slide.

Syntax

expression .GotoClick(Index)

expression A variable that represents a SlideShowView object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Long | The index number of the mouse click that initiates an animation.

Remarks

Use the GetClickIndex method to return the index number of the current mouse click for an animation that is actively playing on a slide or has just finished.

Specifying a value of 0 for Index plays animations beginning at the point just before any animations that run automatically. Specifying a value of msoClickStateBeforeAutomaticAnimations for Index moves to the point just before any animations that run automatically, and then pauses. Specifying an value of msoClickStateAfterAllAnimations for Index moves to the point after all animations.

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


Master.CustomerData Property (PowerPoint)

 Copy code hover
[image]

Master.CustomerData Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a CustomerData object. Read-only.

Syntax

expression .CustomerData

expression An expression that returns a Master object.

Return Value

CustomerData

See also

Concepts

Master Object

Other resources

Master Object Members


Slide.MoveTo Method (PowerPoint)

 Copy code hover
[image]

Slide.MoveTo Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Moves the specified object to a specific location within the same collection, renumbering all other items in the collection appropriately.

Syntax

expression .MoveTo(toPos)

expression A variable that represents a Slide object.

Parameters

Name | Required/Optional | Data Type | Description
toPos | Required | Long | The index position to which to move the animation effect.

Example

This example moves an animation effect to the second in the animation effects collection for the specified shape.

VBA Copy code Copy code
Sub MoveEffect()

    Dim sldFirst as Slide

    Dim shpFirst As Shape

    Dim effAdd As Effect

    Set sldFirst = ActivePresentation.Slides(1)

    Set shpFirst = sldFirst.Shapes(1)

    Set effAdd = sldFirst.TimeLine.MainSequence.AddEffect _

        (Shape:=shpFirst, effectId:=msoAnimEffectBlinds)

    effAdd.MoveTo toPos:=2

End Sub

This example moves the second slide in the active presentation to the first slide.

VBA Copy code Copy code
Sub MoveSlideToNewLocation()

    ActivePresentation.Slides(2).MoveTo toPos:=1

End Sub

See also

Concepts

Slide Object

Other resources

Slide Object Members


Presentation.AddTitleMaster Method (PowerPoint)

 Copy code hover
[image]

Presentation.AddTitleMaster Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Adds a title master to the specified presentation and returns a Master object that represents the title master.

Syntax

expression .AddTitleMaster

expression A variable that represents a Presentation object.

Return Value

Master

Remarks

If the presentation already has a title master, an error occurs.

Example

This example adds a title master to the active presentation if it doesn't already have one.

VBA Copy code Copy code
With Application.ActivePresentation

    If Not .HasTitleMaster Then .AddTitleMaster

End With

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


AnimationPoint Properties (PowerPoint)

 Copy code hover
[image]

AnimationPoint Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Formula | Returns or sets a String that represents a formula to use for calculating an animation. Read/write.
Parent | Returns the parent object for the specified object.
Time | Sets or returns the time at a given animation point. Read/write.
Value | Sets or returns the value of a property for an animation point. Read/write.


Axes Members (PowerPoint)

 Copy code hover
[image]

Axes Members (PowerPoint)
Send feedback

Published: July 12, 2012

Represents a collection of all the Axis objects in the specified chart.

Methods

Name | Description
Item | Returns a single Axis object from an Axes collection.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Count | Returns the number of objects in the collection. Read-only Long.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Parent | Returns the parent for the specified object. Read-only Object.


PpMediaType Enumeration (PowerPoint)

 Copy code hover
[image]

PpMediaType Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Indicates the OLE media type.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppMediaTypeMixed | -2 | Mixed
ppMediaTypeMovie | 3 | Movie
ppMediaTypeOther | 1 | Others
ppMediaTypeSound | 2 | Sound


ParagraphFormat.BaseLineAlignment Property (PowerPoint)

 Copy code hover
[image]

ParagraphFormat.BaseLineAlignment Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the base line alignment for the specified paragraph. Read/write.

Syntax

expression .BaseLineAlignment

expression A variable that represents a ParagraphFormat object.

Return Value

PpBaselineAlignment

Remarks

The value of the BaseLineAlignment property can be one of these PpBaselineAlignment constants

ppBaselineAlignBaseline

ppBaselineAlignCenter

ppBaselineAlignFarEast50

ppBaselineAlignMixed

ppBaselineAlignTop

Example

This example displays the base line alignment for the paragraphs in shape two on slide one in the active presentation.

VBA Copy code Copy code
MsgBox ActivePresentation.Slides(1).Shapes(2).TextFrame.TextRange _

    .ParagraphFormat.BaseLineAlignment

See also

Concepts

ParagraphFormat Object

Other resources

ParagraphFormat Object Members


Shape.LockAspectRatio Property (PowerPoint)

 Copy code hover
[image]

Shape.LockAspectRatio Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the specified shape retains its original proportions when you resize it. Read/write.

Syntax

expression .LockAspectRatio

expression A variable that represents a Shape object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | You can change the height and width of the shape independently of one another when you resize it.
msoTrue | The specified shape retains its original proportions when you resize it.

Example

This example adds a cube to myDocument. The cube can be moved and resized, but not reproportioned.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes.AddShape(msoShapeCube, 50, 50, 100, 200).LockAspectRatio = msoTrue

See also

Concepts

Shape Object

Other resources

Shape Object Members


TickLabels.Delete Method (PowerPoint)

 Copy code hover
[image]

TickLabels.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Delete

expression A variable that represents a TickLabels object.

See also

Concepts

TickLabels Object

Other resources

TickLabels Object Members


PpHTMLVersion Enumeration (PowerPoint)

 Copy code hover
[image]

PpHTMLVersion Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the version of HTML for a published presentation.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppHTMLAutodetect | 4 | Autodetect
ppHTMLDual | 3 | Dual version
ppHTMLv3 | 1 | HTML Version 3
ppHTMLv4 | 2 | HTML Version 4 (Default)


DataLabels.Parent Property (PowerPoint)

 Copy code hover
[image]

DataLabels.Parent Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents a DataLabels object.

See also

Concepts

DataLabels Object

Other resources

DataLabels Object Members


TimeLine.MainSequence Property (PowerPoint)

 Copy code hover
[image]

TimeLine.MainSequence Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Sequence object that represents the collection of Effect objects in the main animation sequence of a slide.

Syntax

expression .MainSequence

expression A variable that represents a TimeLine object.

Return Value

Sequence

Remarks

The default value of the MainSequence property is an empty Sequence collection. Any attempt to return a value from this property without adding one or more Effect objects to the main animation sequence will result in a run-time error.

Example

The following example adds a boomerang animation to a new shape on a new slide added to the active presentation.

VBA Copy code Copy code
Sub NewSequence()

    Dim sldNew As Slide

    Dim shpnew As Shape

    Set sldNew = ActivePresentation.Slides.Add(Index:=1, Layout:=ppLayoutBlank)

    Set shpnew = sldNew.Shapes.AddShape(Type:=msoShape5pointStar, _

        Left:=25, Top:=25, Width:=100, Height:=100)

    With sldNew.TimeLine.MainSequence.AddEffect(Shape:=shpnew, _

            EffectId:=msoAnimEffectBoomerang)

        .Timing.Speed = 0.5

        .Timing.Accelerate = 0.2

    End With

End Sub

See also

Concepts

TimeLine Object

Other resources

TimeLine Object Members


AnimationBehaviors Methods (PowerPoint)

 Copy code hover
[image]

AnimationBehaviors Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Add | Returns an AnimationBehavior object that represents a new animation behavior.
Item | Returns a single AnimationBehavior object from the specified AnimationBehaviors collection.


ChartTitle.Top Property (PowerPoint)

 Copy code hover
[image]

ChartTitle.Top Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the distance, in points, from the top edge of the object to the top of the first row (on a worksheet) or the top of the chart area (on a chart). Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Top

expression A variable that represents a ChartTitle object.

See also

Concepts

ChartTitle Object

Other resources

ChartTitle Object Members


Legend Methods (PowerPoint)

 Copy code hover
[image]

Legend Methods (PowerPoint)
Send feedback

Published: July 12, 2012

This object has the following methods:

Methods

Name | Description
Clear | Clears the entire object.
Delete | Deletes the object.
LegendEntries | Returns a collection of legend entries for the legend.
Select | Selects the object.


ShapeRange.Name Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.Name Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When a shape is created, Microsoft PowerPoint automatically assigns it a name in the form ShapeType Number, where ShapeType identifies the type of shape or AutoShape, and Number is an integer that's unique within the collection of shapes on the slide. For example, the automatically generated names of the shapes on a slide could be Placeholder 1, Oval 2, and Rectangle 3. To avoid conflict with automatically assigned names, don't use the form ShapeType Number for user-defined names, where ShapeType is a value that is used for automatically generated names, and Number is any positive integer. A shape range must contain exactly one shape. Read/write.

Syntax

expression .Name

expression A variable that represents a ShapeRange object.

Return Value

String

Remarks

You can use the object's name in conjunction with the Item method to return a reference to the object if the Item method for the collection that contains the object takes a Variant argument. For example, if the value of the Name property for a shape is Rectangle 2, then .Shapes("Rectangle 2") will return a reference to that shape.

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


DisplayUnitLabel.Formula Property (PowerPoint)

 Copy code hover
[image]

DisplayUnitLabel.Formula Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the object's formula in A1-style notation. Read/write.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Formula

expression A variable that represents a DisplayUnitLabel object.

See also

Concepts

DisplayUnitLabel Object

Other resources

DisplayUnitLabel Object Members


ThreeDFormat.PresetLighting Property (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.PresetLighting Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the effects lighting used by the specified ThreeDFormat object. Read/write.

Syntax

expression .PresetLighting

expression A variable that represents a ThreeDFormat object.

Return Value

MsoLightRigType

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


ChartFont.FontStyle Property (PowerPoint)

 Copy code hover
[image]

ChartFont.FontStyle Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the font style. Read/write String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .FontStyle

expression A variable that represents a ChartFont object.

Remarks

Changing this property may affect other ChartFont properties (such as Bold and Italic).

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the font style for the title of the first chart in the active document to bold and italic.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.Title.Font.FontStyle = "Bold Italic"

    End If

End With

See also

Concepts

ChartFont Object

Other resources

ChartFont Object Members


Shape.ShapeStyle Property (PowerPoint)

 Copy code hover
[image]

Shape.ShapeStyle Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns the shape style index for the specified object. Read/write.

Syntax

expression .ShapeStyle

expression An expression that returns a Shape object.

Remarks

The value of the ShapeStyle property can be one of the MsoShapeStyleIndex constants.

See also

Concepts

Shape Object

Other resources

Shape Object Members


Chart.Paste Method (PowerPoint)

 Copy code hover
[image]

Chart.Paste Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Pastes chart data from the Clipboard into the chart.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Paste(Type)

expression A variable that represents a Chart object.

Parameters

Name

Required/Optional

Data Type

Description

Type

Optional

Variant

Specifies the chart information to paste if a chart is on the Clipboard. Can be one of the following values:

-4104 | Everything will be pasted. This is the default value.
-4122 | Copied source formats are pasted.
-4123 | Formulas are pasted.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example activates the Microsoft Excel workbook associated with the first chart in the active document. If the Excel workbook has multiple windows, the example activates the first window. The example then copies the contents of cells B1 through B5 and pastes the cell contents into the chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.ChartData.Activate

        .Chart.ChartData.Workbook. _

            Worksheets("Sheet1").Range("B1:B5").Copy

        .Chart.Paste

    End If

End With

See also

Concepts

Chart Object

Other resources

Chart Object Members


Chart.Shapes Property (PowerPoint)

 Copy code hover
[image]

Chart.Shapes Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a collection that represents all the shapes on the chart sheet. Read-only Shapes.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Shapes

expression A variable that represents a Chart object.

See also

Concepts

Chart Object

Other resources

Chart Object Members


HeaderFooter.Parent Property (PowerPoint)

 Copy code hover
[image]

HeaderFooter.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a HeaderFooter object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

HeaderFooter Object

Other resources

HeaderFooter Object Members


Presentations Members (PowerPoint)

 Copy code hover
[image]

Presentations Members (PowerPoint)
Send feedback

Published: July 16, 2012

A collection of all the Presentation objects in Microsoft PowerPoint. Each Presentation object represents a presentation that's currently open in PowerPoint.

Methods

Name | Description
Add | Creates a presentation. Returns a Presentation object that represents the new presentation.
CanCheckOut | Returns True if Microsoft PowerPoint can check out a specified presentation from a server.
CheckOut | Copies a specified presentation from a server to a local computer for editing. Returns a String that represents the local path and file name of the presentation checked out.
Item | Returns a single Presentation object from the specified Presentations collection.
Open | Opens the specified presentation. Returns a Presentation object that represents the opened presentation.
Open2007 | Opens the specified presentation and provides the option to repair the presentation file. Returns a Presentation object that represents the opened presentation.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


CalloutFormat.Length Property (PowerPoint)

 Copy code hover
[image]

CalloutFormat.Length Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When the AutoLength property of the specified callout is set to False, the Length property returns the length (in points) of the first segment of the callout line (the segment attached to the text callout box). Read-only.

Syntax

expression .Length

expression A variable that represents a CalloutFormat object.

Remarks

Applies only to callouts whose lines consist of more than one segment (types msoCalloutThree and msoCalloutFour). Use the CustomLength method to set the value of this property for the CalloutFormat object.

Example

If the first line segment in the callout named "co1" has a fixed length, this example specifies that the length of the first line segment in the callout named "co2" will also be fixed at that length. For the example to work, both callouts must have multiple-segment lines.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    With .Item("co1").Callout

        If Not .AutoLength Then len1 = .Length

    End With

    If len1 Then .Item("co2").Callout.CustomLength len1

End With

See also

Concepts

CalloutFormat Object

Other resources

CalloutFormat Object Members


FileConverters Object (PowerPoint)

 Copy code hover
[image]

FileConverters Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

A collection of FileConverter objects that represent all the file converters available for opening and saving files.

Version Information

Version Added: PowerPoint 2007

Remarks

Use the FileConverters property to return the FileConverters collection. The following example determines whether a WordPerfect 6.0 converter is available.

VBA Copy code Copy code
For Each conv In FileConverters

    If conv.FormatName = "WordPerfect 6.x" Then

        MsgBox "WordPerfect 6.0 converter is installed"

    End if

Next conv

The Add method isn't available for the FileConverters collection. FileConverter objects are added during installation of Microsoft Office or by installing supplemental converters.

Use FileConverters(Index), where Index is a class name or index number, to return a single FileConverter object. The following example displays the extensions associated wtih the Microsoft Excel worksheet converter.

VBA Copy code Copy code
MsgBox FileConverters("MSBiff").Extensions

The index number represents the position of the file converter in the FileConverters collection. The following example displays the format name of the first file converter.

VBA Copy code Copy code
MsgBox FileConverters(1).FormatName

File converters for saving documents are listed in the Save As dialog box. File converters for opening documents appear in a dialog box if the Confirm conversion at Open check box is selected on the General tab in the Options dialog box.

See also

Concepts

PowerPoint Object Model Reference

Other resources

FileConverters Object Members


MediaFormat Members (PowerPoint)

 Copy code hover
[image]

MediaFormat Members (PowerPoint)
Send feedback

Published: July 16, 2012

Contains methods and properties that allow access to and control over audio and video media.

Methods

Name | Description
Resample | Adds the current media object to the queue and begins resampling, based on the specified parameters.
ResampleFromProfile | Adds the current media object to the queue and begins resampling base on the specified profile.
SetDisplayPicture | Sets the display picture at the specified time position.
SetDisplayPictureFromFile | Sets the display picture from a picture file.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
AudioCompressionType | Returns the audio compression format. Read-only.
AudioSamplingRate | Returns the audio sampling rate per second for the media. Read-only.
EndPoint | Gets or sets the time of the end point of the trim region of the media. Read/write.
FadeInDuration | Gets or sets the duration of the fade in of the media, in milliseconds. Read/write.
FadeOutDuration | Gets or sets the duration of the fadeout of the media, in milliseconds. Read/write.
IsEmbedded | Returns whether the media file is embedded. Read-only.
IsLinked | Returns whether the media file is linked. Read-only.
Length | Returns the total length of the media in time units. Read-only.
MediaBookmarks | Returns a MediaBookmarks collection that represents the media bookmarks associated with the specified object. Read-only.
Muted | Returns whether audio playback of the media is muted. Read/write
Parent | Returns the parent object for the specified object. Read-only.
ResamplingStatus | Returns the resampling task status. Read-only.
SampleHeight | Returns the resolution height of the sample media. Read-only.
SampleWidth | Returns the resolution width of the media sample. Read-only.
StartPoint | Gets or sets the start point of the trim region. Read/write.
VideoCompressionType | Returns a String that represents the video compression format of the media. Read-only.
VideoFrameRate | Returns the video frame rate per second of the media. Read-only.
Volume | Gets or sets the volume of the media. Read/write.


AnimationSettings.SoundEffect Property (PowerPoint)

 Copy code hover
[image]

AnimationSettings.SoundEffect Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a SoundEffect object that represents the sound to be played during the transition to the specified slide. REad-only.

Syntax

expression .SoundEffect

expression A variable that represents an AnimationSettings object.

Return Value

SoundEffect

Example

This example sets the file Bass.wav to be played whenever shape one on slide one in the active presentation is animated.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(1).AnimationSettings

    .Animate = True

    .TextLevelEffect = ppAnimateByAllLevels

    .SoundEffect.ImportFromFile "c:\bass.wav"

End With

See also

Concepts

AnimationSettings Object

Other resources

AnimationSettings Object Members


PowerPoint 2013 developer reference copyright notice

 Copy code hover
[image]

PowerPoint 2013 developer reference copyright notice
Send feedback

Published: July 16, 2012

This document is provided "as-is". Information and views expressed in this document, including URL and other Internet Web site references, may change without notice. You bear the risk of using it.

Some examples depicted herein are provided for illustration only and are fictitious. No real association or connection is intended or should be inferred.

This document does not provide you with any legal rights to any intellectual property in any Microsoft product. You may copy and use this document for your internal, reference purposes.

© 2012 Microsoft Corporation. All rights reserved.

Microsoft, Access, ActiveX, ClearType, Excel, FrontPage, InfoPath, IntelliSense, JScript, MSDN, MS-DOS, MSN, OneNote, Outlook, PowerPoint, SharePoint, Silverlight, SmartArt, SQL Server, Visio, Visual Basic, Visual C#, Visual C++, Visual Studio, Win32, Windows, Windows PowerShell, Windows Server, and Windows Vista are trademarks of the Microsoft group of companies.

All other trademarks are property of their respective owners.


XlDataLabelSeparator Enumeration (PowerPoint)

 Copy code hover
[image]

XlDataLabelSeparator Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the separator used with data labels.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlDataLabelSeparatorDefault | 1 | Word selects the separator.


Application.DisplayGridLines Property (PowerPoint)

 Copy code hover
[image]

Application.DisplayGridLines Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether to display gridlines in Microsoft PowerPoint. Read/write.

Syntax

expression .DisplayGridLines

expression A variable that represents a Application object.

Return Value

MsoTriState

Remarks

The value returned by the DisplayGridLines property can be one of these MsoTriState constants.

Constant | Description
msoFalse | Do not display gridlines.
msoTrue | Display gridlines.

Example

This example switches the display of the gridlines in PowerPoint.

VBA Copy code Copy code
Sub ToggleGridLines()

    With Application

        If .DisplayGridLines = msoTrue Then

            .DisplayGridLines = msoFalse

        Else

            .DisplayGridLines = msoTrue

        End If

    End With

End Sub

See also

Concepts

Application Object

Other resources

Application Object Members


How to: Use Events with the Application Object

 Copy code hover
[image]

How to: Use Events with the Application Object
Send feedback

To create an event handler for an event of the Application object, you need to complete the following three steps:

  1. Declare an object variable in a class module to respond to the events.

  2. Write the specific event procedures.

  3. Initialize the declared object from another module.

Declare the Object Variable

Before you can write procedures for the events of the Application object, you must create a new class module and declare an object of type Application with events. For example, assume that a new class module is created and called EventClassModule. The new class module contains the following code.

VBA Copy code Copy code
Public WithEvents App As Application

Write the Event Procedures

After the new object is declared with events, it appears in the Object list in the class module, and you can write event procedures for the new object. (When you select the new object in the Object list, the valid events for that object are listed in the Procedure list.) Select an event from the Procedure list; an empty procedure is added to the class module.

VBA Copy code Copy code
Private Sub App_NewPresentation()

End Sub

Initializing the Declared Object

Before the procedure will run, you must connect the declared object in the class module (App in this example) with the Application object. You can do this with the following code from any module.

VBA Copy code Copy code
Dim X As New EventClassModule
Sub InitializeApp()
    Set X.App = Application
End Sub

Run the InitializeApp procedure. After the procedure is run, the App object in the class module points to the Microsoft Office PowerPoint Application object, and the event procedures in the class module will run when the events occur.


Shape.LinkFormat Property (PowerPoint)

 Copy code hover
[image]

Shape.LinkFormat Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a LinkFormat object that contains the properties that are unique to linked OLE objects. Read-only.

Syntax

expression .LinkFormat

expression A variable that represents a Shape object.

Return Value

LinkFormat

Example

This example updates the links between any OLE objects on slide one in the active presentation and their source files.

VBA Copy code Copy code
For Each sh In ActivePresentation.Slides(1).Shapes

    If sh.Type = msoLinkedOLEObject Then

        With sh.LinkFormat

            .Update

        End With

    End If

Next

See also

Concepts

Shape Object

Other resources

Shape Object Members


AxisTitle.Orientation Property (PowerPoint)

 Copy code hover
[image]

AxisTitle.Orientation Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the text orientation. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Orientation

expression A variable that represents an AxisTitle object.

Remarks

The value of this property can be an integer value from -90 to 90 degrees or one of the XlOrientation constants.

See also

Concepts

AxisTitle Object

Other resources

AxisTitle Object Members


Shapes.AddLabel Method (PowerPoint)

 Copy code hover
[image]

Shapes.AddLabel Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Creates a label. Returns a Shape object that represents the new label.

Syntax

expression .AddLabel(Orientation, Left, Top, Width, Height)

expression A variable that represents a Shapes object.

Parameters

Name | Required/Optional | Data Type | Description
Orientation | Required | MsoTextOrientation | The text orientation. Some of these constants may not be available to you, depending on the language support (U.S. English, for example) that you've selected or installed.
Left | Required | Single | The position, measured in points, of the left edge of the label relative to the left edge of the slide.
Top | Required | Single | The position, measured in points, of the top edge of the label relative to the top edge of the slide.
Width | Required | Single | The width of the label, measured in points.
Height | Required | Single | The height of the label, measured in points.

Return Value

Shape

Example

This example adds a vertical label that contains the text "Test Label" to myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)
myDocument.Shapes.AddLabel(Orientation:=msoTextOrientationVerticalFarEast, _
    Left:=100, Top:=100, Width:=60, Height:=150).TextFrame _
    .TextRange.Text = "Test Label"

See also

Concepts

Shapes Object

Other resources

Shapes Object Members


SlideShowWindow.Active Property (PowerPoint)

 Copy code hover
[image]

SlideShowWindow.Active Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns whether the specified pane or window is active. Read-only.

Syntax

expression .Active

expression A variable that represents a SlideShowWindow object.

Return Value

MsoTriState

Remarks

The value returned by the Active property can be one of these MsoTriState constants.

Constant | Description
msoFalse | The specified pane or window is inactive.
msoTrue | The specified pane or window is active.

Example

This example checks to see if the presentation file "test.ppt" is in the active window. If not, it saves the name of the presentation that is currently active in the variable oldWin and activates the "test.ppt" presentation.

VBA Copy code Copy code
With Application.Presentations("test.ppt").Windows(1)

    If Not .Active Then

        Set oldWin = Application.ActiveWindow

        .Activate

    End If

End With

See also

Concepts

SlideShowWindow Object

Other resources

SlideShowWindow Object Members


ShapeRange.HasChart Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.HasChart Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns whether the shape range represented by the specified object contains a chart. Read-only.

Syntax

expression .HasChart

expression An expression that returns a ShapeRange object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified shape range does not contain a chart.
msoTrue | The specified shape range contains a chart.

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


ColorFormat.Application Property (PowerPoint)

 Copy code hover
[image]

ColorFormat.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a ColorFormat object.

Return Value

Object

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

ColorFormat Object

Other resources

ColorFormat Object Members


Presentation.ExportAsFixedFormat2 Method (PowerPoint)

 Copy code hover
[image]

Presentation.ExportAsFixedFormat2 Method (PowerPoint)
Send feedback

Publishes a copy of a Microsoft PowerPoint presentation as a file in a fixed format, either PDF or XPS.

Version information

Version Added: PowerPoint 2013

Syntax

expression .ExportAsFixedFormat2(Path,FixedFormatType,Intent,FrameSlides,HandoutOrder,OutputType,PrintHiddenSlides,PrintRange,RangeType,SlideShowName,IncludeDocProperties,KeepIRMSettings,DocStructureTags,BitmapMissingFonts,UseISO19005_1,IncludeMarkup,ExternalExporter)

expression A variable that represents a Presentation object.

Parameters

Name | Required/Optional | Data type | Description
Path | Required | String | The path for the export.
FixedFormatType | Required | PpFixedFormatType | The format to which the slides should be exported.
Intent | Optional | PpFixedFormatIntent | The purpose of the export.
FrameSlides | Optional | MsoTriState | Whether the slides to be exported should be bordered by a frame.
HandoutOrder | Optional | PpPrintHandoutOrder | The order in which the handout should be printed.
OutputType | Optional | PpPrintOutputType | The type of output.
PrintHiddenSlides | Optional | MsoTriState | Whether to print hidden slides.
PrintRange | Optional | PrintRange | The slide range.
RangeType | Optional | PpPrintRangeType | The type of slide range.
SlideShowName | Optional | String | The name of the slide show.
IncludeDocProperties | Optional | Boolean | Whether the document properties should also be exported. The default is False.
KeepIRMSettings | Optional | Boolean | Whether the IRM settings should also be exported. The default is True.
DocStructureTags | Optional | Boolean | Whether to include document structure tags to improve document accessibility. The default is True.
BitmapMissingFonts | Optional | Boolean | Whether to include a bitmap of the text. The default is True.
UseISO19005_1 | Optional | Boolean | Whether the resulting document is compliant with ISO 19005-1 (PDF/A). The default is False.
IncludeMarkup | Optional | Boolean | Whether the resulting document should include associated pen marks.
ExternalExporter | Optional | Variant | A pointer to an Office add-in that implements the IMsoDocExporter COM interface and allows calls to an alternate implementation of code. The default is a null pointer.
Path | Required | STRING |
FixedFormatType | Required | PPFIXEDFORMATTYPE |
Intent | Optional | PPFIXEDFORMATINTENT |
FrameSlides | Optional | <unknown |
HandoutOrder | Optional | PPPRINTHANDOUTORDER |
OutputType | Optional | PPPRINTOUTPUTTYPE |
PrintHiddenSlides | Optional | <unknown |
PrintRange | Optional | PRINTRANGE |
RangeType | Optional | PPPRINTRANGETYPE |
SlideShowName | Optional | STRING |
IncludeDocProperties | Optional | BOOL |
KeepIRMSettings | Optional | BOOL |
DocStructureTags | Optional | BOOL |
BitmapMissingFonts | Optional | BOOL |
UseISO19005_1 | Optional | BOOL |
IncludeMarkup | Optional | BOOL |
ExternalExporter | Optional | VARIANT |

Return value

VOID


ShapeRange.CustomerData Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.CustomerData Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a CustomerData object.

Syntax

expression .CustomerData

expression An expression that returns a ShapeRange object.

Return Value

CustomerData

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


Walls Object (PowerPoint)

 Copy code hover
[image]

Walls Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the walls of a 3-D chart.

Version Information

Version Added: PowerPoint 2007

Remarks

This object is not a collection. There is no object that represents a single wall; you must return all the walls as a unit.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

Use the Walls property to return the Walls object. The following example sets the pattern on the walls for the first chart in the active document. If the chart is not a 3-D chart, this example will fail.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.Walls.Interior.Pattern = xlGray75

    End If

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

Walls Object Members


Axes Methods (PowerPoint)

 Copy code hover
[image]

Axes Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Item | Returns a single Axis object from an Axes collection.


Presentation Members (PowerPoint)

 Copy code hover
[image]

Presentation Members (PowerPoint)
Send feedback

Published: July 12, 2012

Represents a Microsoft PowerPoint presentation.

Methods

Name | Description
AcceptAll | Accepts all changes.
AddTitleMaster | Adds a title master to the specified presentation and returns a Master object that represents the title master.
AddToFavorites | Adds a shortcut that represents the current selection in the specified presentation to the Windows Favorites folder.
ApplyTemplate | Applies a design template to the specified presentation.
ApplyTemplate2 | Applies a design template and theme variant to the presentation.
ApplyTheme | Applies a theme or design template to the specified presentation.
CanCheckIn | Returns True if Microsoft PowerPoint can check in a specified presentation to a server.
CheckIn | Returns a presentation from a local computer to a server, and sets the local file to read-only so that it cannot be edited locally.
CheckInWithVersion | Returns a presentation from a local computer to a server, and sets the local file to read-only so that it cannot be edited locally.
Close | Closes the specified presentation.
Convert2 | Converts a file to a different file type.
CreateVideo | Creates a video in a Presentation object.
EndReview | Ends the review cycle.
EnsureAllMediaUpgraded | Ensures that all media is up to date in a Presentation object.
Export | Exports each slide in the presentation, using the specified graphics filter, and saves the exported files in the specified folder.
ExportAsFixedFormat | Publishes a copy of a Microsoft PowerPoint presentation as a file in a fixed format, either PDF or XPS.
ExportAsFixedFormat2 | Publishes a copy of a Microsoft PowerPoint presentation as a file in a fixed format, either PDF or XPS.
FollowHyperlink | Displays a cached document, if it has already been downloaded. Otherwise, this method resolves the hyperlink, downloads the target document and displays it in the appropriate application.
GetWorkflowTasks | Returns the Microsoft Office WorkflowTasks collection.
GetWorkflowTemplates | Returns the Microsoft Office WorkflowTemplates collection.
LockServerFile | Locks the presentation on the Microsoft Office SharePoint server to prevent its modification.
Merge | Merges the changes in one presentation with another.
MergeWithBaseline | Merges a presentation into another presentation.
NewWindow | Opens a new window that contains the specified presentation. Returns a DocumentWindow object that represents the new window.
PrintOut | Prints the specified presentation.
PublishSlides | Creates a Web presentation (in HTML format) containing slides from any loaded presentation. You can view the published presentation in a Web browser.
RejectAll | Rejects all changes.
RemoveDocumentInformation | Removes document information, such as personal information, comments, and document properties, from a Microsoft PowerPoint presentation.
Save | Saves the specified presentation.
SaveAs | Saves a presentation that's never been saved, or saves a previously saved presentation under a different name.
SaveCopyAs | Saves a copy of the specified presentation to a file without modifying the original.
SendFaxOverInternet | Sends a presentation as a fax to the specified recipients.
SetPasswordEncryptionOptions | Sets the options Microsoft PowerPoint uses for encrypting presentations with passwords.
UpdateLinks | Updates linked OLE objects in the specified presentation.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Broadcast | Returns the Broadcast object of the current Presentation object. Read-only.
BuiltInDocumentProperties | Returns a DocumentProperties collection that represents all the built-in document properties for the specified presentation. Read-only.
ChartDataPointTrack | Returns or sets a Boolean that specifies whether charts use cell-reference data-point tracking. Read-write.
Coauthoring | Returns a Coauthoring object in the current Presentation object. Read-only.
ColorSchemes | Returns a ColorSchemes collection that represents the color schemes in the specified presentation. Read-only.
CommandBars | Returns a CommandBars collection that represents the merged command bar set from the host container application and Microsoft PowerPoint. This property returns a valid object only when the container is a DocObject server, like Microsoft Binder, and PowerPoint is acting as an OLE server. Read-only.
Container | Returns the object that contains the specified embedded presentation. Read-only.
ContentTypeProperties | Returns the Microsoft Office MetaProperties collection that describes the metadata stored in the presentation. Read-only.
CreateVideoStatus | Returns the status of creating a video in the current Presentation. Read-only.
CustomDocumentProperties | Returns a DocumentProperties collection that represents all the custom document properties for the specified presentation. Read-only.
CustomerData | Returns a CustomerData object. Read-only.
CustomXMLParts | Returns a CustomXMLParts object that represents the collection of custom XML parts associated with the specified Presentation object. Read-only.
DefaultLanguageID | Returns or sets the default language of a presentation. Read/write.
DefaultShape | Returns a Shape object that represents the default shape for the presentation. Read-only.
Designs | Returns a Designs object that represents a collection of designs.
DisplayComments | Determines whether comments are displayed in the specified presentation. Read/write.
DocumentInspectors | Returns the Microsoft Office DocumentInspectors collection. Read-only.
DocumentLibraryVersions | Returns a DocumentLibraryVersions collection that represents the collection of versions of a shared presentation that has versioning enabled and that is stored in a document library on a server.
EncryptionProvider | Returns a String that specifies the name of the algorithm encryption provider that Microsoft PowerPoint 2013 uses when encrypting documents. Read/write.
EnvelopeVisible | Determines whether the e-mail message header is visible in the document window. Read/write.
ExtraColors | Returns an ExtraColors object that represents the extra colors available in the specified presentation. Read-only.
FarEastLineBreakLanguage | Returns or sets the language used to determine which line break level is used when the line break control option is turned on. Read/write.
FarEastLineBreakLevel | Returns or sets the line break based upon Asian character level. Read/write.
Final | Determines whether the presentation is marked as final (read-only). Read/write.
Fonts | Returns a Fonts collection that represents all fonts used in the specified presentation. Read-only.
FullName | Returns the name of the specified add-in or saved presentation, including the path, the current file system separator, and the file name extension. Read-only String.
GridDistance | Sets or returns a Single that represents the distance between gridlines. Read/write.
Guides | Returns the Guides collection associated with a custom layout. Read-only.
HandoutMaster | Returns a Master object that represents the handout master. Read-only.
HasHandoutMaster | Indicates whether the presentation has media that resides on a handout master. Read-only
HasNotesMaster | Indicates whether the presentation has media that resides on a notes master. Read-only.
HasTitleMaster | MsoTrue if the specified presentation has a title master. Read-only.
HasVBProject | Returns whether the active presentation contains a Microsoft Visual Basic for Applications (VBA) project. Read-only.
InMergeMode | Indicates whether the document window is in merge mode. Read-only
LayoutDirection | Returns or sets the layout direction for the user interface. Read/write.
Name | The name of the presentation includes the file name extension (for file types that are registered) but doesn't include its path. You cannot use this property to set the name. Use the SaveAs method to save the presentation under a different name if you need to change the name. Read-only.
NoLineBreakAfter | Returns or sets the characters that cannot end a line. Read/write.
NoLineBreakBefore | Returns or sets the characters that cannot begin a line. Read/write.
NotesMaster | Returns a Master object that represents the notes master. Read-only.
PageSetup | Returns a PageSetup object whose properties control slide setup attributes for the specified presentation. Read-only.
Parent | Returns the parent object for the specified object.
Password | Returns or sets the password that must be supplied to open the specified presentation. Read/write.
PasswordEncryptionAlgorithm | Returns the algorithm Microsoft PowerPoint uses for encrypting documents with passwords. Read-only.
PasswordEncryptionFileProperties | Returns whether Microsoft PowerPoint encrypts file properties for password-protected documents. Read-only.
PasswordEncryptionKeyLength | Returns the key length of the algorithm Microsoft PowerPoint uses when it encrypts documents with passwords. Read-only.
PasswordEncryptionProvider | Returns the name of the algorithm encryption provider that Microsoft PowerPoint uses when it encrypts documents with passwords. Read-only.
Path | Returns a String that represents the path to the specified Presentation object. Read-only.
Permission |
PrintOptions | Returns a PrintOptions object that represents print options that are saved with the specified presentation. Read-only.
ReadOnly | Returns whether the specified presentation is read-only. Read-only.
RemovePersonalInformation | Determines whether Microsoft PowerPoint should remove all user information from comments and revisions upon saving a presentation. Read/write.
Research | Returns a Research object that provides access to the research service feature of Microsoft PowerPoint. Read-only.
Saved | Determines whether changes have been made to a presentation since it was last saved. Read/write.
SectionProperties | Returns a SectionProperties object. Read-only.
ServerPolicy | Returns a Microsoft Office ServerPolicy object. Read-only.
SharedWorkspace | Returns a SharedWorkspace object that represents the Document Workspace in which a specified presentation is located. Read-only.
Signatures | Returns a SignatureSet object that represents a collection of digital signatures. Read-only.
SlideMaster | Returns a Master object that represents the slide master.
Slides | Returns a Slides collection that represents all slides in the specified presentation. Read-only.
SlideShowSettings | Returns a SlideShowSettings object that represents the slide show settings for the specified presentation. Read-only.
SlideShowWindow | Returns a SlideShowWindow object that represents the slide show window in which the specified presentation is running. Read-only.
SnapToGrid | Determines whether to snap shapes to the gridlines in the specified presentation. Read/write.
Sync | Returns a Sync object that enables you to manage the synchronization of the local and server copies of a shared presentation stored in a Microsoft SharePoint Server shared workspace. Read-only.
Tags | Returns a Tags object that represents the tags for the specified object. Read-only.
TemplateName | Returns the name of the design template associated with the specified presentation. Read-only.
TitleMaster | Returns a Master object that represents the title master for the specified presentation.
VBASigned | Determines whether the Visual Basic for Applications (VBA) project for the specified document has been digitally signed. Read-only.
VBProject | Returns a VBProject object that represents the individual Visual Basic project for the presentation. Read-only.
Windows | Returns a DocumentWindows collection that represents all document windows associated with the specified presentation. Read-only.
WritePassword | Sets or returns the password for saving changes to the specified document. Read/write.


Legend.Left Property (PowerPoint)

 Copy code hover
[image]

Legend.Left Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the distance, in points, from the left edge of the object to the left edge of the chart area. Read-only Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Left

expression A variable that represents a Legend object.

See also

Concepts

Legend Object

Other resources

Legend Object Members


ResampleMediaTasks.Item Method (PowerPoint)

 Copy code hover
[image]

ResampleMediaTasks.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single ResampleMediaTask object from the specified ResampleMediaTasks collection.

Syntax

expression .Item(Index)

expression A variable that represents a ResampleMediaTasks object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Integer | The index number of the single ResampleMediaTask object in the collection to be returned.

Return Value

ResampleMediaTask

See also

Concepts

ResampleMediaTasks Object

Other resources

ResampleMediaTasks Object Members


Slide.PrintSteps Property (PowerPoint)

 Copy code hover
[image]

Slide.PrintSteps Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of slides you'd need to print to simulate the builds on the specified slide, slide master, or range of slides. Read-only.

Syntax

expression .PrintSteps

expression A variable that represents a Slide object.

Return Value

Long

Example

This example sets a variable to the number of slides you'd need to print to simulate the builds on slide one in the active presentation and then displays the value of the variable.

VBA Copy code Copy code
steps1 = ActivePresentation.Slides(1).PrintSteps

MsgBox steps1

See also

Concepts

Slide Object

Other resources

Slide Object Members


Pane Methods (PowerPoint)

 Copy code hover
[image]

Pane Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Activate | Activates the specified object.


Table Properties (PowerPoint)

 Copy code hover
[image]

Table Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
AlternativeText | Returns or sets the alternative text associated with a shape in a Web presentation. Read/write.
Application | Returns an Application object that represents the creator of the specified object.
Background | Returns the TableBackground object associated with the specified table. Read-only.
Columns | Returns a Columns collection that represents all the columns in a table. Read-only.
FirstCol | Determines whether to display special formatting for the first column of the specified table. Read/write.
FirstRow | Determinew whether to display special formatting for the first row of the specified table. Read/write.
HorizBanding | Determines whether to display banded rows, in which even rows are formatted differently from odd rows. Read/write.
LastCol | Determines whether to display special formatting for the last column of the specified table. Read/write.
LastRow | Determines whether to display special formatting for the last row of the specified table. Read/write.
Parent | Returns the parent object for the specified object.
Rows | Returns a Rows collection that represents all the rows in a table. Read-only.
Style | Returns a TableStyle object that contains information about the specified table's current table style. Read-only.
TableDirection | Returns or sets the direction in which the table cells are ordered. Read/write.
Title | Returns or sets the title of the Table object. Read/write.
VertBanding | Determines whether to display banded columns, in which even columns are formatted differently from odd columns. Read/write.


Slide.Export Method (PowerPoint)

 Copy code hover
[image]

Slide.Export Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Exports a slide, using the specified graphics filter, and saves the exported file under the specified file name.

Syntax

expression .Export(FileName, FilterName, ScaleWidth, ScaleHeight)

expression A variable that represents a Slide object.

Parameters

Name | Required/Optional | Data Type | Description
FileName | Required | String | The name of the file to be exported and saved to disk. You can include a full path; if you don't, Microsoft PowerPoint creates a file in the current folder.
FilterName | Required | String | The graphics format in which you want to export slides. The specified graphics format must have an export filter registered in the Windows registry. You can specify either the registered extension or the registered filter name. Microsoft PowerPoint will first search for a matching extension in the registry. If no extension that matches the specified string is found, PowerPoint will look for a filter name that matches.
ScaleWidth | Optional | Long | The width in pixels of an exported slide.
ScaleHeight | Optional | Long | The height in pixels of an exported slide.

Remarks

Exporting a presentation doesn't set the Saved property of a presentation to True.

PowerPoint uses the specified graphics filter to save each individual slide. The names of the slides exported and saved to disk are determined by PowerPoint. They are typically saved by using names such as Slide1.wmf, Slide2.wmf. The path of the saved files is specified in the FileName argument.

Example

This example exports slide three in the active presentation to disk in the JPEG graphic format. The slide is saved as Slide 3 of Annual Sales.jpg.

VBA Copy code Copy code
With Application.ActivePresentation.Slides(3)

    .Export "c:\my documents\Graphic Format\" & _

        "Slide 3 of Annual Sales", "JPG"

End With

See also

Concepts

Slide Object

Other resources

Slide Object Members


Series Methods (PowerPoint)

 Copy code hover
[image]

Series Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
ApplyDataLabels | Applies data labels to a series.
ClearFormats | Clears the formatting of the object.
Copy | If the series has a picture fill, copies the picture to the Clipboard.
DataLabels | Returns an object that represents either a single data label (a DataLabel object) or a collection of all the data labels for the series (a DataLabels collection).
Delete | Deletes the object.
ErrorBar | Applies error bars to the series.
Paste | Pastes a picture from the Clipboard as the marker on the selected series.
Points | Returns a collection of all the points in the series.
Select | Selects the object.
Trendlines | Returns a collection of all the trendlines for the series.


ThemeVariant.Application Property (PowerPoint)

 Copy code hover
[image]

ThemeVariant.Application Property (PowerPoint)
Send feedback

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2013

Syntax

expression .Application

expression A variable that represents a ThemeVariant object.


ShapeNode Members (PowerPoint)

 Copy code hover
[image]

ShapeNode Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents the geometry and the geometry-editing properties of the nodes in a user-defined freeform.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
EditingType | If the specified node is a vertex, this property returns a value that indicates how changes made to the node affect the two segments connected to the node. If the node is a control point for a curved segment, this property returns the editing type of the adjacent vertex. Read-only.
Parent | Returns the parent object for the specified object.
Points | Returns a Variant that represents the position of the specified node as a coordinate pair. Read-only.
SegmentType | Returns a value that indicates whether the segment associated with the specified node is straight or curved. Read-only.


ProtectedViewWindow.WindowState Property (PowerPoint)

 Copy code hover
[image]

ProtectedViewWindow.WindowState Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the state of the specified window. Read/write.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .WindowState

expression A variable that represents a ProtectedViewWindow object.

See also

Concepts

ProtectedViewWindow Object

Other resources

ProtectedViewWindow Object Members


Comment Properties (PowerPoint)

 Copy code hover
[image]

Comment Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Author | Returns a String that represents the author as for a specified Comment object. Read-only.
AuthorIndex | Returns a Long representing the index number of a comment for a given author. The first comment for a given author has an index number of 1, their second comment has an index number of 2. Read-only.
AuthorInitials | Returns the author's initials as a read-only String for a specified Comment object. Read-only.
Collapsed | Returns whether the replies to a comment are shown (expanded) or hidden (collapsed). Ready-only.
DateTime | Returns the date and time a comment was created.
Left | Returns a Single that represents the distance in points from the left edge of the comment to the left edge of the slide. Read-only.
Parent | Returns the parent object for the specified object.
ProviderID | Returns a String that represents ID of the service providing contact information. Read-only.
Replies | Returns a Comments collection of Comment objects that are children of the specified comment. Read-only.
Text | Returns a String that represents the text in a comment. Read-only.
TimeZoneBias | Returns a String that specifies the local time zone adjustment for the contact. Read-only.
Top | Returns a Single that represents the distance in points from the left edge of the comment to the left edge of the slide. Read-only.
UserID | Returns a String that represents user ID of the contact. Read-only.


LeaderLines.Application Property (PowerPoint)

 Copy code hover
[image]

LeaderLines.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents a LeaderLines object.

See also

Concepts

LeaderLines Object

Other resources

LeaderLines Object Members


LineFormat.BeginArrowheadLength Property (PowerPoint)

 Copy code hover
[image]

LineFormat.BeginArrowheadLength Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the length of the arrowhead at the beginning of the specified line. Read/write.

Syntax

expression .BeginArrowheadLength

expression A variable that represents a LineFormat object.

Return Value

MsoArrowheadLength

Remarks

The value of the BeginArrowheadLength property can be one of these MsoArrowheadLength constants

msoArrowheadLengthMedium

msoArrowheadLengthMixed

msoArrowheadLong

msoArrowheadShort

Example

This example adds a line to myDocument. There's a short, narrow oval on the line's starting point and a long, wide triangle on its endpoint.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddLine(100, 100, 200, 300).Line

    .BeginArrowheadLength = msoArrowheadShort

    .BeginArrowheadStyle = msoArrowheadOval

    .BeginArrowheadWidth = msoArrowheadNarrow

    .EndArrowheadLength = msoArrowheadLong

    .EndArrowheadStyle = msoArrowheadTriangle

    .EndArrowheadWidth = msoArrowheadWide

End With

See also

Concepts

LineFormat Object

Other resources

LineFormat Object Members


TableBackground.Fill Property (PowerPoint)

 Copy code hover
[image]

TableBackground.Fill Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a FillFormat object that represents the formatting of the fill associated with the table background. Read-only.

Syntax

expression .Fill

expression An expression that returns a TableBackground object.

Return Value

FillFormat

Remarks

A shape can have a solid, gradient, texture, pattern, picture, or semi-transparent fill. You can use the properties and methods of the FillFormat object returned by the Fill property to specify the appearance and behavior of the fill associated with the table background.

See also

Concepts

TableBackground Object

Other resources

TableBackground Object Members


Shape.IncrementTop Method (PowerPoint)

 Copy code hover
[image]

Shape.IncrementTop Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Moves the specified shape vertically by the specified number of points.

Syntax

expression .IncrementTop(Increment)

expression A variable that represents a Shape object.

Parameters

Name | Required/Optional | Data Type | Description
Increment | Required | Single | Specifies how far the shape is to be moved vertically, in points. A positive value moves the shape down; a negative value moves it up.

Example

This example duplicates shape one on myDocument, sets the fill for the duplicate, moves it 70 points to the right and 50 points up, and rotates it 30 degrees clockwise.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(1).Duplicate

    .Fill.PresetTextured msoTextureGranite

    .IncrementLeft 70

    .IncrementTop -50

    .IncrementRotation 30

End With

See also

Concepts

Shape Object

Other resources

Shape Object Members


FillFormat.Parent Property (PowerPoint)

 Copy code hover
[image]

FillFormat.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a FillFormat object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


LeaderLines Members (PowerPoint)

 Copy code hover
[image]

LeaderLines Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents leader lines on a chart. Leader lines connect data labels to data points.

Methods

Name | Description
Delete | Deletes the object.
Select | Selects the object.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Border | Returns the border of the object. Read-only ChartBorder.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Parent | Returns the parent for the specified object. Read-only Object.


Shape.Width Property (PowerPoint)

 Copy code hover
[image]

Shape.Width Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the width of the specified object, in points. Read/write.

Syntax

expression .Width

expression A variable that represents a Shape object.

Return Value

Single

Example

This example arranges windows one and two horizontally; in other words, each window occupies half the available vertical space and all the available horizontal space in the application window's client area. For this example to work, there must be only two document windows open.

VBA Copy code Copy code
Windows.Arrange ppArrangeTiled

ah = Windows(1).Height                      ' available height

aw = Windows(1).Width + Windows(2).Width    ' available width

With Windows(1)

    .Width = aw

    .Height = ah / 2

    .Left = 0

End With

With Windows(2)

    .Width = aw

    .Height = ah / 2

    .Top = ah / 2

    .Left = 0

End With

This example sets the width for column one in the specified table to 80 points (72 points per inch).

VBA Copy code Copy code
ActivePresentation.Slides(2).Shapes(5).Table.Columns(1).Width = 80

See also

Concepts

Shape Object

Other resources

Shape Object Members


Coauthoring.MergeMode Property (PowerPoint)

 Copy code hover
[image]

Coauthoring.MergeMode Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns True if the application is in merge mode. Read-only.

Syntax

expression .MergeMode

expression A variable that represents a Coauthoring object.

Return Value

Boolean

See also

Concepts

Coauthoring Object

Other resources

Coauthoring Object Members


Presentation.DisplayComments Property (PowerPoint)

 Copy code hover
[image]

Presentation.DisplayComments Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether comments are displayed in the specified presentation. Read/write.

Syntax

expression .DisplayComments

expression A variable that represents a Presentation object.

Return Value

MsoTriState

Remarks

The value returned by the DisplayComments property can be one of these MsoTriState constants.

Constant | Description
msoFalse | Comments are not displayed in the specified presentation.
msoTrue | Comments are displayed in the specified presentation.

Example

This example hides comments in the active presentation.

VBA Copy code Copy code
ActivePresentation.DisplayComments = msoFalse

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


ShapeRange.AnimationSettings Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.AnimationSettings Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an AnimationSettings object that represents all the special effects you can apply to the animation of the specified shape. Read-only.

Syntax

expression .AnimationSettings

expression A variable that represents a ShapeRange object.

Return Value

AnimationSettings

Example

This example sets shape one on slide two in the active presentation to fly in from the left when the slide is built.

VBA Copy code Copy code
With ActivePresentation.Slides(2).Shapes(1).AnimationSettings

    .EntryEffect = ppEffectFlyFromLeft

    .TextLevelEffect = ppAnimateByAllLevels

End With

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


ExtraColors Methods (PowerPoint)

 Copy code hover
[image]

ExtraColors Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Add | Adds a color to the extra colors available to a presentation, if the color hasn't already been added.
Clear | Clears the extra colors in a presentation.
Item | Returns a single color from the specified ExtraColors collection.


Columns Object (PowerPoint)

 Copy code hover
[image]

Columns Object (PowerPoint)
See also Send feedback

Published: July 12, 2012

A collection of Column objects that represent the columns in a table.

Example

Use the Columns property to return the Columns collection. This example finds the first table in the active presentation, counts the number of Column objects in the Columns collection, and displays information to the user.

VBA Copy code Copy code
Dim ColCount, sl, sh As Integer

With ActivePresentation

    For sl = 1 To .Slides.Count

        For sh = 1 To .Slides(sl).Shapes.Count

            If .Slides(sl).Shapes(sh).HasTable Then

                ColCount = .Slides(sl).Shapes(sh) _

                    .Table.Columns.Count

                MsgBox "Shape " & sh & " on slide " & sl & _

                    " contains the first table and has " & _

                    ColCount & " columns."

                Exit Sub

            End If

        Next

    Next

End With

Use the Add method to add a column to a table. This example creates a column in an existing table and sets the width of the new column to 72 points (one inch).

VBA Copy code Copy code
With ActivePresentation.Slides(2).Shapes(5).Table

    .Columns.Add.Width = 72

End With

Use Columns(index) to return a single Column object. Index represents the position of the column in the Columns collection (usually counting from left to right; although the TableDirection property can reverse this). This example selects the first column of the table in shape five on the second slide.

VBA Copy code Copy code
ActivePresentation.Slides(2).Shapes(5).Table.Columns(1).Select

See also

Concepts

PowerPoint Object Model Reference

Other resources

Columns Object Members


How to: Add Controls to Documents

 Copy code hover
[image]

How to: Add Controls to Documents
Send feedback

To add controls to a document, display the Control Toolbox, click the control you want to add, and then click the document. Drag an adjustment handle of the control until the control's outline is the size and shape you want.

Note Note

Dragging a control (or a number of "grouped" controls) from the form back to the Control Toolbox creates a template of that control, which you can reuse. This is a useful feature for implementing a standard "look and feel" for your applications.


ActionSetting Properties (PowerPoint)

 Copy code hover
[image]

ActionSetting Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Action | Returns or sets the type of action that will occur when the specified shape is clicked or the mouse pointer is positioned over the shape during a slide show. Read/write.
ActionVerb | Returns or sets a string that contains the OLE verb that will be run when the user clicks the specified shape or passes the mouse pointer over it during a slide show. Read/write.
AnimateAction | Specifies whether the color of the specified shape is momentarily inverted when the specified mouse action occurs. Read/write.
Application | Returns an Application object that represents the creator of the specified object.
Hyperlink | Returns a Hyperlink object that represents the hyperlink for the specified shape. Read-only.
Parent | Returns the parent object for the specified object.
Run | Returns or sets the name of the presentation or macro to be run when the specified shape is clicked or the mouse pointer passes over the shape during a slide show. Read/write.
ShowAndReturn | Determines if and under what circumstances Microsoft PowerPoint returns to the initiating slide show. Read/write.
SlideShowName | Returns or sets the name of the custom slide show to run in response to a mouse action on the shape during a slide show. Read/write.
SoundEffect | Returns a SoundEffect object that represents the sound to be played during the transition to the specified slide. Read-only.


Slides Object (PowerPoint)

 Copy code hover
[image]

Slides Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

A collection of all the Slide objects in the specified presentation.

Remarks

If your Visual Studio solution includes the Microsoft.Office.Interop.PowerPoint reference, this collection maps to the following types:

  • Microsoft.Office.Interop.PowerPoint.Slides.GetEnumerator (to enumerate the Slide objects.)

The following examples describe how to:

  • Create a slide and add it to the collection

  • Return a single slide that you specify by name, index number, or slide ID number

  • Return a subset of the slides in the presentation

  • Apply a property or method to all the slides in the presentation at the same time

Example

Use the Slides property to return a Slides collection. Use the Add method to create a new slide and add it to the collection. The following example adds a new slide to the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides.Add 2, ppLayoutBlank

Use Slides(index), where index is the slide name or index number, or use the Slides.FindBySlideID(index), where index is the slide ID number, to return a single Slide object. The following example sets the layout for slide one in the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(1).Layout = ppLayoutTitle

The following example sets the layout for the slide named "Big Chart" in the active presentation. Note that slides are assigned automatically generated names of the form Sliden (where n is an integer) when they're created. To assign a more meaningful name to a slide, use the Name property.

VBA Copy code Copy code
ActivePresentation.Slides("Big Chart").Layout = ppLayoutTitle

Use Slides.Range(index), where index is the slide index number or name or an array of slide index numbers or an array of slide names, to return a SlideRange object that represents a subset of the Slides collection. The following example sets the background fill for slides one and three in the active presentation.

VBA Copy code Copy code
With ActivePresentation.Slides.Range(Array(1, 3))
    .FollowMasterBackground = False
    .Background.Fill.PresetGradient msoGradientHorizontal, _
        1, msoGradientLateSunset
End With

If you want to do something to all the slides in your presentation at the same time (such as delete all of them or set a property for all of them), use Slides.Range with no argument to construct a SlideRange collection that contains all the slides in the Slides collection, and then apply the appropriate property or method to the SlideRange collection. The following example sets the background fill for all the slides in the active presentation

VBA Copy code Copy code
With ActivePresentation.Slides.Range
    .FollowMasterBackground = False
    .Background.Fill.PresetGradient msoGradientHorizontal, _
        1, msoGradientLateSunset
End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

Slides Object Members


AddIn.AutoLoad Property (PowerPoint)

 Copy code hover
[image]

AddIn.AutoLoad Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the specified add-in is automatically loaded each time PowerPoint is started. Read/write.

Syntax

expression .AutoLoad

expression A variable that represents an AddIn object.

Return Value

MsoTriState

Remarks

Setting this property to msoTrue automatically sets the Registered property to msoTrue.

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

Constant | Description
msoFalse | The specified add-in is not automatically loaded each time PowerPoint is started.
msoTrue | The specified add-in is automatically loaded each time PowerPoint is started.

Example

This example displays the name of each add-in that's automatically loaded each time PowerPoint is started.

VBA Copy code Copy code
For Each myAddIn In AddIns

    If myAddIn.AutoLoad Then

        MsgBox myAddIn.Name

        afound = True

    End If

Next myAddIn

If afound <> True Then

    MsgBox "No add-ins were loaded automatically."

End If

This example specifies that the add-in named "myTools" be loaded automatically each time PowerPoint is started.

VBA Copy code Copy code
Application.AddIns("mytools").AutoLoad = msoTrue

See also

Concepts

AddIn Object

Other resources

AddIn Object Members


HeaderFooter.Format Property (PowerPoint)

 Copy code hover
[image]

HeaderFooter.Format Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the format for the automatically updated date and time. Read/write.

Syntax

expression .Format

expression A variable that represents a ThreeDFormat object.

Return Value

PpDateTimeFormat

Remarks

The Format property applies only to HeaderFooter objects that represent a date and time (returned from the HeadersFooters collection by the DateAndTime property).

Make sure that the date and time are set to be updated automatically (not displayed as fixed text) by setting the UseFormat property to True.

The Format property value can be one of these PpDateTimeFormat constants.

ppDateTimeddddMMMMddyyyy

ppDateTimedMMMMyyyy

ppDateTimedMMMyy

ppDateTimeFormatMixed

ppDateTimeHmm

ppDateTimehmmAMPM

ppDateTimeHmmss

ppDateTimehmmssAMPM

ppDateTimeMdyy

ppDateTimeMMddyyHmm

ppDateTimeMMddyyhmmAMPM

ppDateTimeMMMMdyyyy

ppDateTimeMMMMyy

ppDateTimeMMyy

Example

This example sets the date and time for the slide master of the active presentation to be updated automatically and then it sets the date and time format to show hours, minutes, and seconds.

VBA Copy code Copy code
Set myPres = Application.ActivePresentation

With myPres.SlideMaster.HeadersFooters.DateAndTime

    .UseFormat = True

    .Format = ppDateTimeHmmss

End With

See also

Concepts

HeaderFooter Object

Other resources

HeaderFooter Object Members


Application.Width Property (PowerPoint)

 Copy code hover
[image]

Application.Width Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets the width of the specified object, in points. Read/write.

Syntax

expression .Width

expression A variable that represents an Application object.

Return Value

Single

Example

This example arranges windows one and two horizontally; in other words, each window occupies half the available vertical space and all the available horizontal space in the application window's client area. For this example to work, there must be only two document windows open.

VBA Copy code Copy code
Windows.Arrange ppArrangeTiled

ah = Windows(1).Height                      ' available height

aw = Windows(1).Width + Windows(2).Width    ' available width

With Windows(1)

    .Width = aw

    .Height = ah / 2

    .Left = 0

End With

With Windows(2)

    .Width = aw

    .Height = ah / 2

    .Top = ah / 2

    .Left = 0

End With

This example sets the width for column one in the specified table to 80 points (72 points per inch).

VBA Copy code Copy code
ActivePresentation.Slides(2).Shapes(5).Table.Columns(1).Width = 80

See also

Concepts

Application Object

Other resources

Application Object Members


TableBackground Object (PowerPoint)

 Copy code hover
[image]

TableBackground Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the background associated with a Table object.

Remarks

Use the Background property of a Table object to return the TableBackground object associated with the table.

To get a Table object from an existing shape, use the Table property of the Shape or ShapeRange object that contains the table. You can create a shape that contains a table by using the AddTable method of the Shapes collection.

The properties of the TableBackground object return objects that represent various aspects of the formatting associated with a table.

  • Use the Fill property to return a FillFormat object.

  • Use the Picture property to return a PictureFormat object.

  • Use the Reflection property to return an ReflectionFormat object.

  • Use the Shadow property to return a ShadowFormat object.

Example

The following example shows how to get a TableBackground object and set two of its properties.

VBA Copy code Copy code
Public Sub TableBackground_Example()

    Dim pptShape As PowerPoint.Shape
    Dim pptTable As PowerPoint.Table
    Dim pptTableBackground As PowerPoint.TableBackground
    Dim pptFillFormat As PowerPoint.FillFormat

    Set pptShape = ActivePresentation.Slides(2).Shapes.AddTable(3, 3)
    Set pptTable = pptShape.Table
    Set pptTableBackground = pptTable.Background
    Set pptFillFormat = pptTableBackground.Fill

    ' Add a patterned fill to the table background
    pptFillFormat.Patterned (msoPatternSmallGrid)

    ' Add a shadow to the table background
    pptTableBackground.Shadow.Visible = msoTrue

End Sub

See also

Concepts

PowerPoint Object Model Reference

Other resources

TableBackground Object Members
Microsoft PowerPoint Object Model Overview
TableBackground Object Members


MediaFormat.Length Property (PowerPoint)

 Copy code hover
[image]

MediaFormat.Length Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the total length of the media in time units. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Length

expression An expression that returns a MediaFormat object.

Return Value

Long

See also

Concepts

MediaFormat Object

Other resources

MediaFormat Object Members


TableStyle Properties (PowerPoint)

 Copy code hover
[image]

TableStyle Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Id | Returns a string that identifies the table style. Read-only.
Name | Returns the name of the table style. Read-only.


Walls.Format Property (PowerPoint)

 Copy code hover
[image]

Walls.Format Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Format

expression A variable that represents a Walls object.

See also

Concepts

Walls Object

Other resources

Walls Object Members


Series.ApplyPictToFront Property (PowerPoint)

 Copy code hover
[image]

Series.ApplyPictToFront Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if a picture is applied to the front of the point or all points in the series. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ApplyPictToFront

expression A variable that represents a Series object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example applies pictures to the front of all points in the first series of the first chart in the active document. The series must already have pictures applied to it (setting this property changes the picture orientation).

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).ApplyPictToFront = True

    End If

End With

See also

Concepts

Series Object

Other resources

Series Object Members


Slide.Design Property (PowerPoint)

 Copy code hover
[image]

Slide.Design Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Design object representing a design.

Syntax

expression .Design

expression A variable that represents a Slide object.

Return Value

Design

Example

The following example adds a title master.

VBA Copy code Copy code
Sub AddDesignMaster

    ActivePresentation.Slides(1).Design.AddTitleMaster

End Sub

See also

Concepts

Slide Object

Other resources

Slide Object Members


Presentation.ExportAsFixedFormat Method (PowerPoint)

 Copy code hover
[image]

Presentation.ExportAsFixedFormat Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Publishes a copy of a Microsoft PowerPoint presentation as a file in a fixed format, either PDF or XPS.

Syntax

expression .ExportAsFixedFormat(Path, FixedFormatType, Intent, FrameSlides, HandoutOrder, OutputType, PrintHiddenSlides, PrintRange, RangeType, SlideShowName, IncludeDocProperties, KeepIRMSettings)

expression An expression that returns a Presentation object.

Parameters

Name | Required/Optional | Data Type | Description
Path | Required | String | The path for the export.
FixedFormatType | Required | PpFixedFormatType | The format to which the slides should be exported.
Intent | Optional | PpFixedFormatIntent | The purpose of the export.
FrameSlides | Optional | MsoTriState | Whether the slides to be exported should be bordered by a frame.
HandoutOrder | Optional | PpPrintHandoutOrder | The order in which the handout should be printed.
OutputType | Optional | PpPrintOutputType | The type of output.
PrintHiddenSlides | Optional | MsoTriState | Whether to print hidden slides.
PrintRange | Optional | PrintRange | The slide range.
RangeType | Optional | PpPrintRangeType | The type of slide range.
SlideShowName | Optional | String | The name of the slide show.
IncludeDocProperties | Optional | Boolean | Whether the document properties should also be exported. The default is False.
KeepIRMSettings | Optional | Boolean | Whether the IRM settings should also be exported. The default is True.
DocStructureTags | Optional | Boolean | Whether to include document structure tags to improve document accessibility. The default is True.
BitmapMissingFonts | Optional | Boolean | Whether to include a bitmap of the text. The default is True.
UseISO19005_1 | Optional | Boolean | Whether the resulting document is compliant with ISO 19005-1 (PDF/A). The default is False.
ExternalExporter | Optional | Variant | A pointer to an Office add-in that implements the IMsoDocExporter COM interface and allows calls to an alternate implementation of code. The default is a null pointer.

Remarks

The ExportAsFixedFormat method is the equivalent of the Save As PDF or XPS command on the Office menu in the PowerPoint user interface. The method creates a file that contains a static view of the active presentation.

The FixedFormatType parameter value can be one of these PpFixedFormatType constants.

Constant | Description
msoFalse | The default. Does not display the embedded object (or link) as an icon.
msoTrue | Displays the embedded object (or link) as an icon.

The Intent parameter value can be one of these PpFixedFormatIntent constants.

Constant | Description
ppFixedFormatIntentPrint | Intended to be published online and printed
ppFixedFormatIntentScreen | The default. Intended to be published only online

The FrameSlides parameter value can be one of these MsoTriState constants.

Constant | Description
msoFalse | The default. Does not frame exported slides.
msoTrue | Frames exported slides.

The HandoutOrder parameter value can be one of these PpPrintHandoutOrder constants.

Constant | Description
ppPrintHandoutHorizontalFirst | Prints handouts with consecutive slides displayed horizontally first (in horizontal rows).
ppPrintHandoutVerticalFirst | The default. Prints handouts with consecutive slides displayed vertically first (in vertical columns).

The OutputType parameter value can be a combination of one or more of these PpPrintOutputType constants.

Constant | Description
ppPrintOutputBuildSlides |
ppPrintOutputFourSlideHandouts | Prints four slides per handout page.
ppPrintOutputNineSlideHandouts | Prints nine slides per handout page.
ppPrintOutputNotesPages | Prints notes pages.
ppPrintOutputOneSlideHandouts | Prints one slide per handout page.
ppPrintOutputOutline | Prints outine view.
ppPrintOutputSixSlideHandouts | Prints six slides per handout page.
ppPrintOutputSlides | Prints all slides in the presentation. The default.
ppPrintOutputThreeSlideHandouts | Prints three slides per handout page.
ppPrintOutputTwoSlideHandouts | Prints two slides per handout page.

The PrintHiddenSlides parameter value can be one of these MsoTriState constants.

Constant | Description
msoFalse | The default. Does not print hidden slides.
msoTrue | Prints hidden slides.

The RangeType parameter value can be one of these PpPrintRangeType constants.

Constant | Description
ppPrintAll | The default. Exports all slides.
ppPrintCurrent | Exports only the current slide.
ppPrintNamedSlideShow | Exports the named (custom) slide show specified in SlideShowName.
ppPrintSelection | Exports selected slides.
ppPrintSlideRange | Exports the specified slide range.

Set BitmapMissingFonts to True when font licensing does not permit you to embed a font in the PDF file. If you set this parameter to False, the font is referenced, and the viewer's computer substitutes an appropriate font if the authored one is not available.

Example

The following example shows how to use the ExportAsFixedFormat method to export the active presentation as a .pdf file named test.pdf to the user's Documents folder.

VBA Copy code Copy code
Public Sub ExportAsFixedFormat_Example()

       ActivePresentation.ExportAsFixedFormat "C:\Users\username\Documents\test.pdf", ppFixedFormatTypePDF, ppFixedFormatIntentScreen, msoCTrue, ppPrintHandoutHorizontalFirst, ppPrintOutputBuildSlides, msoFalse, , , , False, False, False, False, False

End Sub

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


ShapeRange.Type Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.Type Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the type of shape or shapes in a range of shapes. Read-only.

Syntax

expression .Type

expression A variable that represents a ShapeRange object.

Return Value

MsoShapeType

Remarks

The value of the Type property can be one of these MsoShapeType constants.

msoAutoShape

msoCallout

msoCanvas

msoChart

msoComment

msoDiagram

msoEmbeddedOLEObject

msoFormControl

msoFreeform

msoGroup

msoLine

msoLinkedOLEObject

msoLinkedPicture

msoMedia

msoOLEControlObject

msoPicture

msoPlaceholder

msoScriptAnchor

msoShapeTypeMixed

msoTable

msoTextBox

msoTextEffect

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


Coauthoring Members (PowerPoint)

 Copy code hover
[image]

Coauthoring Members (PowerPoint)
Send feedback

Published: July 16, 2012

Contains properties and methods for manipulating co-authoring in a presentation.

Methods

Name | Description
EndReview | Terminates merge mode and ends the review.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
FavorServerEditsDuringMerge | Gets or sets whether the merged document favors server-side edits when conflicts occur. Read/write.
MergeMode | Returns True if the application is in merge mode. Read-only.
Parent | Returns the parent object for the specified object. Read-only.
PendingUpdates | Returns True if merge-mode updates are pending. Read-only.


ColorSchemes.Count Property (PowerPoint)

 Copy code hover
[image]

ColorSchemes.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a ColorSchemes object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

ColorSchemes Object

Other resources

ColorSchemes Object Members


Axis.ScaleType Property (PowerPoint)

 Copy code hover
[image]

Axis.ScaleType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the value axis scale type. Read/write XlScaleType.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ScaleType

expression A variable that represents an Axis object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the value axis for the first chart in the active document to use a logarithmic scale.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.Axes(xlValue).ScaleType = xlScaleLogarithmic

    End If

End With

See also

Concepts

Axis Object

Other resources

Axis Object Members


Point.HasDataLabel Property (PowerPoint)

 Copy code hover
[image]

Point.HasDataLabel Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if the point has a data label. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .HasDataLabel

expression A variable that represents a Point object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example enables the data label for point seven in series three for the first chart in the active document, and then it sets the data label color to blue.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With Chart.SeriesCollection(3).Points(7)

            .HasDataLabel = True

            .ApplyDataLabels Type:=xlValue

            .DataLabel.Font.ColorIndex = 5

        End With

    End If

End With

See also

Concepts

Point Object

Other resources

Point Object Members


PropertyEffect.Property Property (PowerPoint)

 Copy code hover
[image]

PropertyEffect.Property Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns an MsoAnimProperty constant that represents an animation property. Read/write.

Syntax

expression .Property

expression A variable that represents a PropertyEffect object.

Return Value

MsoAnimProperty

Example

The following example adds a shape, adds a three-second fill animation to that shape, and sets the fill animation to color.

VBA Copy code Copy code
Sub AddShapeSetAnimFill()

    Dim effBlinds As Effect

    Dim shpRectangle As Shape

    Dim animProperty As AnimationBehavior

    Set shpRectangle = ActivePresentation.Slides(1).Shapes _

        .AddShape(Type:=msoShapeRectangle, Left:=100, _

        Top:=100, Width:=50, Height:=50)

    Set effBlinds = ActivePresentation.Slides(1).TimeLine.MainSequence _

        .AddEffect(Shape:=shpRectangle, effectId:=msoAnimEffectBlinds)

    effBlinds.Timing.Duration = 3

    Set animProperty = effBlinds.Behaviors.Add(msoAnimTypeProperty)

    With animProperty.PropertyEffect

        .Property = msoAnimColor

        .From = RGB(Red:=0, Green:=0, Blue:=255)

        .To = RGB(Red:=255, Green:=0, Blue:=0)

    End With

End Sub

See also

Concepts

PropertyEffect Object

Other resources

PropertyEffect Object Members


ShapeRange.Title Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.Title Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Shape object that represents the slide title. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Title

expression A variable that represents a ShapeRange object.

Remarks

You can also use the Item method of the Shapes or Placeholders collection to return the slide title.

Example

The following example sets the title text on myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes.Title.TextFrame.TextRange.Text = "Welcome!"

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


CalloutFormat.AutoAttach Property (PowerPoint)

 Copy code hover
[image]

CalloutFormat.AutoAttach Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the place where the callout line attaches to the callout text box changes, depending on whether the origin of the callout line (where the callout points to) is to the left or right of the callout text box. Read/write.

Syntax

expression .AutoAttach

expression A variable that represents an CalloutFormat object.

Return Value

MsoTriState

Remarks

When the value of this property is msoTrue, the drop value (the vertical distance from the edge of the callout text box to the place where the callout line attaches) is measured from the top of the text box when the text box is to the right of the origin, and it is measured from the bottom of the text box when the text box is to the left of the origin. When the value of this property is msoFalse, the drop value is always measured from the top of the text box, regardless of the relative positions of the text box and the origin. Use the CustomDrop method to set the drop value, and use the Drop property to return the drop value.

Setting this property affects a callout only if it has an explicitly set drop value — that is, if the value of the DropType property is msoCalloutDropCustom. By default, callouts have explicitly set drop values when they're created.

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

Constant | Description
msoFalse | The place where the callout line attaches to the callout text box does not change depending on whether the origin of the callout line (where the callout points to) is to the left or right of the callout text box.
msoTrue | The place where the callout line attaches to the callout text box changes depending on whether the origin of the callout line (where the callout points to) is to the left or right of the callout text box.

Example

This example adds two callouts to the first slide. One of the callouts is automatically attached and the other is not. If you change the callout line origin for the automatically attached callout to the right of the attached text box, the position of the text box changes. The callout that is not automatically attached does not display this behavior.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    With .AddCallout(msoCalloutTwo, 420, 170, 200, 50)

        .TextFrame.TextRange.Text = "auto-attached"

        .Callout.AutoAttach = msoTrue

    End With

    With .AddCallout(msoCalloutTwo, 420, 350, 200, 50)

        .TextFrame.TextRange.Text = "not auto-attached"

        .Callout.AutoAttach = msoFalse

    End With

End With

See also

Concepts

CalloutFormat Object

Other resources

CalloutFormat Object Members


PictureFormat.Parent Property (PowerPoint)

 Copy code hover
[image]

PictureFormat.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a PictureFormat object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

PictureFormat Object

Other resources

PictureFormat Object Members


LegendEntries.Count Property (PowerPoint)

 Copy code hover
[image]

LegendEntries.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the collection. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Count

expression A variable that represents a LegendEntries object.

See also

Concepts

LegendEntries Object

Other resources

LegendEntries Object Members


View.GotoSlide Method (PowerPoint)

 Copy code hover
[image]

View.GotoSlide Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Switches to the specified slide.

Syntax

expression .GotoSlide(Index)

expression A variable that represents a View object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Long | The number of the slide to switch to.

Example

This example switches from the current slide to the slide three in slide show window one. If you switch back to the current slide during the slide show, its entire animation will start over.

VBA Copy code Copy code
With SlideShowWindows(1).View

    .GotoSlide 3

End With

This example switches from the current slide to the slide three in slide show window one. If you switch back to the current slide during the slide show, its animation will pick up where it left off.

VBA Copy code Copy code
With SlideShowWindows(1).View

    .GotoSlide 3, msoFalse

End With

See also

Concepts

View Object

Other resources

View Object Members


Walls.PictureUnit Property (PowerPoint)

 Copy code hover
[image]

Walls.PictureUnit Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the unit for each picture on the chart if the PictureType property is set to xlStackScale; otherwise, this property is ignored. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .PictureUnit

expression A variable that represents a Walls object.

See also

Concepts

Walls Object

Other resources

Walls Object Members


Chart.PlotArea Property (PowerPoint)

 Copy code hover
[image]

Chart.PlotArea Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the plot area of a chart. Read-only PlotArea.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .PlotArea

expression A variable that represents a Chart object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the color of the plot area interior for the first chart in the active document to cyan.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.PlotArea.Interior.ColorIndex = 8

    End If

End With

See also

Concepts

Chart Object

Other resources

Chart Object Members


Slide.SlideShowTransition Property (PowerPoint)

 Copy code hover
[image]

Slide.SlideShowTransition Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a SlideShowTransition object that represents the special effects for the specified slide transition. Read-only.

Syntax

expression .SlideShowTransition

expression A variable that represents a Slide object.

Return Value

SlideShowTransition

Example

This example sets slide two in the active presentation to advance automatically after 5 seconds during a slide show and to play a dog bark sound at the slide transition.

VBA Copy code Copy code
With ActivePresentation.Slides(2).SlideShowTransition

    .AdvanceOnTime = True

    .AdvanceTime = 5

    .SoundEffect.ImportFromFile "c:\windows\media\dogbark.wav"

End With

ActivePresentation.SlideShowSettings.AdvanceMode = _

    ppSlideShowUseSlideTimings

See also

Concepts

Slide Object

Other resources

Slide Object Members


ChartFormat Object (PowerPoint)

 Copy code hover
[image]

ChartFormat Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Provides access to the OfficeArt formatting for chart elements.

Version Information

Version Added: PowerPoint 2007

Remarks

Using a property or method that does not apply to the type of object the ChartFormat object is attached to will result in a run-time error.

See also

Concepts

PowerPoint Object Model Reference

Other resources

ChartFormat Object Members


Research.Application Property (PowerPoint)

 Copy code hover
[image]

Research.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the Microsoft PowerPoint application. Read-only.

Syntax

expression .Application

expression Required. An expression that returns a Research object.

Return Value

Application

See also

Concepts

Research Object

Other resources

Research Object Members


ShapeRange.Distribute Method (PowerPoint)

 Copy code hover
[image]

ShapeRange.Distribute Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Evenly distributes the shapes in the specified range of shapes. You can specify whether you want to distribute the shapes horizontally or vertically and whether you want to distribute them over the entire slide or just over the space they originally occupy.

Syntax

expression .Distribute(DistributeCmd, RelativeTo)

expression A variable that represents a ShapeRange object.

Parameters

Name | Required/Optional | Data Type | Description
DistributeCmd | Required | MsoDistributeCmd | Specifies whether shapes in the range are to be distributed horizontally or vertically.
RelativeTo | Required | MsoTriState | Determines whether shapes are distributed evenly over the entire horizontal or vertical space on the slide.

Return Value

Nothing

Example

This example defines a shape range that contains all the AutoShapes on the myDocument and then horizontally distributes the shapes in this range.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)
With myDocument.Shapes
    numShapes = .Count
    If numShapes > 1 Then
        numAutoShapes = 0
        ReDim autoShpArray(1 To numShapes)
        For i = 1 To numShapes
            If .Item(i).Type = msoAutoShape Then
                numAutoShapes = numAutoShapes + 1
                autoShpArray(numAutoShapes) = .Item(i).Name
            End If
        Next
        If numAutoShapes > 1 Then
            ReDim Preserve autoShpArray(1 To numAutoShapes)
            Set asRange = .Range(autoShpArray)
            asRange.Distribute msoDistributeHorizontally, msoFalse
        End If
    End If
End With

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


Table.Title Property (PowerPoint)

 Copy code hover
[image]

Table.Title Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the title of the Table object. Read/write.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Title

expression A variable that represents a Table object.

Return Value

String

See also

Concepts

Table Object

Other resources

Table Object Members


SeriesLines Methods (PowerPoint)

 Copy code hover
[image]

SeriesLines Methods (PowerPoint)
Send feedback

Published: July 12, 2012

This object has the following methods:

Methods

Name | Description
Delete | Deletes the object.
Select | Selects the object.


DataLabel.FormulaLocal Property (PowerPoint)

 Copy code hover
[image]

DataLabel.FormulaLocal Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets the formula for the object, using A1-style references in the language of the user. Read/write String.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .FormulaLocal

expression A variable that represents a DataLabel object.

Remarks

If the cell contains a constant, this property returns that constant. If the cell is empty, the property returns an empty string. If the cell contains a formula, the property returns the formula as a string, in the same format in which it would be displayed in the formula bar (including the equal sign).

If you set the value or formula of a cell to a date, Microsoft PowerPoint verifies whether that cell is already formatted with one of the date or time number formats. If not, the number format is changed to the default short date number format.

If the range is a one-dimensional or two-dimensional range, you can set the formula to a Visual Basic array of the same dimensions. Similarly, you can put the formula into a Visual Basic array.

Setting the formula of a multiple-cell range fills all cells in the range with the formula.

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


Axis.CategoryType Property (PowerPoint)

 Copy code hover
[image]

Axis.CategoryType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the category axis type. Read/write XlCategoryType.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .CategoryType

expression A variable that represents an Axis object.

Remarks

You cannot set this property for a value axis.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the category axis for the first chart in the active document to use a time scale, using months as the base unit.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.Axes(xlCategory)

            .CategoryType = xlTimeScale

            .BaseUnit = xlMonths

        End With

    End If

End With

See also

Concepts

Axis Object

Other resources

Axis Object Members


Sequence.ConvertToAfterEffect Method (PowerPoint)

 Copy code hover
[image]

Sequence.ConvertToAfterEffect Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Specifies what an effect should do after it is finished. Returns an Effect object that represents an after effect.

Syntax

expression .ConvertToAfterEffect(Effect, After, DimColor, DimSchemeColor)

expression A variable that represents a Sequence object.

Parameters

Name | Required/Optional | Data Type | Description
Effect | Required | Effect | The effect to which the after effect will be added.
After | Required | MsoAnimAfterEffect | The behavior of the after effect.
DimColor | Optional | MsoRGBType | A single color to apply the after effect.
DimSchemeColor | Optional | PpColorSchemeIndex | A predefined color scheme to apply to the after effect.

Return Value

Effect

Remarks

Do not use both the DimColor and DimSchemeColor arguments in the same call to this method. An after effect may have one color, or use a predefined color scheme, but not both.

Example

The following example sets a dim color for an after effect on the first shape on the first slide in the active presentation. This example assume there is a shape on the first slide.

VBA Copy code Copy code
Sub ConvertToDim()

    Dim shpSelected As Shape

    Dim sldActive As Slide

    Dim effConvert As Effect

    Set sldActive = ActivePresentation.Slides(1)

    Set shpSelected = sldActive.Shapes(1)

    ' Add an animation effect.

    Set effConvert = sldActive.TimeLine.MainSequence.AddEffect _

        (Shape:=shpSelected, effectId:=msoAnimEffectBounce)

    ' Add a dim after effect.

    Set effConvert = sldActive.TimeLine.MainSequence.ConvertToAfterEffect _

        (Effect:=effConvert, After:=msoAnimAfterEffectDim, _

        DimColor:=RGB(Red:=255, Green:=255, Blue:=255))

End Sub

See also

Concepts

Sequence Object

Other resources

Sequence Object Members


ScaleEffect.ByX Property (PowerPoint)

 Copy code hover
[image]

ScaleEffect.ByX Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns a Single that represents scaling or moving an object horizontally by a specified percentage of the screen width, depending on whether it used in conjunction with a ScaleEffect or MotionEffect object, respectively. For example, a value of 50 for a motion effect means to move the object half the screen width to the right. Read/write.

Syntax

expression .ByX

expression A variable that represents a ScaleEffect object.

Return Value

Single

Remarks

Negative numbers move the object horizontally to the left. Floating point numbers (for example, 55.5) are allowed.

To scale or move an object vertically, use the ByY property.

If both the ByX and ByY properties are set, then the object is scaled or moves both horizontally and vertically.

Do not confuse this property with the By property of the ColorEffect , RotationEffect , or PropertyEffect objects, which is used to set colors, rotations, or other properties of an animation behavior, respectively.

Example

The following example adds an animation path; then sets the horizontal and vertical movement of the shape.

VBA Copy code Copy code
Sub AddMotionPath()

    Dim effCustom As Effect

    Dim animBehavior As AnimationBehavior

    Dim shpRectangle As Shape

    'Adds rectangle and sets effect and animation

    Set shpRectangle = ActivePresentation.Slides(1).Shapes _

        .AddShape(Type:=msoShapeRectangle, Left:=300, _

        Top:=300, Width:=300, Height:=150)

    Set effCustom = ActivePresentation.Slides(1).TimeLine _

        .MainSequence.AddEffect(Shape:=shpRectangle, _

         effectId:=msoAnimEffectCustom)

    Set animBehavior = effCustom.Behaviors.Add(msoAnimTypeMotion)

    'Specifies animation motion

    With animBehavior.MotionEffect

        .ByX = 50

        .ByY = 50

    End With

End Sub

See also

Concepts

ScaleEffect Object

Other resources

ScaleEffect Object Members


FreeformBuilder.ConvertToShape Method (PowerPoint)

 Copy code hover
[image]

FreeformBuilder.ConvertToShape Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Creates a shape that has the geometric characteristics of the specified FreeformBuilder object. Returns a Shape object that represents the new shape.

Syntax

expression .ConvertToShape

expression A variable that represents a FreeformBuilder object.

Return Value

Shape

Remarks

You must apply the AddNodes method to a FreeformBuilder object at least once before you use the ConvertToShape method.

Example

This example adds a freeform with five vertices to the first slide in the active presentation.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.BuildFreeform(msoEditingCorner, 360, 200)

    .AddNodes msoSegmentCurve, _

        msoEditingCorner, 380, 230, 400, 250, 450, 300

    .AddNodes msoSegmentCurve, msoEditingAuto, 480, 200

    .AddNodes msoSegmentLine, msoEditingAuto, 480, 400

    .AddNodes msoSegmentLine, msoEditingAuto, 360, 200

    .ConvertToShape

End With

See also

Concepts

FreeformBuilder Object

Other resources

FreeformBuilder Object Members


Presentation.NoLineBreakAfter Property (PowerPoint)

 Copy code hover
[image]

Presentation.NoLineBreakAfter Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the characters that cannot end a line. Read/write.

Syntax

expression .NoLineBreakAfter

expression A variable that represents a Presentation object.

Return Value

String

Example

This example sets "$", "(", "[", "\", and "{" as characters that cannot end a line.

VBA Copy code Copy code
With ActivePresentation

    .FarEastLineBreakLevel = ppFarEastLineBreakLevelCustom

    .NoLineBreakAfter =  "$([\{"

End With

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


Shape.TextFrame2 Property (PowerPoint)

 Copy code hover
[image]

Shape.TextFrame2 Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the TextFrame2 object associated with the specified Shape object that contains the alignment and anchoring properties for the specified shape. Read-only.

Syntax

expression .TextFrame2

expression An expression that returns a Shape object.

Return Value

TextFrame2

Remarks

Use the TextRange property of the TextFrame2 object to return the text in the text frame.

Use the HasTextFrame property to determine whether a shape contains a text frame before you attempt to get the TextFrame2 property value.

See also

Concepts

Shape Object

Other resources

Shape Object Members


MediaFormat.EndPoint Property (PowerPoint)

 Copy code hover
[image]

MediaFormat.EndPoint Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Gets or sets the time of the end point of the trim region of the media. Read/write.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .EndPoint

expression An expression that returns a MediaFormat object.

Return Value

Long

Remarks

The end point must be after the start point.

See also

Concepts

MediaFormat Object

Other resources

MediaFormat Object Members


TextStyleLevel.ParagraphFormat Property (PowerPoint)

 Copy code hover
[image]

TextStyleLevel.ParagraphFormat Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a ParagraphFormat object that represents paragraph formatting for the specified text. Read-only.

Syntax

expression .ParagraphFormat

expression A variable that represents a TextStyleLevel object.

Return Value

ParagraphFormat

Example

This example sets the line spacing before, within, and after each paragraph in shape two on slide one in the active presentation.

VBA Copy code Copy code
With Application.ActivePresentation.Slides(2).Shapes(2)

    With .TextFrame.TextRange.ParagraphFormat

        .LineRuleWithin = msoTrue

        .SpaceWithin = 1.4

        .LineRuleBefore = msoTrue

        .SpaceBefore = 0.25

        .LineRuleAfter = msoTrue

        .SpaceAfter = 0.75

    End With

End With

See also

Concepts

TextStyleLevel Object

Other resources

TextStyleLevel Object Members


Shapes.Count Property (PowerPoint)

 Copy code hover
[image]

Shapes.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a Shapes object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

Shapes Object

Other resources

Shapes Object Members


AnimationPoints Methods (PowerPoint)

 Copy code hover
[image]

AnimationPoints Methods (PowerPoint)
Send feedback

Published: July 12, 2012

This object has the following methods:

Methods

Name | Description
Add | Returns an AnimationPoint object that represents a new animation point.
Item | Returns a single AnimationPoint object from the specified AnimationPoints collection.


LegendKey.Top Property (PowerPoint)

 Copy code hover
[image]

LegendKey.Top Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the distance, in points, from the top edge of the object to the top of the first row (on a worksheet) or the top of the chart area (on a chart). Read-only Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Top

expression A variable that represents a LegendKey object.

See also

Concepts

LegendKey Object

Other resources

LegendKey Object Members


SlideRange.Select Method (PowerPoint)

 Copy code hover
[image]

SlideRange.Select Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Selects the specified object.

Syntax

expression .Select

expression A variable that represents a SlideRange object.

Remarks

If you try to make a selection that isn't appropriate for the view, your code will fail. For example, you can select a slide in slide sorter view but not in slide view.

Example

This example selects the first five characters in the title of slide one in the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(1).Shapes.Title.TextFrame _

    .TextRange.Characters(1, 5).Select

This example selects slide one in the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(1).Select

This example selects a table that has been added to a new slide in a new presentation. The table has three rows and three columns.

VBA Copy code Copy code
With Presentations.Add.Slides

    .Add(1, ppLayoutBlank).Shapes.AddTable(3, 3).Select

End With

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


TextFrame2 Members (PowerPoint)

 Copy code hover
[image]

TextFrame2 Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents the text frame in a Shape or ShapeRange object. Contains the text in the text frame and exposes properties and methods that control the alignment and anchoring of the text frame.

Methods

Name | Description
DeleteText | Deletes the text from a text frame and all the associated properties of the text, including font attributes.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified TextFrame2 object. Read-only.
AutoSize | Returns or sets a value that indicates whether the size of the specified shape is changed automatically to fit text within its boundaries. Read/write.
Column | Returns the Column object that represents the columns of the specified text frame. Read-only.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. Read-only.
HasText | Indicates whether the shape that contains the specified text frame has text associated with it. Read-only.
HorizontalAnchor | Returns or sets the horizontal alignment of text in a text frame. Read/write.
MarginBottom | Returns or sets the distance (in points) between the bottom of the text frame and the bottom of the inscribed rectangle of the shape that contains the text. Read/write.
MarginLeft | Returns or sets the distance (in points) between the left edge of the text frame and the left edge of the inscribed rectangle of the shape that contains the text. Read/write.
MarginRight | Returns or sets the distance (in points) between the right edge of the text frame and the right edge of the inscribed rectangle of the shape that contains the text. Read/write.
MarginTop | Returns or sets the distance (in points) between the top of the text frame and the top of the inscribed rectangle of the shape that contains the text. Read/write.
NoTextRotation | Indicates whether to rotate text with the TextFrame2 rotation. One of the MsoTriState constants. Read/write.
Orientation | Returns or sets text orientation. Read/write.
Parent | Returns the parent object of the specified test frame. Read-only.
PathFormat | Returns or sets the path type for the specified text frame. Read/write.
Ruler | Returns a Ruler2 object that represents the ruler for the specified text. Read-only.
TextRange | Returns a TextRange object that represents the text in the specified text frame. Read-only.
ThreeD | Returns a ThreeDFormat object that represents the three-dimensional formatting of the parent shape. Read-only.
VerticalAnchor | Returns or sets the vertical alignment of text in a text frame. Read/write.
WarpFormat | Returns or sets the warp format (how the text is warped) for the specified text frame. Read/write.
WordArtFormat | Returns or sets the WordArt type for the specified text frame. Read/write.
WordWrap | Determines whether lines of text break automatically to fit inside the shape. Read/write.


ResampleMediaTasks Object (PowerPoint)

 Copy code hover
[image]

ResampleMediaTasks Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

A collection of ResampleMediaTask objects.

Version Information

Version Added: PowerPoint 2010

Remarks

Use ResampleMediaTasks(Index) to return a ResampleMediaTask object, where Index is the position of the ResampleMediaTask object to return.

See also

Concepts

PowerPoint Object Model Reference

Other resources

ResampleMediaTasks Object Members


Column.Parent Property (PowerPoint)

 Copy code hover
[image]

Column.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a Column object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

Column Object

Other resources

Column Object Members


ChartGroup.DoughnutHoleSize Property (PowerPoint)

 Copy code hover
[image]

ChartGroup.DoughnutHoleSize Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the size of the hole in a doughnut chart group. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .DoughnutHoleSize

expression A variable that represents a ChartGroup object.

Remarks

The hole size is expressed as a percentage of the chart size, from 10 through 90 percent.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the hole size for doughnut group one of the first chart in the active document. You should run the example on a 2-D doughnut chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.DoughnutGroups(1).DoughnutHoleSize = 10

    End If

End With

See also

Concepts

ChartGroup Object

Other resources

ChartGroup Object Members


Chart.Parent Property (PowerPoint)

 Copy code hover
[image]

Chart.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents a Chart object.

See also

Concepts

Chart Object

Other resources

Chart Object Members


Broadcast.Start Method (PowerPoint)

 Copy code hover
[image]

Broadcast.Start Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a list of supported functionality and the maximum allowed file size.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Start(serverUrl)

expression A variable that represents a Broadcast object.

Parameters

Name | Required/Optional | Data Type | Description
serverUrl | Required | String | The URL of the hosting Web service.

See also

Concepts

Broadcast Object

Other resources

Broadcast Object Members


ShadowFormat.Creator Property (PowerPoint)

 Copy code hover
[image]

ShadowFormat.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.

Syntax

expression .Creator

expression A variable that represents a ShadowFormat object.

Return Value

Long

Remarks

The Creator property is designed to be used in Microsoft Office applications for the Macintosh.

Example

This example displays a message about the creator of myObject.

VBA Copy code Copy code
Set myObject = Application.ActivePresentation.Slides(1).Shapes(1)

If myObject.Creator = &h50575054 Then

    MsgBox "This is a PowerPoint object"

Else

    MsgBox "This is not a PowerPoint object"

End If

See also

Concepts

ShadowFormat Object

Other resources

ShadowFormat Object Members


SectionProperties.AddSection Method (PowerPoint)

 Copy code hover
[image]

SectionProperties.AddSection Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Adds a new section at the specified index position and returns the index of the newly created section.

Syntax

expression .AddSection(sectionIndex, sectionName)

expression A variable that represents a SectionProperties object.

Parameters

Name | Required/Optional | Data Type | Description
sectionIndex | Required | Integer | The index of the section before which to add the section.
sectionName | Optional | Variant | The name of the new section.

Return Value

Integer

Remarks

If a section already exists at the specified index position, calling AddSection is equivalent to adding an empty section immediately before that section.

The indices of sections after the newly inserted section are automatically incremented by one.

sectionIndex can be one larger than the total number of existing sections, as long as it is less than the maximum number of sections allowed (512); this creates a new, empty section at the end.

If no sections exist in the presentation, calling this method and passing a sectionIndex value of 1 creates the first section.

See also

Concepts

SectionProperties Object

Other resources

SectionProperties Object Members


CustomLayout.Index Property (PowerPoint)

 Copy code hover
[image]

CustomLayout.Index Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the index position of the specified custom layout in the CustomLayouts collection. Read-only.

Syntax

expression .Index

expression A variable that represents a CustomLayout object.

Return Value

Long

See also

Concepts

CustomLayout Object

Other resources

CustomLayout Object Members


AnimationSettings Properties (PowerPoint)

 Copy code hover
[image]

AnimationSettings Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
AdvanceMode | Returns or sets a value that indicates whether the specified shape animation advances only when clicked or automatically after a specified amount of time. Read/write.
AdvanceTime | Returns or sets the amount of time, in seconds, after which the specified shape will become animated. Read/write.
AfterEffect | Returns or sets a PpAfterEffect constant that indicates whether the specified shape appears dimmed, hidden, or unchanged after it is built. Read/write.
Animate | Determines whether the specified shape is animated during a slide show. Read/write.
AnimateBackground | If the specified object is an AutoShape, specifies if the shape is animated separately from the text it contains. Read/write.
AnimateTextInReverse | Determines whether the specified shape is built in reverse order. Applies only to shapes (such as shapes containing lists) that can be built in more than one step. Read/write.
AnimationOrder | Returns or sets an integer that represents the position of the specified shape within the collection of shapes to be animated. Read/write.
Application | Returns an Application object that represents the creator of the specified object.
ChartUnitEffect | Returns or sets a value that indicates whether the graph range is animated by series, category, or element. Read/write.
DimColor | Returns or sets a ColorFormat object that represents the color of the specified shape after it is been built. Read-only.
EntryEffect | For the AnimationSettings object, this property returns or sets the special effect applied to the animation for the specified shape. Read/write.
Parent | Returns the parent object for the specified object.
PlaySettings | Returns a PlaySettings object that contains information about how the specified media clip plays during a slide show. Read-only.
SoundEffect | Returns a SoundEffect object that represents the sound to be played during the transition to the specified slide. REad-only.
TextLevelEffect | Indicates whether the text in the specified shape is animated by first-level paragraphs, second-level paragraphs, or some other level of paragraphs (up to fifth-level paragraphs). Read/write.
TextUnitEffect | Indicates whether the text in the specified shape is animated paragraph by paragraph, word by word, or letter by letter. Read/write.


ConnectorFormat.Creator Property (PowerPoint)

 Copy code hover
[image]

ConnectorFormat.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.

Syntax

expression .Creator

expression A variable that represents a ConnectorFormat object.

Return Value

Long

Remarks

The Creator property is designed to be used in Microsoft Office applications for the Macintosh.

Example

This example displays a message about the creator of myObject.

VBA Copy code Copy code
Set myObject = Application.ActivePresentation.Slides(1).Shapes(1)

If myObject.Creator = &h50575054 Then

    MsgBox "This is a PowerPoint object"

Else

    MsgBox "This is not a PowerPoint object"

End If

See also

Concepts

ConnectorFormat Object

Other resources

ConnectorFormat Object Members


Chart.AlternativeText Property (PowerPoint)

 Copy code hover
[image]

Chart.AlternativeText Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets the alternative text associated with a shape in a Web presentation. Read/write.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .AlternativeText

expression A variable that represents a Chart object.

Return Value

String

Example

The following example sets the alternative text for the selected shape in the active window. The selected shape is a picture of a mallard duck.

VBA Copy code Copy code
ActiveWindow.Selection.ShapeRange.AlternativeText = "This is a mallard duck."

See also

Concepts

Chart Object

Other resources

Chart Object Members


PrintRange.Parent Property (PowerPoint)

 Copy code hover
[image]

PrintRange.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a PrintRange object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

PrintRange Object

Other resources

PrintRange Object Members


SlideShowView.Application Property (PowerPoint)

 Copy code hover
[image]

SlideShowView.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a SlideShowView object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


MsoAnimType Enumeration (PowerPoint)

 Copy code hover
[image]

MsoAnimType Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the type of animation.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
msoAnimTypeColor | 2 | Color
msoAnimTypeCommand | 6 | Command
msoAnimTypeFilter | 7 | Filter
msoAnimTypeMixed | -2 | Mixed
msoAnimTypeMotion | 1 | Motion
msoAnimTypeNone | 0 | None
msoAnimTypeProperty | 5 | Property
msoAnimTypeRotation | 4 | Rotation
msoAnimTypeScale | 3 | Scale
msoAnimTypeSet | 8 | Set


MediaFormat.VideoFrameRate Property (PowerPoint)

 Copy code hover
[image]

MediaFormat.VideoFrameRate Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the video frame rate per second of the media. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .VideoFrameRate

expression An expression that returns a MediaFormat object.

Return Value

Long

See also

Concepts

MediaFormat Object

Other resources

MediaFormat Object Members


MediaFormat.Volume Property (PowerPoint)

 Copy code hover
[image]

MediaFormat.Volume Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Gets or sets the volume of the media. Read/write.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Volume

expression An expression that returns a MediaFormat object.

Return Value

Single

See also

Concepts

MediaFormat Object

Other resources

MediaFormat Object Members


ParagraphFormat.SpaceBefore Property (PowerPoint)

 Copy code hover
[image]

ParagraphFormat.SpaceBefore Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the amount of space before the first line in each paragraph of the specified text, in points or lines. Read/write.

Syntax

expression .SpaceBefore

expression A variable that represents a ParagraphFormat object.

Return Value

Single

Example

This example sets the spacing before paragraphs to 6 points for the text in shape two on slide in the active presentation.

VBA Copy code Copy code
With Application.ActivePresentation.Slides(1).Shapes(2)

    With .TextFrame.TextRange.ParagraphFormat

        .LineRuleBefore = False

        .SpaceBefore = 6

    End With

End With

See also

Concepts

ParagraphFormat Object

Other resources

ParagraphFormat Object Members


Axis.Delete Method (PowerPoint)

 Copy code hover
[image]

Axis.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Delete

expression A variable that represents an Axis object.

See also

Concepts

Axis Object

Other resources

Axis Object Members


ChartCategory.Name Property (PowerPoint)

 Copy code hover
[image]

ChartCategory.Name Property (PowerPoint)
Send feedback

Returns or sets a String that represents the name of a chart category. Read/write.

Version information

Version Added: PowerPoint 2013

Syntax

expression .Name

expression A variable that represents a ChartCategory object.

Property value

STRING


ResampleMediaTask Properties (PowerPoint)

 Copy code hover
[image]

ResampleMediaTask Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
AudioCompressionType | Returns the audio compression type. Read-only.
AudioSamplingRate | Returns the audio sampling rate per second. Read-only.
ContainerType | Returns the format type of the container of the sample. Read-only.
IsEmbedded | Returns whether the sample is embedded. Read-only.
IsLinked | Returns whether the sample is linked. Read-only.
profile | Returns the media mobilization profile for the specified media asset. Read-only.
SampleHeight | Returns the resolution height of the sample. Read-only.
SampleWidth | Returns the resolution width of the sample. Read-only.
Shape | Returns the shape that is associated with the specified media asset. Read-only.
VideoCompressionType | Returns the video compression format of the sample. Read-only.
VideoFrameRate | Returns the video frame rate per second of the sample. Read-only.


Presentation.RemovePersonalInformation Property (PowerPoint)

 Copy code hover
[image]

Presentation.RemovePersonalInformation Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

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

Syntax

expression .RemovePersonalInformation

expression A variable that represents a Presentation object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | Comments, revisions, and personal information remain in the presentation.
msoTrue | Removes comments, revisions, and personal information when saving presentation.

Example

This example sets the active presentation to remove personal information the next time the user saves it.

VBA Copy code Copy code
Sub RemovePersonalInfo()

    ActivePresentation.RemovePersonalInformation = msoTrue

End Sub

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


AxisTitle Methods (PowerPoint)

 Copy code hover
[image]

AxisTitle Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Delete | Deletes the object.
Select | Selects the object.


Shape.BlackWhiteMode Property (PowerPoint)

 Copy code hover
[image]

Shape.BlackWhiteMode Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a value that indicates how the specified shape appears when the presentation is viewed in black-and-white mode. Read/write.

Syntax

expression .BlackWhiteMode

expression A variable that represents a Shape object.

Return Value

MsoBlackWhiteMode

Remarks

The value of the BlackWhiteMode property can be one of these MsoBlackWhiteMode constants.

msoBlackWhiteAutomatic

msoBlackWhiteBlack

msoBlackWhiteBlackTextAndLine

msoBlackWhiteDontShow

msoBlackWhiteGrayOutline

msoBlackWhiteGrayScale

msoBlackWhiteHighContrast

msoBlackWhiteInverseGrayScale

msoBlackWhiteLightGrayScale

msoBlackWhiteMixed

msoBlackWhiteWhite

Example

This example sets shape one on myDocument to appear in black-and-white mode. When you view the presentation in black-and-white mode, shape one will appear black, regardless of what color it is in color mode.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes(1).BlackWhiteMode = msoBlackWhiteBlack

See also

Concepts

Shape Object

Other resources

Shape Object Members


SectionProperties Methods (PowerPoint)

 Copy code hover
[image]

SectionProperties Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
AddBeforeSlide | Adds a section immediately before the specified slide index, and returns the index of the new section.
AddSection | Adds a new section at the specified index position and returns the index of the newly created section.
Delete | Deletes the section break that sets off the specified section, and optionally deletes all the slides in the section.
FirstSlide | Returns the index of the first slide in the specified section, or returns -1 if the section is empty.
Move | Moves the specified section to the specified index position, moving the slides in the section along with the section break.
Name | Returns the name of the specified section as a String.
Rename | Renames the specified section with the specified name.
SectionID | Returns a string that represents the unique identifier of the specified section.
SlidesCount | Returns the number of slides in the specified section.


XlCategoryType Enumeration (PowerPoint)

 Copy code hover
[image]

XlCategoryType Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the type of the category axis.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlAutomaticScale | -4105 | Word controls the axis type.
xlCategoryScale | 2 | Axis groups data by an arbitrary set of categories.
xlTimeScale | 3 | Axis groups data on a time scale.


TabStop.Clear Method (PowerPoint)

 Copy code hover
[image]

TabStop.Clear Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Clears the specified tab stop from the ruler and deletes it from the TabStops collection.

Syntax

expression .Clear

expression A variable that represents a TabStop object.

Example

This example clears all tab stops for the text in shape two on slide one in the active presentation.

VBA Copy code Copy code
With Application.ActivePresentation.Slides(1).Shapes(2).TextFrame _

    .Ruler.TabStops

    For i = .Count To 1 Step -1

        .Item(i).Clear

    Next

End With

See also

Concepts

TabStop Object

Other resources

TabStop Object Members


Shape.Visible Property (PowerPoint)

 Copy code hover
[image]

Shape.Visible Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the visibility of the specified object or the formatting applied to the specified object. Read/write.

Syntax

expression .Visible

expression A variable that represents a Shape object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified object or object formatting is not visible.
msoTrue | The specified object or object formatting is visible.

See also

Concepts

Shape Object

Other resources

Shape Object Members


Shape.HorizontalFlip Property (PowerPoint)

 Copy code hover
[image]

Shape.HorizontalFlip Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns whether the specified shape is flipped around the horizontal axis. Read-only.

Syntax

expression .HorizontalFlip

expression A variable that represents a Shape object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified shape is not flipped around the horizontal axis.
msoTrue | The specified shape is flipped around the horizontal axis.

Example

This example restores each shape on myDocument to its original state, if it is been flipped horizontally or vertically.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

For Each s In myDocument.Shapes

    If s.HorizontalFlip Then s.Flip msoFlipHorizontal

    If s.VerticalFlip Then s.Flip msoFlipVertical

Next

See also

Concepts

Shape Object

Other resources

Shape Object Members


Presentation.Slides Property (PowerPoint)

 Copy code hover
[image]

Presentation.Slides Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Slides collection that represents all slides in the specified presentation. Read-only.

Syntax

expression .Slides

expression A variable that represents a PlaySettings object.

Return Value

Slides

Example

This example adds a slide to the active presentation.

VBA Copy code Copy code
Application.ActivePresentation.Slides.Add 1, ppLayoutTitle

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


AnimationBehavior Members (PowerPoint)

 Copy code hover
[image]

AnimationBehavior Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents the behavior of an animation effect, the main animation sequence, or an interactive animation sequence. The AnimationBehavior object is a member of the AnimationBehaviors collection.

Methods

Name | Description
Delete | Deletes the specified AnimationBehavior object.

Properties

Name | Description
Accumulate | Determines whether animation behaviors accumulate. Read/write.
Additive | Sets or returns whether the current animation behavior is combined with other running animations. Read/write.
Application | Returns an Application object that represents the creator of the specified object.
ColorEffect | Returns a ColorEffect object that represents the color properties for a specified animation behavior.
CommandEffect | Returns a CommandEffect object for the specified animation behavior. Read-only.
FilterEffect | Returns a FilterEffect object that represents a filter effect for an animation behavior. Read-only.
MotionEffect | Returns a MotionEffect object that represents the properties of a motion animation.
Parent | Returns the parent object for the specified object.
PropertyEffect | Returns a PropertyEffect object for a given animation behavior. Read-only.
RotationEffect | Returns a RotationEffect object for an animation behavior. Read-only.
ScaleEffect | Returns a ScaleEffect object for a given animation behavior. Read-only.
SetEffect | Returns a SetEffect object for the animation behavior. Read-only.
Timing | Returns a Timing object that represents the timing properties for an animation sequence.
Type | Represents the type of animation. Read/write.


How to: Add Controls to UserForms

 Copy code hover
[image]

How to: Add Controls to UserForms
Send feedback

To add controls to a user form, find the control you want to add in the Toolbox, drag the control onto the form, and then drag an adjustment handle on the control until the control's outline is the size and shape you want.

Note Note

Dragging a control (or a number of "grouped" controls) from the form back to the Toolbox creates a template of that control, which you can reuse. This is a useful feature for implementing a standard "look and feel" for your applications.

After you added controls to the form, use the commands on the Format menu in the Visual Basic Editor to adjust the control alignment and spacing.


SlideRange.Hyperlinks Property (PowerPoint)

 Copy code hover
[image]

SlideRange.Hyperlinks Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Hyperlinks collection that represents all the hyperlinks on the specified slide. Read-only.

Syntax

expression .Hyperlinks

expression A variable that represents a SlideRange object.

Return Value

Hyperlinks

Example

This example allows the user to update an outdated Internet address for all hyperlinks in the active presentation.

VBA Copy code Copy code
oldAddr = InputBox("Old Internet address")

newAddr = InputBox("New Internet address")

For Each s In ActivePresentation.Slides

    For Each h In s.Hyperlinks

        If LCase(h.Address) = oldAddr Then h.Address = newAddr

    Next

Next

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


Shape.Fill Property (PowerPoint)

 Copy code hover
[image]

Shape.Fill Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a FillFormat object that contains fill formatting properties for the specified shape. Read-only.

Syntax

expression .Fill

expression A variable that represents a Shape object.

Return Value

FillFormat

Example

This example adds a rectangle to myDocument and then sets the foreground color, background color, and gradient for the rectangle's fill.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes _

        .AddShape(msoShapeRectangle, 90, 90, 90, 50).Fill

    .ForeColor.RGB = RGB(128, 0, 0)

    .BackColor.RGB = RGB(170, 170, 170)

    .TwoColorGradient msoGradientHorizontal, 1

End With

See also

Concepts

Shape Object

Other resources

Shape Object Members


Rows.Count Property (PowerPoint)

 Copy code hover
[image]

Rows.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a Rows object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

Rows Object

Other resources

Rows Object Members


ProtectedViewWindows.Application Property (PowerPoint)

 Copy code hover
[image]

ProtectedViewWindows.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a ProtectedViewWindows object.

See also

Concepts

ProtectedViewWindows Object

Other resources

ProtectedViewWindows Object Members


Axis.DisplayUnitCustom Property (PowerPoint)

 Copy code hover
[image]

Axis.DisplayUnitCustom Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

If the value of the DisplayUnit property is xlCustom, returns or sets the value of the displayed units. Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .DisplayUnitCustom

expression A variable that represents an Axis object.

Remarks

The value of this property must be from 0 through 10E307.

Using unit labels when charting large values makes your tick-mark labels easier to read. For example, if you label your value axis in units of hundreds, thousands, or millions, you can use smaller numeric values at the tick marks on the axis.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the units displayed on the value axis of the first chart in the active document to increments of 500.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.Axes(xlValue)

            .DisplayUnit = xlCustom

            .DisplayUnitCustom = 500

            .HasTitle = True

            .AxisTitle.Caption = "Rebate Amounts"

        End With

    End If

End With

See also

Concepts

Axis Object

Other resources

Axis Object Members


TextFrame.MarginLeft Property (PowerPoint)

 Copy code hover
[image]

TextFrame.MarginLeft Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the distance (in points) between the left edge of the text frame and the left edge of the inscribed rectangle of the shape that contains the text. Read/write.

Syntax

expression .MarginLeft

expression A variable that represents a TextFrame object.

Return Value

Single

Example

This example adds a rectangle to myDocument, adds text to the rectangle, and then sets the margins for the text frame.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddShape(msoShapeRectangle, _

        0, 0, 250, 140).TextFrame

    .TextRange.Text = "Here is some test text"

    .MarginBottom = 0

    .MarginLeft = 10

    .MarginRight = 0

    .MarginTop = 20

End With

See also

Concepts

TextFrame Object

Other resources

TextFrame Object Members


Axis.Format Property (PowerPoint)

 Copy code hover
[image]

Axis.Format Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Format

expression A variable that represents an Axis object.

See also

Concepts

Axis Object

Other resources

Axis Object Members


Application.ActiveProtectedViewWindow Property (PowerPoint)

 Copy code hover
[image]

Application.ActiveProtectedViewWindow Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a ProtectedViewWindow object that represents the active Protected View window (the window on top). Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .ActiveProtectedViewWindow

expression A variable that represents an Application object.

Remarks

Nothing if there are no Protected View windows open.

Example

The following example displays the name (Caption property) of the active Protected View window.

VBA Copy code Copy code
MsgBox "The name of the active Protected View window is " & ActiveProtectedWindow.Caption

See also

Concepts

Application Object

Other resources

Application Object Members


XlTrendlineType Enumeration (PowerPoint)

 Copy code hover
[image]

XlTrendlineType Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies how the trendline that smoothes out fluctuations in the data is calculated.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlExponential | 5 | Uses an equation to calculate the least squares fit through points (for example, y=ab^x) .
xlLinear | -4132 | Uses the linear equation y = mx + b to calculate the least squares fit through points.
xlLogarithmic | -4133 | Uses the equation y = c ln x + b to calculate the least squares fit through points.
xlMovingAvg | 6 | Uses a sequence of averages computed from parts of the data series. The number of points equals the total number of points in the series minus the number specified for the period.
xlPolynomial | 3 | Uses an equation to calculate the least squares fit through points (for example, y = ax^6 + bx^5 + cx^4 + dx^3 + ex^2 + fx + g).
xlPower | 4 | Uses an equation to calculate the least squares fit through points (for example, y = ax^b).


PpTextStyleType Enumeration (PowerPoint)

 Copy code hover
[image]

PpTextStyleType Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Constants that specify the text style type, passed to the Item method of the TextStyles collection.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppBodyStyle | 3 | Body style
ppDefaultStyle | 1 | Default style
ppTitleStyle | 2 | Title style


OLE Programmatic Identifiers (PowerPoint)

 Copy code hover
[image]

OLE Programmatic Identifiers (PowerPoint)
Send feedback

You can use an OLE programmatic identifier (sometimes called a ProgID) to create an Automation object. The following tables list OLE programmatic identifiers for Microsoft ActiveX controls, Microsoft Office applications, and Microsoft Office Web Components.

ActiveX Controls

To create the ActiveX controls listed in the following table, use the corresponding OLE programmatic identifier.

To create this control | Use this identifier
CheckBox | Forms.CheckBox.1
ComboBox | Forms.ComboBox.1
CommandButton | Forms.CommandButton.1
Frame | Forms.Frame.1
Image | Forms.Image.1
Label | Forms.Label.1
ListBox | Forms.ListBox.1
MultiPage | Forms.MultiPage.1
OptionButton | Forms.OptionButton.1
ScrollBar | Forms.ScrollBar.1
SpinButton | Forms.SpinButton.1
TabStrip | Forms.TabStrip.1
TextBox | Forms.TextBox.1
ToggleButton | Forms.ToggleButton.1

Microsoft Office Access

To create the Microsoft Office Access objects listed in the following table, use one of the corresponding OLE programmatic identifiers. If you use an identifier without a version number suffix, you create an object in the most recent version of Access available on the computer where the macro is running.

To create this object | Use one of these identifiers
Application | Access.Application
CurrentData | Access.CodeData, Access.CurrentData
CurrentProject | Access.CodeProject, Access.CurrentProject
DefaultWebOptions | Access.DefaultWebOptions

Microsoft Office Excel

To create the Microsoft Office Excel objects listed in the following table, use one of the corresponding OLE programmatic identifiers. If you use an identifier without a version number suffix, you create an object in the most recent version of Excel available on the computer where the macro is running.

To create this object | Use one of these identifiers | Comments
Application | Excel.Application |
Workbook | Excel.AddIn |
Workbook | Excel.Chart | Returns a workbook containing two worksheets; one for the chart and one for its data. The chart worksheet is the active worksheet.
Workbook | Excel.Sheet | Returns a workbook with one worksheet.

Microsoft Graph

To create the Microsoft Graph objects listed in the following table, use one of the corresponding OLE programmatic identifiers. If you use an identifier without a version number suffix, you create an object in the most recent version of Graph available on the computer where the macro is running.

To create this object | Use one of these identifiers
Application | MSGraph.Application
Chart | MSGraph.Chart

Microsoft Office Outlook

To create the Microsoft Office Outlook object given in the following table, use one of the corresponding OLE programmatic identifiers. If you use an identifier without a version number suffix, you create an object in the most recent version of Outlook available on the computer where the macro is running.

To create this object | Use one of these identifiers
Application | Outlook.Application

Microsoft Office PowerPoint

To create the Microsoft Office PowerPoint object given in the following table, use one of the corresponding OLE programmatic identifiers. If you use an identifier without a version number suffix, you create an object in the most recent version of PowerPoint available on the computer where the macro is running.

To create this object | Use one of these identifiers
Application | PowerPoint.Application

Microsoft Office Word

To create the Microsoft Office Word objects listed in the following table, use one of the corresponding OLE programmatic identifiers. If you use an identifier without a version number suffix, you create an object in the most recent version of Word available on the computer where the macro is running.

To create this object | Use one of these identifiers
Application | Word.Application
Document | Word.Document, Word.Template
Global | Word.Global


DataTable Members (PowerPoint)

 Copy code hover
[image]

DataTable Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a chart data table.

Methods

Name | Description
Delete | Deletes the object.
Select | Selects the object.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Border | Returns the border of the object. Read-only ChartBorder.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Font | Returns the font of the specified object. Read-only ChartFont.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
HasBorderHorizontal | True if the chart data table has horizontal cell borders. Read/write Boolean.
HasBorderOutline | True if the chart data table has outline borders. Read/write Boolean.
HasBorderVertical | True if the chart data table has vertical cell borders. Read/write Boolean.
Parent | Returns the parent for the specified object. Read-only Object.
ShowLegendKey | True if the data label legend key is visible. Read/write Boolean.


PlotArea Object (PowerPoint)

 Copy code hover
[image]

PlotArea Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the plot area of a chart.

Version Information

Version Added: PowerPoint 2007

Remarks

This is the area where your chart data is plotted. The plot area on a 2-D chart contains the data markers, gridlines, data labels, trendlines, and optional chart items placed in the chart area. The plot area on a 3-D chart contains all the above items plus the walls, floor, axes, axis titles, and tick-mark labels in the chart.

The plot area is surrounded by the chart area. The chart area on a 2-D chart contains the axes, the chart title, the axis titles, and the legend. The chart area on a 3-D chart contains the chart title and the legend. For information about formatting the chart area, see the ChartArea object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

Use the PlotArea property to return a PlotArea object. The following example places a dashed border around the chart area of the first chart in the active document, and then places a dotted border around the plot area.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart

            .ChartArea.Border.LineStyle = xlDash

            .PlotArea.Border.LineStyle = xlDot

        End With

    End If

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

PlotArea Object Members


FilterEffect.Type Property (PowerPoint)

 Copy code hover
[image]

FilterEffect.Type Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the type of animation. Read/write.

Syntax

expression .Type

expression A variable that represents a FilterEffect object.

Return Value

MsoAnimType

Remarks

The value of the Type property can be one of these MsoAnimType constants.

MsoAnimTypeColor

MsoAnimTypeMixed

MsoAnimTypeMotion

MsoAnimTypeNone

MsoAnimTypeProperty

MsoAnimTypeRoatation

MsoAnimTypeScale

MsoAnimTypeTransition

See also

Concepts

FilterEffect Object

Other resources

FilterEffect Object Members


LinkFormat.Update Method (PowerPoint)

 Copy code hover
[image]

LinkFormat.Update Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Updates the specified linked OLE object.

Syntax

expression .Update

expression A variable that represents an LinkFormat object.

Remarks

To update all the links in a presentation at once, use the UpdateLinks method.

Example

This example updates all linked OLE objects in the active presentation.

VBA Copy code Copy code
For Each sld In ActivePresentation.Slides

    For Each sh In sld.Shapes

        If sh.Type = msoLinkedOLEObject Then

            sh.LinkFormat.Update

        End If

    Next

Next

See also

Concepts

LinkFormat Object

Other resources

LinkFormat Object Members


Research Properties (PowerPoint)

 Copy code hover
[image]

Research Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the Microsoft PowerPoint application. Read-only.
Parent | Returns an Object that represents the parent object of the specified Research object. Read-only.


DataLabel Methods (PowerPoint)

 Copy code hover
[image]

DataLabel Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Delete | Deletes the object.
Select | Selects the object.


TextStyles Members (PowerPoint)

 Copy code hover
[image]

TextStyles Members (PowerPoint)
Send feedback

Published: July 16, 2012

A collection of three text styles - title text, body text, and default text - each of which is represented by a TextStyle object.

Methods

Name | Description
Item | Returns a single text style from the specified TextStyles collection.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


CommandEffect.Application Property (PowerPoint)

 Copy code hover
[image]

CommandEffect.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a CommandEffect object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

CommandEffect Object

Other resources

CommandEffect Object Members


Point.Shadow Property (PowerPoint)

 Copy code hover
[image]

Point.Shadow Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a value that indicates whether the object has a shadow. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Shadow

expression A variable that represents a Point object.

See also

Concepts

Point Object

Other resources

Point Object Members


Series.BubbleSizes Property (PowerPoint)

 Copy code hover
[image]

Series.BubbleSizes Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a string that refers to the worksheet cells that contain the x-value, y-value, and size data for the bubble chart. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .BubbleSizes

expression A variable that represents a Series object.

Remarks

When you return the cell reference, it will return a string that describes the cells in A1-style notation. To set the size data for the bubble chart, you must use R1C1-style notation.

Note Note

This property applies only to bubble charts.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example displays the cell reference for the cells that contain the bubble chart x-value, y-value, and size data for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        MsgBox .Chart.SeriesCollection(1).BubbleSizes

    End If

End With

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

This example shows how to set this property using R1C1-style notation.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(3)

    If .HasChart Then

        .Chart.SeriesCollection(1). _

            BubbleSizes = "Sheet1!r2c3:r5c3"

    End If

End With

See also

Concepts

Series Object

Other resources

Series Object Members


CommandEffect.Type Property (PowerPoint)

 Copy code hover
[image]

CommandEffect.Type Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the type of animation. Read/write.

Syntax

expression .Type

expression A variable that represents a CommandEffect object.

Return Value

MsoAnimType

Remarks

The value of the Type property can be one of these MsoAnimType constants.

MsoAnimTypeColor

MsoAnimTypeMixed

MsoAnimTypeMotion

MsoAnimTypeNone

MsoAnimTypeProperty

MsoAnimTypeRoatation

MsoAnimTypeScale

MsoAnimTypeTransition

See also

Concepts

CommandEffect Object

Other resources

CommandEffect Object Members


CustomLayout.Duplicate Method (PowerPoint)

 Copy code hover
[image]

CustomLayout.Duplicate Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Creates a duplicate of the specified custom layout, adds the new custom layout to the CustomLayouts collection immediately after the original custom layout, and returns a CustomLayout object that represents the duplicate layout.

Syntax

expression .Duplicate

expression A variable that represents a CustomLayout object.

Return Value

CustomLayout

See also

Concepts

CustomLayout Object

Other resources

CustomLayout Object Members


Shape Methods (PowerPoint)

 Copy code hover
[image]

Shape Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Apply | Applies to the specified shape formatting that's been copied by using the PickUp method.
ApplyAnimation | Applies the last picked up animation to the Shape object.
ConvertTextToSmartArt | Converts text in a Shape object to a SmartArt diagram.
Copy | Copies the specified object to the Clipboard.
Cut | Deletes the specified object and places it on the Clipboard.
Delete | Deletes the specified Shape object.
Duplicate | Creates a duplicate of the specified Shape object, adds the new shape to the Shapes collection, and then returns a new ShapeRange object. The duplicated objects are placed at the end of the Shapes collection.
Flip | Flips the specified shape around its horizontal or vertical axis.
IncrementLeft | Moves the specified shape horizontally by the specified number of points.
IncrementRotation | Changes the rotation of the specified shape around the z-axis by the specified number of degrees. Use the Rotation property to set the absolute rotation of the shape.
IncrementTop | Moves the specified shape vertically by the specified number of points.
PickUp | Copies the formatting of the specified shape. Use the Apply method to apply the copied formatting to another shape.
PickupAnimation | Picks up all animation from the Shape object.
RerouteConnections | Reroutes connectors so that they take the shortest possible path between the shapes they connect. To do this, the RerouteConnections method may detach the ends of a connector and reattach them to different connecting sites on the connected shapes.
ScaleHeight | Scales the height of the shape by a specified factor.
ScaleWidth | Scales the width of the shape by a specified factor. For pictures and OLE objects, you can indicate whether you want to scale the shape relative to the original size or relative to the current size. Shapes other than pictures and OLE objects are always scaled relative to their current width.
Select | Selects the specified object.
SetShapesDefaultProperties | Applies the formatting for the specified shape to the default shape. Shapes created after this method has been used will have this formatting applied to them by default.
Ungroup | Ungroups any grouped shapes in the specified shape or range of shapes. Disassembles pictures and OLE objects within the specified shape or range of shapes. Returns the ungrouped shapes as a single ShapeRange object.
UpgradeMedia | Converts a legacy media object to an updated media object.
ZOrder | Moves the specified shape in front of or behind other shapes in the collection (that is, changes the shape's position in the z-order).


ColorEffect.To Property (PowerPoint)

 Copy code hover
[image]

ColorEffect.To Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns a ColorFormat object that represents the RGB color value of an animation behavior. Read/write.

Syntax

expression .To

expression A variable that represents a ColorEffect object.

Return Value

ColorFormat

Remarks

Use this property in conjunction with the From property to transition from one color to another.

Do not confuse this property with the ToX or ToY properties of the ScaleEffect and MotionEffect objects, which are only used for scaling or motion effects.

Example

The following example adds a color effect and changes its color from a light bluish green to yellow.

VBA Copy code Copy code
Sub AddAndChangeColorEffect()

    Dim effBlinds As Effect

    Dim tmlTiming As TimeLine

    Dim shpRectangle As Shape

    Dim animColor As AnimationBehavior

    Dim clrEffect As ColorEffect

    Set shpRectangle = ActivePresentation.Slides(1).Shapes _

        .AddShape(Type:=msoShapeRectangle, Left:=100, _

        Top:=100, Width:=50, Height:=50)

    Set tmlTiming = ActivePresentation.Slides(1).TimeLine

    Set effBlinds = tmlTiming.MainSequence.AddEffect(Shape:=shpRectangle, _

        effectId:=msoAnimEffectBlinds)

    Set animColor = tmlTiming.MainSequence(1).Behaviors _

        .Add(Type:=msoAnimTypeColor)

    Set clrEffect = animColor.ColorEffect

    clrEffect.From.RGB = RGB(Red:=255, Green:=255, Blue:=0)

    clrEffect.To.RGB = RGB(Red:=0, Green:=255, Blue:=255)

End Sub

See also

Concepts

ColorEffect Object

Other resources

ColorEffect Object Members


Legend.Top Property (PowerPoint)

 Copy code hover
[image]

Legend.Top Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the distance, in points, from the top edge of the object to the top of the first row (on a worksheet) or the top of the chart area (on a chart). Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Top

expression A variable that represents a Legend object.

See also

Concepts

Legend Object

Other resources

Legend Object Members


Legend.Shadow Property (PowerPoint)

 Copy code hover
[image]

Legend.Shadow Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a value that indicates whether the object has a shadow. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Shadow

expression A variable that represents a Legend object.

See also

Concepts

Legend Object

Other resources

Legend Object Members


Presentation.ExtraColors Property (PowerPoint)

 Copy code hover
[image]

Presentation.ExtraColors Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

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

Syntax

expression .ExtraColors

expression A variable that represents an Presentation object.

Return Value

ExtraColors

Example

The following example adds a rectangle to slide one in the active presentation and sets its fill foreground color to the first extra color. If there hasn't been at least one extra color defined for the presentation, this example will fail.

VBA Copy code Copy code
With ActivePresentation

    Set rect = .Slides(1).Shapes _

        .AddShape(msoShapeRectangle, 50, 50, 100, 200)

    rect.Fill.ForeColor.RGB = .ExtraColors(1)

End With

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


Design.SlideMaster Property (PowerPoint)

 Copy code hover
[image]

Design.SlideMaster Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Master object that represents the slide master. Read-only.

Syntax

expression .SlideMaster

expression A variable that represents a Design object.

Return Value

Master

Example

This example sets the background pattern for the slide master for the active presentation.

VBA Copy code Copy code
Application.ActivePresentation.SlideMaster.Background.Fill _

    .PresetTextured msoTextureGreenMarble

See also

Concepts

Design Object

Other resources

Design Object Members


PlotArea.Height Property (PowerPoint)

 Copy code hover
[image]

PlotArea.Height Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the height, in points, of the object. Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Height

expression A variable that represents a PlotArea object.

See also

Concepts

PlotArea Object

Other resources

PlotArea Object Members


Application.Windows Property (PowerPoint)

 Copy code hover
[image]

Application.Windows Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a DocumentWindows collection that represents all open document windows. Read-only.

Syntax

expression .Windows

expression A variable that represents an Application object.

Return Value

DocumentWindows

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = .Count To 2 Step -1

        .Item(i).Close

    Next

End With

See also

Concepts

Application Object

Other resources

Application Object Members


Column.Application Property (PowerPoint)

 Copy code hover
[image]

Column.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a Column object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

Column Object

Other resources

Column Object Members


Series.BarShape Property (PowerPoint)

 Copy code hover
[image]

Series.BarShape Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the shape used for a single series in a 3-D bar or column chart. Read/write XlBarShape.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .BarShape

expression A variable that represents a Series object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the shape used for the first series of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).BarShape = xlConeToPoint

    End If

End With

See also

Concepts

Series Object

Other resources

Series Object Members


Application.Name Property (PowerPoint)

 Copy code hover
[image]

Application.Name Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the string "Microsoft PowerPoint." Read-only.

Syntax

expression .Name

expression A variable that represents an Application object.

Return Value

String

Remarks

You can use the object's name in conjunction with the Item method to return a reference to the object if the Item method for the collection that contains the object takes a Variant argument. For example, if the value of the Name property for a shape is Rectangle 2, then .Shapes("Rectangle 2") will return a reference to that shape.

See also

Concepts

Application Object

Other resources

Application Object Members


AddIns.Application Property (PowerPoint)

 Copy code hover
[image]

AddIns.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents an AddIns object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

AddIns Object

Other resources

AddIns Object Members


PublishObject.RangeStart Property (PowerPoint)

 Copy code hover
[image]

PublishObject.RangeStart Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets the number of the first slide in a range of slides you are publishing as a Web presentation. Read/write.

Syntax

expression .RangeStart

expression A variable that represents a PublishObject object.

Return Value

Integer

Example

This example publishes slides three through five of the active presentation to HTML. It names the published presentation Mallard.htm.

VBA Copy code Copy code
With ActivePresentation.PublishObjects(1)

    .FileName = "C:\Test\Mallard.htm"

    .SourceType = ppPublishSlideRange

    .RangeStart = 3

    .RangeEnd = 5

    .Publish

End With

See also

Concepts

PublishObject Object

Other resources

PublishObject Object Members


ConnectorFormat.BeginConnected Property (PowerPoint)

 Copy code hover
[image]

ConnectorFormat.BeginConnected Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the beginning of the specified connector is connected to a shape. Read/write.

Syntax

expression .BeginConnected

expression A variable that represents a ConnectorFormat object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The beginning of the specified connector is not connected to a shape.
msoTrue | The beginning of the specified connector is connected to a shape.

Example

If shape three on the first slide in the active presentation is a connector whose beginning is connected to a shape, this example stores the connection site number in the variable oldBeginConnSite, stores a reference to the connected shape in the object variable oldBeginConnShape, and then disconnects the beginning of the connector from the shape.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(3)

    If .Connector Then

        With .ConnectorFormat

            If .BeginConnected Then

                oldBeginConnSite = .BeginConnectionSite

                Set oldBeginConnShape = .BeginConnectedShape

                .BeginDisconnect

            End If

        End With

    End If

End With

See also

Concepts

ConnectorFormat Object

Other resources

ConnectorFormat Object Members


DisplayUnitLabel Members (PowerPoint)

 Copy code hover
[image]

DisplayUnitLabel Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a unit label on an axis in the specified chart.

Methods

Name | Description
Delete | Deletes the object.
Select | Selects the object.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Caption | Returns or sets the display unit label text. Read/write String.
Characters | Returns a ChartCharacters object that represents a range of characters within the object text. You can use the ChartCharacters object to format characters within a text string.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Formula | Returns or sets the object's formula in A1-style notation. Read/write.
FormulaLocal | Returns or sets the formula for the object, using A1-style references in the language of the user. Read/write String.
FormulaR1C1 | Returns or sets the formula for the object, using R1C1-style notation in the language of the macro. Read/write String.
FormulaR1C1Local | Returns or sets the formula for the object, using R1C1-style notation in the language of the user. Read/write String.
Height | Returns the height, in points, of the object. Read-only.
HorizontalAlignment | Returns or sets the horizontal alignment for the specified object. Read/write Variant.
Left | Returns or sets the distance, in points, from the left edge of the object to the left edge of the chart area. Read/write Double.
Name | Returns the name of the object. Read-only String.
Orientation | Returns or sets the text orientation. Read/write Long.
Parent | Returns the parent for the specified object. Read-only Object.
Position | Returns or sets the position of the unit label on an axis in the chart. Read/write XlChartElementPosition.
ReadingOrder | Returns or sets an XlReadingOrder constant that represents the reading order for the specified object. Read/write Long.
Shadow | Returns or sets a value that indicates whether the object has a shadow. Read/write Boolean.
Text | Returns or sets the text for the specified object. Read/write String.
Top | Returns or sets the distance, in points, from the top edge of the object to the top of the first row (on a worksheet) or the top of the chart area (on a chart). Read/write Double.
VerticalAlignment | Returns or sets the vertical alignment of the specified object. Read/write Variant.
Width | Returns the width, in points, of the object. Read-only.


AutoCorrect Object (PowerPoint)

 Copy code hover
[image]

AutoCorrect Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the AutoCorrect functionality in Microsoft PowerPoint.

Example

Use the AutoCorrect property to return an AutoCorrect object. The following example disables displaying the AutoCorrect options buttons.

VBA Copy code Copy code
Sub HideAutoCorrectOpButton()

    With Application.AutoCorrect

        .DisplayAutoCorrectOptions = msoFalse

        .DisplayAutoLayoutOptions = msoFalse

    End With

End Sub

See also

Concepts

PowerPoint Object Model Reference

Other resources

AutoCorrect Object Members


CalloutFormat.Creator Property (PowerPoint)

 Copy code hover
[image]

CalloutFormat.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.

Syntax

expression .Creator

expression A variable that represents a CalloutFormat object.

Return Value

Long

Remarks

The Creator property is designed to be used in Microsoft Office applications for the Macintosh.

Example

This example displays a message about the creator of myObject.

VBA Copy code Copy code
Set myObject = Application.ActivePresentation.Slides(1).Shapes(1)

If myObject.Creator = &h50575054 Then

    MsgBox "This is a PowerPoint object"

Else

    MsgBox "This is not a PowerPoint object"

End If

See also

Concepts

CalloutFormat Object

Other resources

CalloutFormat Object Members


Series.AxisGroup Property (PowerPoint)

 Copy code hover
[image]

Series.AxisGroup Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the type of axis group. Read/write XlAxisGroup.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .AxisGroup

expression A variable that represents a Series object.

See also

Concepts

Series Object

Other resources

Series Object Members


FillFormat.TextureName Property (PowerPoint)

 Copy code hover
[image]

FillFormat.TextureName Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the name of the custom texture file for the specified fill. Read-only.

Syntax

expression .TextureName

expression A variable that represents a FillFormat object.

Return Value

String

Remarks

This property is read-only. Use the UserTextured method to set the texture file for the fill.

Example

This example adds an oval to myDocument. If shape one on myDocument has a user-defined textured fill, the new oval will have the same fill as shape one. If shape one has any other type of fill, the new oval will have a green marble fill.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    Set newFill = .AddShape(msoShapeOval, 0, 0, 200, 90).Fill

    With .Item(1).Fill

        If .Type = msoFillTextured And _

                .TextureType = msoTextureUserDefined Then

            newFill.UserTextured .TextureName

        Else

            newFill.PresetTextured msoTextureGreenMarble

        End If

    End With

End With

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


TextRange.Copy Method (PowerPoint)

 Copy code hover
[image]

TextRange.Copy Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Copies the specified object to the Clipboard.

Syntax

expression .Copy

expression A variable that represents a TextRange object.

Remarks

Use the Paste method to paste the contents of the Clipboard.

Example

This example copies the text in shape one on slide one in the active presentation to the Clipboard.

VBA Copy code Copy code
ActivePresentation.Slides(1).Shapes(1).TextFrame.TextRange.Copy

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


Application.ProtectedViewWindowDeactivate Event (PowerPoint)

 Copy code hover
[image]

Application.ProtectedViewWindowDeactivate Event (PowerPoint)
See also Send feedback

Published: July 16, 2012

Occurs when a protected view window is deactivated.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .ProtectedViewWindowDeactivate(ProtViewWindow, )

expression A variable that represents an Application object.

Parameters

Name | Required/Optional | Data Type | Description
ProtViewWindow | Required | ProtectedViewWindow | The deactivated protected view window.

Return Value

Nothing

See also

Concepts

Application Object

Other resources

Application Object Members


Hyperlink Object (PowerPoint)

 Copy code hover
[image]

Hyperlink Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a hyperlink associated with a non-placeholder shape or text.

Remarks

You can use a hyperlink to jump to an Internet or intranet site, to another file, or to a slide within the active presentation. The Hyperlink object is a member of the Hyperlinks collection. The Hyperlinks collection contains all the hyperlinks on a slide or a master.

Example

Use the Hyperlink property to return a hyperlink for a shape. A shape can have two different hyperlinks assigned to it: one that is followed when the user clicks the shape during a slide show, and another that is followed when the user passes the mouse pointer over the shape during a slide show. For the hyperlink to be active during a slide show, the Action property must be set to ppActionHyperlink. The following example sets the mouse-click action for shape three on slide one in the active presentation to an Internet link.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(3) _

        .ActionSettings(ppMouseClick)

    .Action = ppActionHyperlink

    .Hyperlink.Address = "http://www.microsoft.com"

End With

A slide can contain more than one hyperlink. Each non-placeholder shape can have a hyperlink; the text within a shape can have its own hyperlink; and each individual character can have its own hyperlink. Use Hyperlinks(index), where index is the hyperlink number, to return a single Hyperlink object. The following example adds the shape three mouse-click hyperlink to the Favorites folder.

VBA Copy code Copy code
ActivePresentation.Slides(1).Shapes(3) _

    .ActionSettings(ppMouseClick).Hyperlink.AddToFavorites
Note Note

When you use this method to add a hyperlink to the Internet Explorer Favorites folder, an icon is added to the Favorites menu without a corresponding name. You must add the name from within Internet Explorer.

See also

Concepts

PowerPoint Object Model Reference

Other resources

Hyperlink Object Members


Column.Delete Method (PowerPoint)

 Copy code hover
[image]

Column.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the specified Column object.

Syntax

expression .Delete

expression A variable that represents a Column object.

Remarks

Attempting to delete the only existing column in a table will result in a run-time error.

See also

Concepts

Column Object

Other resources

Column Object Members


Chart.SetElement Method (PowerPoint)

 Copy code hover
[image]

Chart.SetElement Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets chart elements on a chart. Read/write MsoChartElementType.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .SetElement(Element)

expression A variable that represents a Chart object.

Parameters

Name | Required/Optional | Data Type | Description
Element | Required | MsoChartElementType | One of the enumeration values that specifies the chart element type.

Remarks

For charts, the following commands in the Layout tab correspond to the SetElement method:

  • Everything in the Labels group.

  • Everything in the Axes group.

  • Everything in the Analysis group.

  • PlotArea, Chart Wall, and Chart Floor buttons.

MsoChartElementType is an enumeration of constants that refer to all of the above commands.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets chart elements by using the various constant values to an active chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart

            ' Select the major gridlines on the value axis.

            .Axes(xlValue).MajorGridlines.Select

            .SetElement msoElementChartTitleCenteredOverlay

            .SetElement msoElementPrimaryCategoryGridLinesMinor

            ' Select the walls.

            .Walls.Select

            .SetElement msoElementChartFloorShow

        End With

    End If

End With

See also

Concepts

Chart Object

Other resources

Chart Object Members


SoundEffect.Type Property (PowerPoint)

 Copy code hover
[image]

SoundEffect.Type Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the type of sound effect. Read/write.

Syntax

expression .Type

expression A variable that represents a SoundEffect object.

Return Value

PpSoundEffectType

Remarks

The value of the Type property can be one of these PpSoundEffectType constants.

ppSoundEffectsMixed

ppSoundFile

ppSoundNone

ppSoundStopPrevious

See also

Concepts

SoundEffect Object

Other resources

SoundEffect Object Members


ResampleMediaTask.ContainerType Property (PowerPoint)

 Copy code hover
[image]

ResampleMediaTask.ContainerType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the format type of the container of the sample. Read-only.

Syntax

expression .ContainerType

expression A variable that represents a ResampleMediaTask object.

Return Value

String

See also

Concepts

ResampleMediaTask Object

Other resources

ResampleMediaTask Object Members


Columns.Add Method (PowerPoint)

 Copy code hover
[image]

Columns.Add Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Adds a new column to an existing table. Returns a Column object that represents the new table column.

Syntax

expression .Add(BeforeColumn)

expression A variable that represents a Columns object.

Parameters

Name | Required/Optional | Data Type | Description
BeforeColumn | Optional | Long | The index number that specifies the table column before which the new column will be inserted.

Return Value

Column

Remarks

The value of the BeforeColumn parameter must be between 1 and the number of columns in the table, inclusive. The default value is -1, which means that if you omit the BeforeColumn parameter, the new column is added as the last column in the table.

See also

Concepts

Columns Object

Other resources

Columns Object Members


Hyperlinks.Count Property (PowerPoint)

 Copy code hover
[image]

Hyperlinks.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a Hyperlinks object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

Hyperlinks Object

Other resources

Hyperlinks Object Members


Application.IsSandboxed Property (PowerPoint)

 Copy code hover
[image]

Application.IsSandboxed Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns True if the specified presentation is open in a Protected View window. Read-only.

Syntax

expression .IsSandboxed

expression A variable that represents an Application object.

Remarks

Use the IsSandboxed property to determine whether a presentation is open in a Protected View window.

See also

Concepts

Application Object

Other resources

Application Object Members


RulerLevel.Parent Property (PowerPoint)

 Copy code hover
[image]

RulerLevel.Parent Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a RulerLevel object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

RulerLevel Object

Other resources

RulerLevel Object Members


ColorEffect Object (PowerPoint)

 Copy code hover
[image]

ColorEffect Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a color effect for an animation behavior.

Example

Use the ColorEffect property of the AnimationBehavior object to return a ColorEffect object. Color effects can be changed using the ColorEffect object's From and To properties, as shown below. Color effects are initially set using the To property, and then can be changed by a specific number using the By property. The following example adds a shape to the first slide of the active presentation and sets a color effect animation behavior to change the fill color of the new shape.

VBA Copy code Copy code
Sub ChangeColorEffect()

    Dim sldFirst As Slide

    Dim shpHeart As Shape

    Dim effNew As Effect

    Dim bhvEffect As AnimationBehavior

    Set sldFirst = ActivePresentation.Slides(1)

    Set shpHeart = sldFirst.Shapes.AddShape(Type:=msoShapeHeart, _

        Left:=100, Top:=100, Width:=100, Height:=100)

    Set effNew = sldFirst.TimeLine.MainSequence.AddEffect _

        (Shape:=shpHeart, EffectID:=msoAnimEffectChangeFillColor, _

        Trigger:=msoAnimTriggerAfterPrevious)

    Set bhvEffect = effNew.Behaviors.Add(Type:=msoAnimTypeColor)

    With bhvEffect.ColorEffect

        .From.RGB = RGB(Red:=255, Green:=0, Blue:=0)

        .To.RGB = RGB(Red:=0, Green:=0, Blue:=255)

    End With

End Sub

See also

Concepts

PowerPoint Object Model Reference

Other resources

ColorEffect Object Members


ThemeVariant.Name Property (PowerPoint)

 Copy code hover
[image]

ThemeVariant.Name Property (PowerPoint)
Send feedback

Returns the name of the theme variation. Read-only.

Version information

Version Added: PowerPoint 2013

Syntax

expression .Name

expression A variable that represents a ThemeVariant object.

Example

This example opens a theme file, iterates through the variants in the theme, and prints the name and ID of each variation in the theme.

VBA Copy code Copy code
Sub IterateThemeVariants()

    Dim pptTheme As Theme
    Dim pptThemeVariants As ThemeVariants
    Dim pptThemeVariant As ThemeVariant
    Dim path As String

    ' Get a reference to the currently active theme.
    path = "C:\Program Files (x86)\Microsoft Office\Document Themes 15\" & _
        ActivePresentation.TemplateName & ".thmx"
    Set pptTheme = Application.OpenThemeFile(path)

    ' Get a reference to all of the variations in the theme.
    Set pptThemeVariants = pptTheme.ThemeVariants

    ' Iterate over each variation of the theme and print
    ' its name and ID.
    For Each pptThemeVariant In pptThemeVariants

        Debug.Print "Variation " & pptThemeVariant.name & " id: " & pptThemeVariant.Id

    Next pptThemeVariant

End Sub

Property value

STRING


Application.ChartDataPointTrack Property (PowerPoint)

 Copy code hover
[image]

Application.ChartDataPointTrack Property (PowerPoint)
Send feedback

Returns or sets a Boolean that specifies whether charts use cell-reference data-point tracking. Read-write.

Version information

Version Added: PowerPoint 2013

Syntax

expression .ChartDataPointTrack

expression A variable that represents a Application object.

Return Value

Boolean

Remarks

In cell-reference data-point tracking, data labels track the cell reference that contains the value of the data point, rather than the index number of the data point. Doing so helps to preserve custom formatting applied by the user, even when a chart is sorted or filtered. Setting ChartDataPointTrack to True specifies that charts use cell-reference data-point tracking.

Property value

BOOL


How to: Use ActiveX Controls on Slides

 Copy code hover
[image]

How to: Use ActiveX Controls on Slides
Send feedback

You can add controls to your slides to provide a sophisticated way to exchange information with the user while a slide show is running. For example, you could use controls on slides to allow viewers of a show designed to be run in a kiosk a way to choose options and then run a custom show based on the viewer's choices.

For general information on adding and working with controls, see How to: Use ActiveX Controls on Documents and How to: Create Custom Dialog Boxes.

Keep the following points in mind when you are working with controls on slides.

  • A control on a slide is in design mode except when the slide show is running.

  • If you want a control to appear on all slides in a presentation, add it to the slide master.

  • The Me keyword in an event procedure for a control on a slide refers to the slide, not the control.

Writing event code for controls on slides is very similar to writing event code for controls on forms. The following procedure sets the background for the slide the button named "cmdChangeColor" is on when the button is clicked.

VBA Copy code Copy code
Private Sub cmdChangeColor_Click()
    With Me
        .FollowMasterBackground = Not .FollowMasterBackground
        .Background.Fill.PresetGradient _
            msoGradientHorizontal, 1, msoGradientBrass
    End With
End Sub

You may want to use controls to provide your slide show with navigation tools that are more complex than those built into Microsoft Office PowerPoint. For example, if you add two buttons named "cmdBack" and "cmdForward" to the slide master and write the following code behind them, all slides based on the master (and set to show master background graphics) will have these professional-looking navigation buttons that will be active during a slide show.

VBA Copy code Copy code
Private Sub cmdBack_Click()
    Me.Parent.SlideShowWindow.View.Previous
End Sub

Private Sub cmdForward_Click()
    Me.Parent.SlideShowWindow.View.Next
End Sub

To work with all the ActiveX controls on a slide without affecting the other shapes on the slide, you can construct a ShapeRange collection that contains only controls. You can then apply properties and methods to the entire collection or iterate through the collection to work with each control individually. The following example aligns all the controls on slide one in the active presentation and distributes them vertically.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes
    numShapes = .Count
    If numShapes > 1 Then
        numControls = 0
        ReDim ctrlArray(1 To numShapes)
        For i = 1 To numShapes
            If .Item(i).Type = msoOLEControlObject Then
                numControls = numControls + 1
                ctrlArray(numControls) = .Item(i).Name
            End If
        Next
        If numControls > 1 Then
            ReDim Preserve ctrlArray(1 To numControls)
            Set ctrlRange = .Range(ctrlArray)
            ctrlRange.Distribute msoDistributeVertically, True
            ctrlRange.Align msoAlignLefts, True
        End If
    End If
End With


TextFrame2.Parent Property (PowerPoint)

 Copy code hover
[image]

TextFrame2.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object of the specified test frame. Read-only.

Syntax

expression .Parent

expression An expression that returns a TextFrame2 object.

Return Value

Object

See also

Concepts

TextFrame2 Object

Other resources

TextFrame2 Object Members


AxisTitle.Application Property (PowerPoint)

 Copy code hover
[image]

AxisTitle.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents an AxisTitle object.

See also

Concepts

AxisTitle Object

Other resources

AxisTitle Object Members


Shape.MediaType Property (PowerPoint)

 Copy code hover
[image]

Shape.MediaType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the OLE media type. Read-only.

Syntax

expression .MediaType

expression A variable that represents a Shape object.

Return Value

PpMediaType

Remarks

The value of the MediaType property can be one of these PpMediaType constants.

ppMediaTypeMixed

ppMediaTypeMovie

ppMediaTypeOther

ppMediaTypeSound

Example

This example sets all native sound objects on slide one in the active presentation to loop until manually stopped during a slide show.

VBA Copy code Copy code
For Each so In ActivePresentation.Slides(1).Shapes

    If so.Type = msoMedia Then

        If so.MediaType = ppMediaTypeSound Then

            so.AnimationSettings.PlaySettings.LoopUntilStopped = True

        End If

    End If

Next

See also

Concepts

Shape Object

Other resources

Shape Object Members


PpFollowColors Enumeration (PowerPoint)

 Copy code hover
[image]

PpFollowColors Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the extent to which the colors in the specified object follow the slide's color scheme.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppFollowColorsMixed | -2 | The chart colors follow a mixed format of the slide's color scheme.
ppFollowColorsNone | 0 | The chart colors do not follow the slide's color scheme.
ppFollowColorsScheme | 1 | All the colors in the chart follow the slide's color scheme.
ppFollowColorsTextAndBackground | 2 | Only the text and background follow the slide's color scheme.


ShadowFormat.Blur Property (PowerPoint)

 Copy code hover
[image]

ShadowFormat.Blur Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the blur radius of the specified shadow, in points. Read/write.

Syntax

expression .Blur

expression A variable that represents a ShadowFormat object.

Return Value

Single

See also

Concepts

ShadowFormat Object

Other resources

ShadowFormat Object Members


XlCategoryLabelLevel Enumeration (PowerPoint)

 Copy code hover
[image]

XlCategoryLabelLevel Enumeration (PowerPoint)
Send feedback

Constants that represent chart category-label levels, passed to and returned by the Chart.CategoryLabelLevel property.

Version information

Version Added: PowerPoint 2013

Members

Name | Value | Description
xlCategoryLabelLevelAll | -1 | Use all category label levels within range on the chart. The default.
xlCategoryLabelLevelCustom | -2 | Indicates literal data in the category labels.
xlCategoryLabelLevelNone | -3 | Use no category labels in the chart. Defaults to automatic indexed labels.


Chart.ShowValueFieldButtons Property (PowerPoint)

 Copy code hover
[image]

Chart.ShowValueFieldButtons Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a value that indicates whether to display the value field buttons on a PivotChart. Read/write.

Syntax

expression .ShowValueFieldButtons

expression A variable that represents a Chart object.

Return Value

Boolean

Remarks

This member is part of the shared chart object model infrastructure between Microsoft Word, Microsoft Excel, and Microsoft PowerPoint and is not meant to be called directly from your code. Reading or setting this property causes a run-time error. In PowerPoint 2013, you cannot create a PivotChart, and copying or pasting a valid PivotChart from Microsoft Excel to a Microsoft PowerPoint presentation will convert the PivotChart to a Chart.

See also

Concepts

Chart Object

Other resources

Chart Object Members


ShapeRange.ConvertTextToSmartArt Method (PowerPoint)

 Copy code hover
[image]

ShapeRange.ConvertTextToSmartArt Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .ConvertTextToSmartArt(Layout)

expression A variable that represents a ShapeRange object.

Parameters

Name | Required/Optional | Data Type | Description
Layout | Required | [SMARTARTLAYOUT] |

Return Value

Long

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


ChartFont.Italic Property (PowerPoint)

 Copy code hover
[image]

ChartFont.Italic Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if the font style is italic. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Italic

expression A variable that represents a ChartFont object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the font to italic for all characters in the title of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.Title.Characters.Font.Italic = True

    End If

End With

See also

Concepts

ChartFont Object

Other resources

ChartFont Object Members


ProtectedViewWindows Properties (PowerPoint)

 Copy code hover
[image]

ProtectedViewWindows Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object. Read-only.


Application.Version Property (PowerPoint)

 Copy code hover
[image]

Application.Version Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the Microsoft PowerPoint version number. Read-only.

Syntax

expression .Version

expression A variable that represents a Application object.

Return Value

String

Example

This example displays a message box that contains the PowerPoint version number and build number, and the name of the operating system.

VBA Copy code Copy code
With Application

MsgBox "Welcome to PowerPoint version " & .Version & _

    ", build " & .Build & ", running on " & .OperatingSystem & "!"

End With

See also

Concepts

Application Object

Other resources

Application Object Members


ScaleEffect.ByY Property (PowerPoint)

 Copy code hover
[image]

ScaleEffect.ByY Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns a Single that represents scaling or moving an object vertically by a specified percentage of the screen width, depending on whether it is used in conjunction with a ScaleEffect or MotionEffect object, respectively. Read/write.

Syntax

expression .ByY

expression A variable that represents a ScaleEffect object.

Return Value

Single

Remarks

Negative numbers move the object horizontally to the left. Floating point numbers (for example, 55.5) are allowed.

To scale or move an object horizontally, use the ByX property.

If both the ByX and ByY properties are set, then the object is scaled or moves both horizontally and vertically.

Do not confuse this property with the By property of the ColorEffect , RotationEffect , or PropertyEffect objects, which is used to set colors, rotations, or other properties of an animation behavior, respectively.

Example

The following example adds an animation path; then sets the horizontal and vertical movement of the shape.

VBA Copy code Copy code
Sub AddMotionPath()

    Dim effCustom As Effect

    Dim animBehavior As AnimationBehavior

    Dim shpRectangle As Shape

    'Adds rectangle and sets effect and animation

    Set shpRectangle = ActivePresentation.Slides(1).Shapes _

        .AddShape(Type:=msoShapeRectangle, Left:=300, _

        Top:=300, Width:=300, Height:=150)

    Set effCustom = ActivePresentation.Slides(1).TimeLine _

        .MainSequence.AddEffect(Shape:=shpRectangle, _

         effectId:=msoAnimEffectCustom)

    Set animBehavior = effCustom.Behaviors.Add(msoAnimTypeMotion)

    'Specifies animation motion

    With animBehavior.MotionEffect

        .ByX = 50

        .ByY = 50

    End With

End Sub

See also

Concepts

ScaleEffect Object

Other resources

ScaleEffect Object Members


ThreeDFormat.RotationZ Property (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.RotationZ Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the rotation of the effects camera for the specified ThreeDFormat object, in degrees. Read/write.

Syntax

expression .RotationZ

expression A variable that represents a ThreeDFormat object.

Return Value

Single

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


TextRange.Text Property (PowerPoint)

 Copy code hover
[image]

TextRange.Text Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a String that represents the text contained in the specified object. Read/write.

Syntax

expression .Text

expression A variable that represents a TextRange object.

Return Value

String

Example

This example sets the text and font style for the title on slide one in the active presentation.

VBA Copy code Copy code
Set myPres = Application.ActivePresentation

With myPres.Slides(1).Shapes.Title.TextFrame.TextRange

    .Text = "Welcome!"

    .Font.Italic = True

End With

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


AxisTitle Members (PowerPoint)

 Copy code hover
[image]

AxisTitle Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a chart axis title.

Methods

Name | Description
Delete | Deletes the object.
Select | Selects the object.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Caption | Returns or sets a String value that represents the axis title text.
Characters | Returns a ChartCharacters object that represents a range of characters within the object text. You can use the ChartCharacters object to format characters within a text string.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Formula | Returns or sets the object's formula in A1-style notation. Read-only.
FormulaLocal | Returns or sets the formula for the object, using A1-style references in the language of the user. Read/write.
FormulaR1C1 | Returns or sets the formula for the object by using R1C1-style notation. Read/write.
FormulaR1C1Local | Returns or sets the formula for the object, using R1C1-style notation in the language of the user. Read/write.
Height | Returns the height, in points, of the object. Read-only
HorizontalAlignment | Returns or sets the horizontal alignment for the specified object. Read/write Variant.
IncludeInLayout | True if an axis title will occupy the chart layout space when a chart layout is being determined. The default is True. Read/write Boolean.
Left | Returns or sets the distance, in points, from the left edge of the object to the left edge of the chart area. Read/write Double.
Name | Returns a String value that represents the name of the object.
Orientation | Returns or sets the text orientation. Read/write Long.
Parent | Returns the parent for the specified object. Read-only Object.
Position | Returns or sets the position of the axis title on the chart. Read/write XlChartElementPosition.
ReadingOrder | Returns or sets an XlReadingOrder constant that represents the reading order for the specified object. Read/write Long.
Shadow | Returns or sets a value that determines whether the object has a shadow. Read/write Boolean.
Text | Returns or sets the text for the specified object. Read/write String.
Top | Returns or sets the distance, in points, from the top edge of the object to the top of row 1 (on a worksheet) or the top of the chart area (on a chart). Read/write Double.
VerticalAlignment | Returns or sets the vertical alignment of the specified object. Read/write Variant.
Width | Returns a Double value that represents the width, in points, of the object. Read-only.


SeriesLines.Select Method (PowerPoint)

 Copy code hover
[image]

SeriesLines.Select Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Selects the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Select

expression A variable that represents a SeriesLines object.

See also

Concepts

SeriesLines Object

Other resources

SeriesLines Object Members


MotionEffect.Application Property (PowerPoint)

 Copy code hover
[image]

MotionEffect.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a MotionEffect object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

MotionEffect Object

Other resources

MotionEffect Object Members


SlideRange.ThemeColorScheme Property (PowerPoint)

 Copy code hover
[image]

SlideRange.ThemeColorScheme Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a ThemeColorScheme object that represents the color scheme associated with the specified range of slides. Read-only.

Syntax

expression .ThemeColorScheme

expression A variable that represents a SlideRange object.

Return Value

ThemeColorScheme

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


Trendline.Order Property (PowerPoint)

 Copy code hover
[image]

Trendline.Order Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets the trendline order (an integer greater than 1) when the trendline type is xlPolynomial. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Order

expression A variable that represents a Trendline object.

See also

Concepts

Trendline Object

Other resources

Trendline Object Members


TextFrame2.WordWrap Property (PowerPoint)

 Copy code hover
[image]

TextFrame2.WordWrap Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether lines of text break automatically to fit inside the shape. Read/write.

Syntax

expression .WordWrap

expression An expression that returns a TextFrame2 object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | Lines of text do not break to fit within the shape boundaries.
msoTrue | Lines of text break to fit within the shape boundaries.

See also

Concepts

TextFrame2 Object

Other resources

TextFrame2 Object Members


Broadcast Properties (PowerPoint)

 Copy code hover
[image]

Broadcast Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
AttendeeUrl | Provides the attendee URL that the presenter must share with remote attendees. Read-only.
Capabilities | Returns a Long that represents the capabilities of the specified broadcast. Read-only.
IsBroadcasting | Indicates whether the file is in the Broadcast Documents library. Read-only.
Parent | Returns the parent object for the specified object. Read-only.
PresenterServiceUrl | If a broadcast is in progress, returns a String that represents the URL of the presenter service hosting the broadcast. Read-only.
SessionID | If a broadcast is in progress, returns a String that specifies the ID of the session. Read-only.
State | Returns an MSOBroadcastState constant that describes the current broadcast state. Read-only.


LegendEntry Object (PowerPoint)

 Copy code hover
[image]

LegendEntry Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a legend entry in a chart legend.

Version Information

Version Added: PowerPoint 2007

Remarks

The LegendEntry object is a member of the LegendEntries collection. The LegendEntries collection contains all the LegendEntry objects in the legend.

Each legend entry has two parts:

  • The text of the entry, which is the name of the series or trendline associated with the legend entry.

  • The entry marker, which visually links the legend entry with its associated series or trendline in the chart.

The formatting properties for the entry marker and its associated series or trendline are contained in the LegendKey object.

The text of a legend entry cannot be changed. LegendEntry objects support font formatting, and they can be deleted. No pattern formatting is supported for legend entries. The position and size of entries is fixed.

There is no direct way to return the series or trendline that corresponds to the legend entry.

After legend entries have been deleted, the only way to restore them is to remove and re-create the legend that contained them by setting the HasLegend property for the chart to False and then back to True.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

Use LegendEntries(index), where index is the legend entry index number, to return a single LegendEntry object. You cannot return legend entries by name.

The index number represents the position of the legend entry in the legend. LegendEntries(1) is at the top of the legend, and LegendEntries(LegendEntries.Count) is at the bottom. The following example changes the font for the text of the legend entry at the top of the legend (this is usually the legend for series one) for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.Legend.LegendEntries(1).Font.Italic = True

    End If

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

LegendEntry Object Members


LegendEntry.Format Property (PowerPoint)

 Copy code hover
[image]

LegendEntry.Format Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Format

expression A variable that represents a LegendEntry object.

See also

Concepts

LegendEntry Object

Other resources

LegendEntry Object Members


ShapeRange.Item Method (PowerPoint)

 Copy code hover
[image]

ShapeRange.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single Shape object from the specified ShapeRange collection.

Syntax

expression .Item(Index)

expression A variable that represents a ShapeRange object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Variant | The name or index number of the single Shape object in the collection to be returned.

Return Value

Shape

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


Options Object (PowerPoint)

 Copy code hover
[image]

Options Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents application options in Microsoft PowerPoint.

Example

Use the Options property to return an Options object. The following example sets three application options for PowerPoint.

VBA Copy code Copy code
Sub TogglePasteOptionsButton()

    With Application.Options

        If .DisplayPasteOptions = False Then

            .DisplayPasteOptions = True

        End If

    End With

End Sub

See also

Concepts

PowerPoint Object Model Reference

Other resources

Options Object Members


ParagraphFormat Members (PowerPoint)

 Copy code hover
[image]

ParagraphFormat Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents the paragraph formatting of a text range.

Properties

Name | Description
Alignment | Returns or sets the alignment for each paragraph in the specified paragraph format. Read/write.
Application | Returns an Application object that represents the creator of the specified object.
BaseLineAlignment | Returns or sets the base line alignment for the specified paragraph. Read/write.
Bullet | Returns a BulletFormat object that represents bullet formatting for the specified paragraph format. Read-only.
FarEastLineBreakControl | Returns or sets the line break control option if you have an Asian language setting specified. Read/write.
HangingPunctuation | Returns or sets the hanging punctuation option if you have an Asian language setting specified. Read/write.
LineRuleAfter | Determines whether line spacing after the last line in each paragraph is set to a specific number of points or lines. Read/write.
LineRuleBefore | Determines whether line spacing before the first line in each paragraph is set to a specific number of points or lines. Read/write.
LineRuleWithin | Determines whether line spacing between base lines is set to a specific number of points or lines. Read/write.
Parent | Returns the parent object for the specified object.
SpaceAfter | Returns or sets the amount of space after the last line in each paragraph of the specified text, in points or lines. Read/write.
SpaceBefore | Returns or sets the amount of space before the first line in each paragraph of the specified text, in points or lines. Read/write.
SpaceWithin | Returns or sets the amount of space between base lines in the specified text, in points or lines. Read/write.
TextDirection | Returns or sets the text direction for the specified paragraph. Read/write.
WordWrap | Used only with Kanji characters. Read/write.


ChartGroup.SecondPlotSize Property (PowerPoint)

 Copy code hover
[image]

ChartGroup.SecondPlotSize Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the size, as a percentage of the primary pie, of the secondary section of either a pie-of-pie chart or a bar-of-pie chart. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .SecondPlotSize

expression A variable that represents a ChartGroup object.

Remarks

This property can have a value from 5 through 200.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example splits the two sections of the chart by value, combining all values under 10 in the primary pie and displaying them in the secondary section. The secondary section is 50 percent of the size of the primary pie. You must run the example on either a pie-of-pie chart or a bar-of-pie chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.ChartGroups(1)

            .SplitType = xlSplitByValue

            .SplitValue = 10

            .VaryByCategories = True

            .SecondPlotSize = 50

        End With

    End If

End With

See also

Concepts

ChartGroup Object

Other resources

ChartGroup Object Members


Walls.PictureType Property (PowerPoint)

 Copy code hover
[image]

Walls.PictureType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a value that specifies how pictures are displayed on the walls and faces of a 3-D chart. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .PictureType

expression A variable that represents a Walls object.

Remarks

You can set this property to one of the following XlChartPictureType constants: xlStack or xlStretch.

See also

Concepts

Walls Object

Other resources

Walls Object Members


LegendEntries.Creator Property (PowerPoint)

 Copy code hover
[image]

LegendEntries.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents a LegendEntries object.

See also

Concepts

LegendEntries Object

Other resources

LegendEntries Object Members


Shapes.AddMediaObjectFromEmbedTag Method (PowerPoint)

 Copy code hover
[image]

Shapes.AddMediaObjectFromEmbedTag Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Adds a media object from an embedded tag to a Shapes object.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .AddMediaObjectFromEmbedTag(EmbedTag, Left, Top, Width, Height)

expression A variable that represents a Shapes object.

Parameters

Name | Required/Optional | Data Type | Description
EmbedTag | Required | String | The embed tag.
Left | Optional | Single | The distance, in points, from the left edge of the slide to the left edge of the media object.
Top | Optional | Single | The distance, in points, from the top edge of the slide to the top edge of the media object.
Width | Optional | Single | The width, in points, of the media object.
Height | Optional | Single | The height, in points, of the media object.

Return Value

Shape

See also

Concepts

Shapes Object

Other resources

Shapes Object Members


ChartGroups Members (PowerPoint)

 Copy code hover
[image]

ChartGroups Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents one or more series plotted in a chart with the same format.

Methods

Name | Description
Item | Returns a single object from a collection.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Count | Returns the number of objects in the collection. Read-only Long.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Parent | Returns the parent for the specified object. Read-only Object.


Broadcast.AddMeetingNotes Method (PowerPoint)

 Copy code hover
[image]

Broadcast.AddMeetingNotes Method (PowerPoint)
Send feedback

Adds shared meeting notes for the specified broadcast that are accessible to attendees who use either Microsoft OneNote 2013 rich client or web app.

Version information

Version Added: PowerPoint 2013

Syntax

expression .AddMeetingNotes(notesUrl,notesWacUrl)

expression A variable that represents a Broadcast object.

Parameters

Name | Required/Optional | Data type | Description
notesUrl | Required | String | Specifies the URL where the shared meeting notes are stored, for attendees using the Microsoft OneNote 2013 rich client.
notesWacUrl | Required | String | Specifies the URL where the shared meeting notes are stored, for attendees using the Microsoft OneNote 2013 web access client.
notesUrl | Required | STRING |
notesWacUrl | Required | STRING |

Return value

VOID

Remarks

If you fail to pass a string for either of the two parameters, the AddMeetingNotes method returns an Invalid Parameter error. If for any reason the method call fails, PowerPoint 2013 returns a generic broadcast error.


DataLabels.Application Property (PowerPoint)

 Copy code hover
[image]

DataLabels.Application Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents a DataLabels object.

See also

Concepts

DataLabels Object

Other resources

DataLabels Object Members


SeriesCollection.Application Property (PowerPoint)

 Copy code hover
[image]

SeriesCollection.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents a SeriesCollection object.

See also

Concepts

SeriesCollection Object

Other resources

SeriesCollection Object Members


Series.Explosion Property (PowerPoint)

 Copy code hover
[image]

Series.Explosion Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the explosion value for a pie-chart or doughnut-chart slice. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Explosion

expression A variable that represents a Series object.

Remarks

This property returns 0 (zero) if there is no explosion (the tip of the slice is in the center of the pie).

See also

Concepts

Series Object

Other resources

Series Object Members


Shape.AnimationSettings Property (PowerPoint)

 Copy code hover
[image]

Shape.AnimationSettings Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an AnimationSettings object that represents all the special effects you can apply to the animation of the specified shape. Read-only.

Syntax

expression .AnimationSettings

expression A variable that represents a Shape object.

Return Value

AnimationSettings

Example

This example sets shape one on slide two in the active presentation to fly in from the left when the slide is built.

VBA Copy code Copy code
With ActivePresentation.Slides(2).Shapes(1).AnimationSettings

    .EntryEffect = ppEffectFlyFromLeft

    .TextLevelEffect = ppAnimateByAllLevels

End With

See also

Concepts

Shape Object

Other resources

Shape Object Members


Axis.AxisTitle Property (PowerPoint)

 Copy code hover
[image]

Axis.AxisTitle Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the title of the specified axis. Read-only AxisTitle.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .AxisTitle

expression A variable that represents an Axis object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example adds an axis label to the category axis for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.Axes(xlCategory)

            .HasTitle = True

            .AxisTitle.Text = "July Sales"

        End With

    End If

End With

See also

Concepts

Axis Object

Other resources

Axis Object Members


Comment Object (PowerPoint)

 Copy code hover
[image]

Comment Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a comment on a given slide or slide range. The Comment object is a member of the Comments collection object.

Remarks

Use the following properties to access comment data:

Author | The author's full name
AuthorIndex | The author's index in the list of comments
AuthorInitials | The author's initials
DateTime | The date and time the comment was created
Text | The text of the comment
Left , Top | The comment's screen coordinates

Example

Use Comments (index), where index is the number of the comment, or the Item method to access a single comment on a slide. This example displays the author of the first comment on the first slide. If there are no comments, it displays a message stating such.

VBA Copy code Copy code
Sub ShowComment()

    With ActivePresentation.Slides(1).Comments

        If .Count > 0 Then

            MsgBox "The first comment on this slide is by " & .Item(1).Author

        Else

            MsgBox "There are no comments on this slide."

        End If

    End With

End Sub

This example displays a message containing the author, date and time, and contents of all the messages on the first slide.

VBA Copy code Copy code
Sub SlideComments()

    Dim cmtExisting As Comment

    Dim cmtAll As Comments

    Dim strComments As String

    Set cmtAll = ActivePresentation.Slides(1).Comments

    If cmtAll.Count > 0 Then

        For Each cmtExisting In cmtAll

            strComments = strComments & cmtExisting.Author & vbTab & _

                cmtExisting.DateTime & vbTab & cmtExisting.Text & vbLf

        Next

        MsgBox "The comments in your document are as follows:" & vbLf & strComments

    Else

        MsgBox "This slide doesn't have any comments."

    End If

End Sub

See also

Concepts

PowerPoint Object Model Reference

Other resources

Comment Object Members


TextFrame.MarginBottom Property (PowerPoint)

 Copy code hover
[image]

TextFrame.MarginBottom Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the distance (in points) between the bottom of the text frame and the bottom of the inscribed rectangle of the shape that contains the text. Read/write.

Syntax

expression .MarginBottom

expression A variable that represents a TextFrame object.

Return Value

Single

Example

This example adds a rectangle to myDocument, adds text to the rectangle, and then sets the margins for the text frame.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddShape(msoShapeRectangle, _

        0, 0, 250, 140).TextFrame

    .TextRange.Text = "Here is some test text"

    .MarginBottom = 0

    .MarginLeft = 10

    .MarginRight = 0

    .MarginTop = 20

End With

See also

Concepts

TextFrame Object

Other resources

TextFrame Object Members


FullSeriesCollection.Application Property (PowerPoint)

 Copy code hover
[image]

FullSeriesCollection.Application Property (PowerPoint)
Send feedback

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2013

Syntax

expression .Application

expression A variable that represents a FullSeriesCollection object.


TextRange.Sentences Method (PowerPoint)

 Copy code hover
[image]

TextRange.Sentences Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a TextRange object that represents the specified subset of text sentences.

Syntax

expression .Sentences(Start, Length)

expression A variable that represents a TextRange object.

Parameters

Name | Required/Optional | Data Type | Description
Start | Optional | Long | The first sentence in the returned range.
Length | Optional | Long | The number of sentences to be returned.

Return Value

TextRange

Remarks

If both Start and Length are omitted, the returned range starts with the first sentence and ends with the last paragraph in the specified range.

If Start is specified but Length is omitted, the returned range contains one sentence.

If Length is specified but Start is omitted, the returned range starts with the first sentence in the specified range.

If Start is greater than the number of sentences in the specified text, the returned range starts with the last sentence in the specified range.

If Length is greater than the number of sentences from the specified starting sentence to the end of the text, the returned range contains all those sentences.

For information about counting or looping through the sentences in a text range, see the TextRange object.

Example

This example formats as bold the second sentence in the second paragraph in shape two on slide one in the active presentation.

VBA Copy code Copy code
Application.ActivePresentation.Slides(1).Shapes(2) _

    .TextFrame.TextRange.Paragraphs(2).Sentences(2).Font _

    .Bold = True

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


Presentation.Guides Property (PowerPoint)

 Copy code hover
[image]

Presentation.Guides Property (PowerPoint)
Send feedback

Returns the Guides collection associated with a custom layout. Read-only.

Version information

Version Added: PowerPoint 2013

Syntax

expression .Guides

expression A variable that represents a Presentation object.

Property value

GUIDES


Gridlines Properties (PowerPoint)

 Copy code hover
[image]

Gridlines Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Border | Returns the border of the object. Read-only ChartBorder.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Name | Returns the name of the object. Read-only String.
Parent | Returns the parent for the specified object. Read-only Object.


Presentations.CheckOut Method (PowerPoint)

 Copy code hover
[image]

Presentations.CheckOut Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Copies a specified presentation from a server to a local computer for editing. Returns a String that represents the local path and file name of the presentation checked out.

Syntax

expression .CheckOut(FileName)

expression A variable that represents a Presentations object.

Parameters

Name | Required/Optional | Data Type | Description
FileName | Required | String | The server path and name of the presentation.

Return Value

Nothing

Remarks

To take advantage of the collaboration features built into Microsoft PowerPoint, presentations must be stored on a Microsoft Office SharePoint Portal Server.

Example

This example verifies that a presentation is not checked out by another user and that it can be checked out. If the presentation can be checked out, it copies the presentation to the local computer for editing.

VBA Copy code Copy code
Sub CheckOutPresentation(strPresentation As String)

    Dim strFileName As String

    With Presentations

    If .CanCheckOut(strPresentation) = True Then

        .CheckOut FileName:=strPresentation

        .Open FileName:=strFileName

    Else

        MsgBox "You are unable to check out this " & _

        "presentation at this time."

    End If

End Sub

To call the subroutine above, use the following subroutine and replace the "http://servername/workspace/report.ppt" file name for an actual file located on a server mentioned in the Remarks section above.

VBA Copy code Copy code
Sub CheckPPTOut()

    Call CheckOutPresentation(strPresentation:= _

        "http://servername/workspace/report.doc")

End Sub

See also

Concepts

Presentations Object

Other resources

Presentations Object Members


Borders.Parent Property (PowerPoint)

 Copy code hover
[image]

Borders.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a Borders object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

Borders Object

Other resources

Borders Object Members


Design.Preserved Property (PowerPoint)

 Copy code hover
[image]

Design.Preserved Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents whether a design master is preserved from changes. Read/write.

Syntax

expression .Preserved

expression A variable that represents a Design object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The design master is not preserved and can be edited.
msoTrue | The design master is preserved and cannot be edited.

Example

The following line of code locks and preserves the first design master.

VBA Copy code Copy code
Sub PreserveMaster

    ActivePresentation.Designs(1).Preserved = msoTrue

End Sub

See also

Concepts

Design Object

Other resources

Design Object Members


Presentation Properties (PowerPoint)

 Copy code hover
[image]

Presentation Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Broadcast | Returns the Broadcast object of the current Presentation object. Read-only.
BuiltInDocumentProperties | Returns a DocumentProperties collection that represents all the built-in document properties for the specified presentation. Read-only.
ChartDataPointTrack | Returns or sets a Boolean that specifies whether charts use cell-reference data-point tracking. Read-write.
Coauthoring | Returns a Coauthoring object in the current Presentation object. Read-only.
ColorSchemes | Returns a ColorSchemes collection that represents the color schemes in the specified presentation. Read-only.
CommandBars | Returns a CommandBars collection that represents the merged command bar set from the host container application and Microsoft PowerPoint. This property returns a valid object only when the container is a DocObject server, like Microsoft Binder, and PowerPoint is acting as an OLE server. Read-only.
Container | Returns the object that contains the specified embedded presentation. Read-only.
ContentTypeProperties | Returns the Microsoft Office MetaProperties collection that describes the metadata stored in the presentation. Read-only.
CreateVideoStatus | Returns the status of creating a video in the current Presentation. Read-only.
CustomDocumentProperties | Returns a DocumentProperties collection that represents all the custom document properties for the specified presentation. Read-only.
CustomerData | Returns a CustomerData object. Read-only.
CustomXMLParts | Returns a CustomXMLParts object that represents the collection of custom XML parts associated with the specified Presentation object. Read-only.
DefaultLanguageID | Returns or sets the default language of a presentation. Read/write.
DefaultShape | Returns a Shape object that represents the default shape for the presentation. Read-only.
Designs | Returns a Designs object that represents a collection of designs.
DisplayComments | Determines whether comments are displayed in the specified presentation. Read/write.
DocumentInspectors | Returns the Microsoft Office DocumentInspectors collection. Read-only.
DocumentLibraryVersions | Returns a DocumentLibraryVersions collection that represents the collection of versions of a shared presentation that has versioning enabled and that is stored in a document library on a server.
EncryptionProvider | Returns a String that specifies the name of the algorithm encryption provider that Microsoft PowerPoint 2013 uses when encrypting documents. Read/write.
EnvelopeVisible | Determines whether the e-mail message header is visible in the document window. Read/write.
ExtraColors | Returns an ExtraColors object that represents the extra colors available in the specified presentation. Read-only.
FarEastLineBreakLanguage | Returns or sets the language used to determine which line break level is used when the line break control option is turned on. Read/write.
FarEastLineBreakLevel | Returns or sets the line break based upon Asian character level. Read/write.
Final | Determines whether the presentation is marked as final (read-only). Read/write.
Fonts | Returns a Fonts collection that represents all fonts used in the specified presentation. Read-only.
FullName | Returns the name of the specified add-in or saved presentation, including the path, the current file system separator, and the file name extension. Read-only String.
GridDistance | Sets or returns a Single that represents the distance between gridlines. Read/write.
Guides | Returns the Guides collection associated with a custom layout. Read-only.
HandoutMaster | Returns a Master object that represents the handout master. Read-only.
HasHandoutMaster | Indicates whether the presentation has media that resides on a handout master. Read-only
HasNotesMaster | Indicates whether the presentation has media that resides on a notes master. Read-only.
HasTitleMaster | MsoTrue if the specified presentation has a title master. Read-only.
HasVBProject | Returns whether the active presentation contains a Microsoft Visual Basic for Applications (VBA) project. Read-only.
InMergeMode | Indicates whether the document window is in merge mode. Read-only
LayoutDirection | Returns or sets the layout direction for the user interface. Read/write.
Name | The name of the presentation includes the file name extension (for file types that are registered) but doesn't include its path. You cannot use this property to set the name. Use the SaveAs method to save the presentation under a different name if you need to change the name. Read-only.
NoLineBreakAfter | Returns or sets the characters that cannot end a line. Read/write.
NoLineBreakBefore | Returns or sets the characters that cannot begin a line. Read/write.
NotesMaster | Returns a Master object that represents the notes master. Read-only.
PageSetup | Returns a PageSetup object whose properties control slide setup attributes for the specified presentation. Read-only.
Parent | Returns the parent object for the specified object.
Password | Returns or sets the password that must be supplied to open the specified presentation. Read/write.
PasswordEncryptionAlgorithm | Returns the algorithm Microsoft PowerPoint uses for encrypting documents with passwords. Read-only.
PasswordEncryptionFileProperties | Returns whether Microsoft PowerPoint encrypts file properties for password-protected documents. Read-only.
PasswordEncryptionKeyLength | Returns the key length of the algorithm Microsoft PowerPoint uses when it encrypts documents with passwords. Read-only.
PasswordEncryptionProvider | Returns the name of the algorithm encryption provider that Microsoft PowerPoint uses when it encrypts documents with passwords. Read-only.
Path | Returns a String that represents the path to the specified Presentation object. Read-only.
Permission |
PrintOptions | Returns a PrintOptions object that represents print options that are saved with the specified presentation. Read-only.
ReadOnly | Returns whether the specified presentation is read-only. Read-only.
RemovePersonalInformation | Determines whether Microsoft PowerPoint should remove all user information from comments and revisions upon saving a presentation. Read/write.
Research | Returns a Research object that provides access to the research service feature of Microsoft PowerPoint. Read-only.
Saved | Determines whether changes have been made to a presentation since it was last saved. Read/write.
SectionProperties | Returns a SectionProperties object. Read-only.
ServerPolicy | Returns a Microsoft Office ServerPolicy object. Read-only.
SharedWorkspace | Returns a SharedWorkspace object that represents the Document Workspace in which a specified presentation is located. Read-only.
Signatures | Returns a SignatureSet object that represents a collection of digital signatures. Read-only.
SlideMaster | Returns a Master object that represents the slide master.
Slides | Returns a Slides collection that represents all slides in the specified presentation. Read-only.
SlideShowSettings | Returns a SlideShowSettings object that represents the slide show settings for the specified presentation. Read-only.
SlideShowWindow | Returns a SlideShowWindow object that represents the slide show window in which the specified presentation is running. Read-only.
SnapToGrid | Determines whether to snap shapes to the gridlines in the specified presentation. Read/write.
Sync | Returns a Sync object that enables you to manage the synchronization of the local and server copies of a shared presentation stored in a Microsoft SharePoint Server shared workspace. Read-only.
Tags | Returns a Tags object that represents the tags for the specified object. Read-only.
TemplateName | Returns the name of the design template associated with the specified presentation. Read-only.
TitleMaster | Returns a Master object that represents the title master for the specified presentation.
VBASigned | Determines whether the Visual Basic for Applications (VBA) project for the specified document has been digitally signed. Read-only.
VBProject | Returns a VBProject object that represents the individual Visual Basic project for the presentation. Read-only.
Windows | Returns a DocumentWindows collection that represents all document windows associated with the specified presentation. Read-only.
WritePassword | Sets or returns the password for saving changes to the specified document. Read/write.


PpCheckInVersionType Enumeration (PowerPoint)

 Copy code hover
[image]

PpCheckInVersionType Enumeration (PowerPoint)
Send feedback

Published: July 12, 2012

Constants that specify the type of version of the Microsoft PowerPoint file to be checked in, passed to the CheckInWithVersion method of the Presentation object.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppCheckInMajorVersion | 1 | Major version
ppCheckInMinorVersion | 0 | Minor version
ppCheckInOverwriteVersion | 2 | Overwrite current version


Presentations.Open Method (PowerPoint)

 Copy code hover
[image]

Presentations.Open Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Opens the specified presentation. Returns a Presentation object that represents the opened presentation.

Syntax

expression .Open(FileName, ReadOnly, Untitled, WithWindow)

expression A variable that represents an Presentations object.

Parameters

Name | Required/Optional | Data Type | Description
FileName | Required | String | The name of the file to open.
ReadOnly | Optional | MsoTriState | Specifies whether the file is opened with read/write or read-only status.
Untitled | Optional | MsoTriState | Specifies whether the file has a title.
WithWindow | Optional | MsoTriState | Specifies whether the file is visible.

Return Value

Presentation

Remarks

With the proper file converters installed, Microsoft Office PowerPoint 2003 and earlier versions open files with the following MS-DOS filename extensions: .ch3, .cht, .doc, .htm, .html, .mcw, .pot, .ppa, .pps, .ppt, .pre, .rtf, .sh3, .shw, .txt, .wk1, .wk3, .wk4, .wpd, .wpf, .wps, and .xls. Microsoft PowerPoint 2013 also opens files with the following filename extensions: .docm, .docx, .mhtml, .potm, .potx, .ppam, .pptm, .pptx, .ppsm, .ppsx, .thmx, .xlsm, and .xlsx.

The ReadOnly parameter value can be one of these MsoTriState constants.

Constant | Description
msoFalse | The default. Opens the file with read/write status.
msoTrue | Opens the file with read-only status.

The Untitled parameter value can be one of these MsoTriState constants.

Constant | Description
msoFalse | The default. The file name automatically becomes the title of the opened presentation.
msoTrue | Opens the file without a title. This is equivalent to creating a copy of the file.

The WithWindow parameter value can be one of these MsoTriState constants.

Constant | Description
msoFalse | Hides the opened presentation.
msoTrue | The default. Opens the file in a visible window.

Example

This example opens a presentation with read-only status.

VBA Copy code Copy code
Presentations.Open FileName:="C:\My Documents\pres1.pptx", ReadOnly:=msoTrue

See also

Concepts

Presentations Object

Other resources

Presentations Object Members


ConnectorFormat.BeginConnectionSite Property (PowerPoint)

 Copy code hover
[image]

ConnectorFormat.BeginConnectionSite Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an integer that specifies the connection site that the beginning of a connector is connected to. Read-only.

Syntax

expression .BeginConnectionSite

expression A variable that represents a ConnectorFormat object.

Return Value

Long

Remarks

If the beginning of the specified connector isn't attached to a shape, this property generates an error.

Example

This example assumes that the first slide in the active presentation already contains two shapes attached by a connector named "Conn1To2." The code adds a rectangle and a connector to the first slide. The beginning of the new connector will be attached to the same connection site as the beginning of the connector named "Conn1To2," and the end of the new connector will be attached to connection site one on the new rectangle.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    Set r3 = .AddShape(msoShapeRectangle, 450, 190, 200, 100)

    .AddConnector(msoConnectorCurve, _

        0, 0, 10, 10).Name = "Conn1To3"

    With .Item("Conn1To2").ConnectorFormat

        beginConnSite1 = .BeginConnectionSite

        Set beginConnShape1 = .BeginConnectedShape

    End With

    With .Item("Conn1To3").ConnectorFormat

        .BeginConnect beginConnShape1, beginConnSite1

        .EndConnect r3, 1

    End With

End With

See also

Concepts

ConnectorFormat Object

Other resources

ConnectorFormat Object Members


ChartCharacters.Text Property (PowerPoint)

 Copy code hover
[image]

ChartCharacters.Text Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the text for the specified object. Read/write String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Text

expression A variable that represents a ChartCharacters object.

See also

Concepts

ChartCharacters Object

Other resources

ChartCharacters Object Members


CustomLayout.ThemeColorScheme Property (PowerPoint)

 Copy code hover
[image]

CustomLayout.ThemeColorScheme Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a ThemeColorScheme object that represents the color scheme of the theme associated with the specified custom layout. Read-only.

Syntax

expression .ThemeColorScheme

expression A variable that represents a CustomLayout object.

Return Value

ThemeColorScheme

See also

Concepts

CustomLayout Object

Other resources

CustomLayout Object Members


Presentation.EndReview Method (PowerPoint)

 Copy code hover
[image]

Presentation.EndReview Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Ends the review cycle.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .EndReview

expression A variable that represents a Presentation object.

Return Value

None

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


ChartFont.Color Property (PowerPoint)

 Copy code hover
[image]

ChartFont.Color Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the primary color of the object. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Color

expression A variable that represents a ChartFont object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the color of the tick-mark labels on the value axis for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        Chart.Axes(xlValue).TickLabels.Font.Color = _

            RGB(0, 255, 0)

    End If

End With

See also

Concepts

ChartFont Object

Other resources

ChartFont Object Members


DataLabels.ShowPercentage Property (PowerPoint)

 Copy code hover
[image]

DataLabels.ShowPercentage Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True to display the percentage value for the data labels on a chart. False to hide the value. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ShowPercentage

expression A variable that represents a DataLabels object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example enables the percentage value to be shown for the data labels of the first series on the first chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).DataLabels. _

            ShowPercentage = True

    End If

End With

See also

Concepts

DataLabels Object

Other resources

DataLabels Object Members


HeaderFooter.Text Property (PowerPoint)

 Copy code hover
[image]

HeaderFooter.Text Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a String that represents the text contained in the specified object. Read/write.

Syntax

expression .Text

expression A variable that represents a HeaderFooter object.

Return Value

String

See also

Concepts

HeaderFooter Object

Other resources

HeaderFooter Object Members


AxisTitle.Text Property (PowerPoint)

 Copy code hover
[image]

AxisTitle.Text Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the text for the specified object. Read/write String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Text

expression A variable that represents an AxisTitle object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the axis title text for the category axis of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.Axes(xlCategory)

            .HasTitle = True

            .AxisTitle.Text = "Month"

        End With

    End If

End With

See also

Concepts

AxisTitle Object

Other resources

AxisTitle Object Members


Point.PictureType Property (PowerPoint)

 Copy code hover
[image]

Point.PictureType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a value that specifies how pictures are displayed on a column or bar picture chart. Read/write XlChartPictureType.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .PictureType

expression A variable that represents a Point object.

See also

Concepts

Point Object

Other resources

Point Object Members


Chart.GetChartElement Method (PowerPoint)

 Copy code hover
[image]

Chart.GetChartElement Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns information about the chart element at the specified x-coordinate and y-coordinate.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .GetChartElement(x, y, ElementID, Arg1, Arg2)

expression A variable that represents a Chart object.

Parameters

Name | Required/Optional | Data Type | Description
x | Required | Long | The x-coordinate of the chart element.
y | Required | Long | The y-coordinate of the chart element.
ElementID | Required | Long | When the method returns, this argument contains the XlChartItem value of the chart element at the specified coordinates. For more information, see the Remarks section.
Arg1 | Required | Long | When the method returns, this argument contains information related to the chart element. For more information, see the Remarks section.
Arg2 | Required | Long | When the method returns, this argument contains information related to the chart element. For more information, see the Remarks section.

Remarks

This method is unusual in that you specify values for only the first two arguments. Microsoft Word fills in the other arguments, and your code should examine those values when the method returns.

The value of ElementID after the method returns determines whether Arg1 and Arg2 contain any information, as shown in the following table.

ElementID Constant | Constant Value | Arg1 | Arg2
xlAxis | 21 | AxisIndex | AxisType
xlAxisTitle | 17 | AxisIndex | AxisType
xlDisplayUnitLabel | 30 | AxisIndex | AxisType
xlMajorGridlines | 15 | AxisIndex | AxisType
xlMinorGridlines | 16 | AxisIndex | AxisType
xlPivotChartDropZone | 32 | DropZoneType | None
xlPivotChartFieldButton | 31 | DropZoneType | None
xlDownBars | 20 | GroupIndex | None
xlDropLines | 26 | GroupIndex | None
xlHiLoLines | 25 | GroupIndex | None
xlRadarAxisLabels | 27 | GroupIndex | None
xlSeriesLines | 22 | GroupIndex | None
xlUpBars | 18 | GroupIndex | None
xlChartArea | 2 | None | None
xlChartTitle | 4 | None | None
xlCorners | 6 | None | None
xlDataTable | 7 | None | None
xlFloor | 23 | None | None
xlLeaderLines | 29 | None | None
xlLegend | 24 | None | None
xlNothing | 28 | None | None
xlPlotArea | 19 | None | None
xlWalls | 5 | None | None
xlDataLabel | 7 | SeriesIndex | PointIndex
xlErrorBars | 9 | SeriesIndex | None
xlLegendEntry | 12 | SeriesIndex | None
xlLegendKey | 13 | SeriesIndex | None
xlSeries | 3 | SeriesIndex | PointIndex
xlShape | 14 | ShapeIndex | None
xlTrendline | 8 | SeriesIndex | TrendLineIndex
xlXErrorBars | 10 | SeriesIndex | None
xlYErrorBars | 11 | SeriesIndex | None

The following table describes the meaning of Arg1 and Arg2 after the method returns.

Argument | Description
AxisIndex | Specifies whether the axis is primary or secondary. Can be one of the following XlAxisGroup constants: xlPrimary or xlSecondary.
AxisType | Specifies the axis type. Can be one of the following XlAxisType constants: xlCategory, xlSeriesAxis, or xlValue.
DropZoneType | Specifies the drop zone type: column, data, page, or row field. Can be one of the following XlPivotFieldOrientation constants: xlColumnField, xlDataField, xlPageField, or xlRowField. The column and row field constants specify the series and category fields, respectively.
GroupIndex | Specifies the offset within the ChartGroups collection for a specific chart group.
PointIndex | Specifies the offset within the Points collection for a specific point within a series. A value of -1 indicates that all data points are selected.
SeriesIndex | Specifies the offset within the Series collection for a specific series.
ShapeIndex | Specifies the offset within the Shapes collection for a specific shape.
TrendlineIndex | Specifies the offset within the Trendlines collection for a specific trendline within a series.

See also

Concepts

Chart Object

Other resources

Chart Object Members


PlotArea.InsideHeight Property (PowerPoint)

 Copy code hover
[image]

PlotArea.InsideHeight Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the inside height, in points, of the plot area. Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .InsideHeight

expression A variable that represents a PlotArea object.

Remarks

The plot area used for this measurement does not include the axis labels. The Height property for the plot area uses the bounding rectangle that includes the axis labels.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example draws a dotted rectangle around the inside of the plot area for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart

            Set pa = .PlotArea

                With .Shapes.AddShape(msoShapeRectangle, _

                    pa.InsideLeft, pa.InsideTop, _

                    pa.InsideWidth, pa.InsideHeight)

                .Fill.Transparency = 1

                .Line.DashStyle = msoLineDashDot

            End With

        End With

    End If

End With

See also

Concepts

PlotArea Object

Other resources

PlotArea Object Members


HeadersFooters.SlideNumber Property (PowerPoint)

 Copy code hover
[image]

HeadersFooters.SlideNumber Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a HeaderFooter object that represents the slide number in the lower-right corner of a slide, or the page number in the lower-right corner of a notes page or a page of a printed handout or outline. Read-only.

Syntax

expression .SlideNumber

expression A variable that represents a HeadersFooters object.

Return Value

HeaderFooter

Example

This example hides the slide number on slide two in the active presentation if the number is currently visible, or it displays the slide number if it is currently hidden.

VBA Copy code Copy code
With Application.ActivePresentation.Slides(2) _

        .HeadersFooters.SlideNumber

    If .Visible Then

        .Visible = False

    Else

        .Visible = True

    End If

End With

See also

Concepts

HeadersFooters Object

Other resources

HeadersFooters Object Members


Point.ApplyPictToFront Property (PowerPoint)

 Copy code hover
[image]

Point.ApplyPictToFront Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if a picture is applied to the front of the point or all points in the series. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ApplyPictToFront

expression A variable that represents a Point object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example applies pictures to the front of all points in the first series of the first chart in the active document. The series must already have pictures applied to it (setting this property changes the picture orientation).

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).ApplyPictToFront = True

    End If

End With

See also

Concepts

Point Object

Other resources

Point Object Members


ColorScheme Object (PowerPoint)

 Copy code hover
[image]

ColorScheme Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a color scheme, which is a set of eight colors used for the different elements of a slide, notes page, or handout, such as the title or background. (Note that the color schemes for slides, notes pages, and handouts in a presentation can be set independently.)

Remarks

Each color is represented by an RGBColor object. The ColorScheme object is a member of the ColorSchemes collection. The ColorSchemes collection contains all the color schemes in a presentation.

The following examples describe how to do the following:

  • Return a ColorScheme object from the collection of all the color schemes in the presentation

  • Return the ColorScheme object attached to a specific slide or master

  • Return the color of a single slide element from a ColorScheme object

Example

Use ColorSchemes(index), where index is the color scheme index number, to return a single ColorScheme object. The following example deletes color scheme two from the active presentation.

VBA Copy code Copy code
ActivePresentation.ColorSchemes(2).Delete

Set the ColorScheme property of a Slide, SlideRange, or Master object to return the color scheme for one slide, a set of slides, or a master, respectively. The following example creates a color scheme based on the current slide, adds the new color scheme to the collection of standard color schemes for the presentation, and sets the color scheme for the slide master to the new color scheme. All new slides based on the master will have this color scheme.

VBA Copy code Copy code
Set newScheme = ActiveWindow.View.Slide.ColorScheme

newScheme.Colors(ppTitle).RGB = RGB(0, 150, 250)

Set newStandardScheme = _

    ActivePresentation.ColorSchemes.Add(newScheme)

ActivePresentation.SlideMaster.ColorScheme = newStandardScheme

Use the Colors method to return an RGBColor object that represents the color of a single slide-element type. You can set an RGBColor object to another RGBColor object, or you can use the RGB property to set or return the explicit red-green-blue (RGB) value for an RGBColor object. The following example sets the background color in color scheme one to red and sets the title color to the title color that's defined for color scheme two.

VBA Copy code Copy code
With ActivePresentation.ColorSchemes

    .Item(1).Colors(ppBackground).RGB = RGB(255, 0, 0)

    .Item(1).Colors(ppTitle) = .Item(2).Colors(ppTitle)

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

ColorScheme Object Members


ChartGroup.UpBars Property (PowerPoint)

 Copy code hover
[image]

ChartGroup.UpBars Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the up bars on a line chart. Read-only UpBars.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .UpBars

expression A variable that represents a ChartGroup object.

Remarks

This property applies only to line charts.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example enables up and down bars for chart group one of the first chart in the active document, and then sets their colors. You should run the example on a 2-D line chart that contains two series that cross each other at one or more data points.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.ChartGroups(1)

            .HasUpDownBars = True

            .DownBars.Interior.ColorIndex = 3

            .UpBars.Interior.ColorIndex = 5

        End With

    End If

End With

See also

Concepts

ChartGroup Object

Other resources

ChartGroup Object Members


ChartBorder.ColorIndex Property (PowerPoint)

 Copy code hover
[image]

ChartBorder.ColorIndex Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the color of the border. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ColorIndex

expression A variable that represents a ChartBorder object.

Remarks

The color is specified as an index value into the current color palette, or as one of the following XlColorIndex constants:

  • xlColorIndexAutomatic

  • xlColorIndexNone

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the color of the major gridlines for the value axis of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.Axes(xlValue)

            If .HasMajorGridlines Then

                ' Set the color to blue.

                .MajorGridlines.Border.ColorIndex = 5

            End If

        End With

    End If

End With

See also

Concepts

ChartBorder Object

Other resources

ChartBorder Object Members


CustomLayouts Members (PowerPoint)

 Copy code hover
[image]

CustomLayouts Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a set of custom layouts associated with a presentation design.

Methods

Name | Description
Add | Returns a CustomLayout object that represents a new custom layout.
Item | Returns a single object from the specified collection.
Paste | Pastes the slides on the Clipboard into a custom layout and adds the custom layout to the CustomLayouts collection.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object. Read-only.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object. Read-only.


TextFrame2.MarginRight Property (PowerPoint)

 Copy code hover
[image]

TextFrame2.MarginRight Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the distance (in points) between the right edge of the text frame and the right edge of the inscribed rectangle of the shape that contains the text. Read/write.

Syntax

expression .MarginRight

expression An expression that returns a TextFrame2 object.

Return Value

Single

Example

The following example adds a rectangle to a slide, adds text to the rectangle, and then sets the margins for the text frame.

VBA Copy code Copy code
Public Sub MarginRight_Example()

    Set pptSlide = ActivePresentation.Slides(1)

    With pptSlide.Shapes.AddShape(msoShapeRectangle, 0, 0, 250, 140).TextFrame2

        .TextRange.Text = "Here is some sample text"

        .MarginBottom = 10

        .MarginLeft = 10

        .MarginRight = 10

        .MarginTop = 10

    End With

End Sub

See also

Concepts

TextFrame2 Object

Other resources

TextFrame2 Object Members


ThemeVariants Members (PowerPoint)

 Copy code hover
[image]

ThemeVariants Members (PowerPoint)
Send feedback

A collection of ThemeVariant objects that represent variations in the theme.

Methods

Name | Description
Item | Returns a single ThemeVariant object from the collection.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent for the specified object. Read-only Object.


TimeLine.Application Property (PowerPoint)

 Copy code hover
[image]

TimeLine.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a TimeLine object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

TimeLine Object

Other resources

TimeLine Object Members


GroupShapes.Parent Property (PowerPoint)

 Copy code hover
[image]

GroupShapes.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a GroupShapes object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

GroupShapes Object

Other resources

GroupShapes Object Members


AnimationSettings.Application Property (PowerPoint)

 Copy code hover
[image]

AnimationSettings.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents an AnimationSettings object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

AnimationSettings Object

Other resources

AnimationSettings Object Members


SlideShowTransition.Application Property (PowerPoint)

 Copy code hover
[image]

SlideShowTransition.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a SlideShowTransition object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

SlideShowTransition Object

Other resources

SlideShowTransition Object Members


Series.FormulaR1C1Local Property (PowerPoint)

 Copy code hover
[image]

Series.FormulaR1C1Local Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the formula for the object, using R1C1-style notation in the language of the user. Read/write String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .FormulaR1C1Local

expression A variable that represents a Series object.

Remarks

If the cell contains a constant, this property returns that constant. If the cell is empty, the property returns an empty string. If the cell contains a formula, the property returns the formula as a string, in the same format in which it would be displayed in the formula bar (including the equal sign).

If you set the value or formula of a cell to a date, Microsoft Word verifies whether that cell is already formatted with one of the date or time number formats. If not, the number format is changed to the default short date number format.

If the range is a one- or two-dimensional range, you can set the formula to a Visual Basic array of the same dimensions. Similarly, you can put the formula into a Visual Basic array.

Setting the formula of a multiple-cell range fills all cells in the range with the formula.

See also

Concepts

Series Object

Other resources

Series Object Members


DataLabel.Shadow Property (PowerPoint)

 Copy code hover
[image]

DataLabel.Shadow Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a value that indicates whether the object has a shadow. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Shadow

expression A variable that represents a DataLabel object.

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


MediaFormat.IsEmbedded Property (PowerPoint)

 Copy code hover
[image]

MediaFormat.IsEmbedded Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns whether the media file is embedded. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .IsEmbedded

expression An expression that returns a MediaFormat object.

Return Value

Boolean

See also

Concepts

MediaFormat Object

Other resources

MediaFormat Object Members


DataTable.Font Property (PowerPoint)

 Copy code hover
[image]

DataTable.Font Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the font of the specified object. Read-only ChartFont.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Font

expression A variable that represents a DataTable object.

See also

Concepts

DataTable Object

Other resources

DataTable Object Members


ScaleEffect Object (PowerPoint)

 Copy code hover
[image]

ScaleEffect Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a scaling effect for an AnimationBehavior object.

Example

Use the ScaleEffect property of the AnimationBehavior object to return a ScaleEffect object. The following example refers to the scale effect for a given animation behavior.

VBA Copy code Copy code
ActivePresentation.Slides(1).TimeLine.MainSequence.Item.Behaviors(1).ScaleEffect

Use the ByX , ByY , FromX , FromY , ToX , and ToY properties of the ScaleEffect object to manipulate an object's scale. This example scales the first shape on the first slide starting at zero increasing in size until it reaches 100 percent of its original size. This example assumes that there is a shape on the first slide.

VBA Copy code Copy code
Sub ChangeScale()

    Dim shpFirst As Shape

    Dim effNew As Effect

    Dim aniScale As AnimationBehavior

    Set shpFirst = ActivePresentation.Slides(1).Shapes(1)

    Set effNew = ActivePresentation.Slides(1).TimeLine.MainSequence _

        .AddEffect(Shape:=shpFirst, effectId:=msoAnimEffectCustom)

    Set aniScale = effNew.Behaviors.Add(msoAnimTypeScale)

    With aniScale.ScaleEffect

        'Starting size

        .FromX = 0

        .FromY = 0

        'Size after scale effect

        .ToX = 100

        .ToY = 100

    End With

End Sub

See also

Concepts

PowerPoint Object Model Reference

Other resources

ScaleEffect Object Members


TextRange Members (PowerPoint)

 Copy code hover
[image]

TextRange Members (PowerPoint)
Send feedback

Published: July 16, 2012

Contains the text that's attached to a shape, and properties and methods for manipulating the text.

Methods

Name | Description
AddPeriods | Adds a period at the end of each paragraph in the specified text.
ChangeCase | Changes the case of the specified text.
Characters | Returns a TextRange object that represents the specified subset of text characters. For information about counting or looping through the characters in a text range, see the TextRange object.
Copy | Copies the specified object to the Clipboard.
Cut | Deletes the specified object and places it on the Clipboard.
Delete | Deletes the specified TextRange object.
Find | Finds the specified text in a text range, and returns a TextRange object that represents the first text range where the text is found. Returns Nothing if no match is found.
InsertAfter | Appends a string to the end of the specified text range. Returns a TextRange object that represents the appended text. When used without an argument, this method returns a zero-length string at the end of the specified range.
InsertBefore | Appends a string to the beginning of the specified text range. Returns a TextRange object that represents the appended text. When used without an argument, this method returns a zero-length string at the end of the specified range.
InsertDateTime | Inserts the date and time in the specified text range. Returns a TextRange object that represents the inserted text.
InsertSlideNumber | Inserts the slide number of the current slide into the specified text range. Returns a TextRange object that represents the slide number.
InsertSymbol | Returns a TextRange object that represents a symbol inserted into the specified text range.
Lines | Returns a TextRange object that represents the specified subset of text lines. For information about counting or looping through the lines in a text range, see the TextRange object.
LtrRun | Sets the direction of text in a text range to read from left to right.
Paragraphs | Returns a TextRange object that represents the specified subset of text paragraphs.
Paste | Pastes the text on the Clipboard into the specified text range, and returns a TextRange object that represents the pasted text.
PasteSpecial | Replaces the text range with the contents of the Clipboard in the format specified.
RemovePeriods | Removes the period at the end of each paragraph in the specified text.
Replace | Finds specific text in a text range, replaces the found text with a specified string, and returns a TextRange object that represents the first occurrence of the found text. Returns Nothing if no match is found.
RotatedBounds | Returns the coordinates of the vertices of the text bounding box for the specified text range.
RtlRun | Sets the direction of text in a text range to read from right to left.
Runs | Returns a TextRange object that represents the specified subset of text runs. A text run consists of a range of characters that share the same font attributes.
Select | Selects the specified object.
Sentences | Returns a TextRange object that represents the specified subset of text sentences.
TrimText | Returns a TextRange object that represents the specified text minus any trailing spaces.
Words | Returns a TextRange object that represents the specified subset of text words.

Properties

Name | Description
ActionSettings | Returns an ActionSettings object that contains information about what action occurs when the user clicks or moves the mouse over the specified shape or text range during a slide show. Read-only.
Application | Returns an Application object that represents the creator of the specified object.
BoundHeight | Returns the height (in points) of the text bounding box for the specified text frame. Read-only.
BoundLeft | Returns the distance (in points) from the left edge of the text bounding box for the specified text frame to the left edge of the slide. Read-only.
BoundTop | Returns the distance (in points) from the top of the of the text bounding box for the specified text frame to the top of the slide. Read-only.
BoundWidth | Returns the width (in points) of the text bounding box for the specified text frame. Read-only.
Count | Returns the number of objects in the specified collection. Read-only.
Font | Returns a Font object that represents character formatting. Read-only.
IndentLevel | Returns or sets the the indent level for the specified text as an integer from 1 to 5, where 1 indicates a first-level paragraph with no indentation. Read/write.
LanguageID | Returns or sets the language for the specified text range. Read/write.
Length | Returns the length of the specified text range, in characters. Read-only.
ParagraphFormat | Returns a ParagraphFormat object that represents paragraph formatting for the specified text. Read-only.
Parent | Returns the parent object for the specified object.
Start | Returns the position of the first character in the specified text range relative to the first character in the shape that contains the text. Read-only.
Text | Returns or sets a String that represents the text contained in the specified object. Read/write.


Axis.MaximumScale Property (PowerPoint)

 Copy code hover
[image]

Axis.MaximumScale Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the maximum value on the value axis. Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .MaximumScale

expression A variable that represents an Axis object.

Remarks

Setting this property sets the MaximumScaleIsAuto property to False.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the minimum and maximum values for the value axis of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.Axes(xlValue)

            .MinimumScale = 10

            .MaximumScale = 120

        End With

    End If

End With

See also

Concepts

Axis Object

Other resources

Axis Object Members


DisplayUnitLabel.Width Property (PowerPoint)

 Copy code hover
[image]

DisplayUnitLabel.Width Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the width, in points, of the object. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Width

expression A variable that represents a DisplayUnitLabel object.

Return Value

Double

See also

Concepts

DisplayUnitLabel Object

Other resources

DisplayUnitLabel Object Members


TabStops.Add Method (PowerPoint)

 Copy code hover
[image]

TabStops.Add Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Creates a tab stop and adds it to the TabStops collection.

Syntax

expression .Add(Type, Position)

expression A variable that represents a TabStops object.

Parameters

Name | Required/Optional | Data Type | Description
Type | Required | PpTabStopType | The type of the tab stop to be added.
Position | Required | Single | The position of the tab stop in the tab stops collection.

Return Value

TabStop

Remarks

The Type parameter value can be one of these PpTabStopType constants.

Constant | Description
ppTabStopCenter | Center tab stop.
ppTabStopDecimal | Decimal tab stop.
ppTabStopLeft | Left tab stop.
ppTabStopMixed | Mixed tab stop.
ppTabStopRight | Right tab stop.

See also

Concepts

TabStops Object

Other resources

TabStops Object Members


MediaBookmarks Members (PowerPoint)

 Copy code hover
[image]

MediaBookmarks Members (PowerPoint)
Send feedback

Published: July 16, 2012

A collection of MediaBookmark objects.

Methods

Name | Description
Add | Adds a new MediaBookmark at the specified time and using the specified name.
Item | Returns the specified MediaBookmark.

Properties

Name | Description
Count | Returns the number of bookmarks. Read-only.


Guide.Orientation Property (PowerPoint)

 Copy code hover
[image]

Guide.Orientation Property (PowerPoint)
Send feedback

Returns the orientation of the drawing guide (horizontal or vertical) as a constant from the PpGuideOrientation enumeration. Read-only.

Version information

Version Added: PowerPoint 2013

Syntax

expression .Orientation

expression A variable that represents a Guide object.

Property value

PPGUIDEORIENTATION


Shape.Table Property (PowerPoint)

 Copy code hover
[image]

Shape.Table Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Table object that represents a table in a shape or in a shape range. Read-only.

Syntax

expression .Table

expression A variable that represents a Shape object.

Return Value

Table

Example

This example sets the width of the first column in the table in shape five on the second slide to 80 points.

VBA Copy code Copy code
ActivePresentation.Slides(2).Shapes(5).Table.Columns(1).Width = 80

See also

Concepts

Shape Object

Other resources

Shape Object Members


Presentation.Container Property (PowerPoint)

 Copy code hover
[image]

Presentation.Container Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the object that contains the specified embedded presentation. Read-only.

Syntax

expression .Container

expression A variable that represents a Presentation object.

Return Value

Object

Remarks

If the container doesn't support OLE Automation, or if the specified presentation isn't embedded in a Microsoft Binder file, this property fails.

Example

This example hides the second section of the Microsoft Binder file that contains the embedded active presentation. The Container property of the presentation returns a Section object, and the Parent property of the Section object returns a Binder object.

VBA Copy code Copy code
Application.ActivePresentation.Container.Parent.Sections(2) _

    .Visible = False

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


LinkFormat.BreakLink Method (PowerPoint)

 Copy code hover
[image]

LinkFormat.BreakLink Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Breaks the link between the source file and the specified OLE object, picture, or linked field.

Syntax

expression .BreakLink

expression An expression that returns a LinkFormat object.

Return Value

Nothing

Example

This example shows how to update and then break the links to any shapes that are linked to OLE objects on slide one in the active presentation.

VBA Copy code Copy code
Public Sub BreakLink_Example()

    Dim pptShape As Shape

    For Each pptShape In ActivePresentation.Slides(1).Shapes

        With pptShape

            If .Type = msoLinkedOLEObject Then

                .LinkFormat.Update

                .LinkFormat.BreakLink

            End If

        End With

    Next pptShape

End Sub

See also

Concepts

LinkFormat Object

Other resources

LinkFormat Object Members


Fonts Methods (PowerPoint)

 Copy code hover
[image]

Fonts Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Item | Returns a single Font object from the specified Fonts collection.
Replace | Replaces a font in the Fonts collection.


Axes.Application Property (PowerPoint)

 Copy code hover
[image]

Axes.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents an Axes object.

See also

Concepts

Axes Object

Other resources

Axes Object Members


OLEFormat.Activate Method (PowerPoint)

 Copy code hover
[image]

OLEFormat.Activate Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Activates the specified object.

Syntax

expression .Activate

expression A variable that represents an OLEFormat object.

See also

Concepts

OLEFormat Object

Other resources

OLEFormat Object Members


Axis.CrossesAt Property (PowerPoint)

 Copy code hover
[image]

Axis.CrossesAt Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the point on the value axis where the category axis crosses it. Applies only to the value axis. Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .CrossesAt

expression A variable that represents an Axis object.

Remarks

Setting this property causes the Crosses property to change to xlAxisCrossesCustom.

You cannot use this property on radar charts. For 3-D charts, this property indicates where the plane defined by the category axes crosses the value axis.

See also

Concepts

Axis Object

Other resources

Axis Object Members


Cell Properties (PowerPoint)

 Copy code hover
[image]

Cell Properties (PowerPoint)
Send feedback

Published: July 12, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Borders | Returns a Borders collection that represents the borders and diagonal lines for the specified Cell object or CellRange collection. Read-only.
Parent | Returns the parent object for the specified object.
Selected | Returns True if the specified table cell is selected. Read-only.
Shape | Returns a Shape object that represents a shape in a table cell. Read-only.


FillFormat Members (PowerPoint)

 Copy code hover
[image]

FillFormat Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents fill formatting for a shape. A shape can have a solid, gradient, texture, pattern, picture, or semi-transparent fill.

Methods

Name | Description
Background | Specifies that the shape's fill should match the slide background. If you change the slide background after applying this method to a fill, the fill will also change.
OneColorGradient | Sets the specified fill to a one-color gradient.
Patterned | Sets the specified fill to a pattern.
PresetGradient | Sets the specified fill to a preset gradient.
PresetTextured | Sets the specified fill to a preset texture.
Solid | Sets the specified fill to a uniform color. Use this method to convert a gradient, textured, patterned, or background fill back to a solid fill.
TwoColorGradient | Sets the specified fill to a two-color gradient.
UserPicture | Fills the specified shape with one large image.
UserTextured | Fills the specified shape with small tiles of an image.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
BackColor | Returns or sets a ColorFormat object that represents the background color for the specified fill or patterned line. Read/write.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
ForeColor | Returns or sets a ColorFormat object that represents the foreground color for the fill, line, or shadow. Read/write.
GradientAngle | Returns or sets the angle of the gradient fill for the specified fill format. Read/write.
GradientColorType | Returns the gradient color type for the specified fill. Read-only.
GradientDegree | Returns a value that indicates how dark or light a one-color gradient fill is. Read-only.
GradientStops | Returns the GradientStops collection associated with the specified fill format. Read-only.
GradientStyle | Returns the gradient style for the specified fill. Read-only.
GradientVariant | Returns the gradient variant for the specified fill as an integer value from 1 to 4 for most gradient fills. Read-only.
Parent | Returns the parent object for the specified object.
Pattern | Sets or returns a value that represents the pattern applied to the specified fill. Read-only.
PictureEffects | Returns an object that represents the picture or texture fill for the specified fill format. Read-only.
PresetGradientType | Returns the preset gradient type for the specified fill. Read-only.
PresetTexture | Returns the preset texture for the specified fill. Read-only.
RotateWithObject | Returns or sets whether the fill rotates with the specified shape. Read/write.
TextureAlignment | Returns or sets the alignment (the origin of the coordinate grid) for the tiling of the texture fill. Read/write.
TextureHorizontalScale | Returns or sets the horizontal scaling factor for the texture fill. Read/write.
TextureName | Returns the name of the custom texture file for the specified fill. Read-only.
TextureOffsetX | Returns or sets the horizontal offset of the texture from the origin in points. Read/write.
TextureOffsetY | Returns or sets the vertical offset of the texture from the origin in points. Read/write.
TextureTile | Returns or sets whether the texture fill is tiled or centered. Read/write.
TextureType | Returns the texture type for the specified fill. Read-only.
TextureVerticalScale | Returns or sets the vertical scaling factor for the texture fill. Read/write.
Transparency | Returns or sets the degree of transparency of the specified fill, shadow, or line as a value between 0.0 (opaque) and 1.0 (clear). Read/write.
Type | Represent the type of fill. Read-only.
Visible | Returns or sets the visibility of the specified object or the formatting applied to the specified object. Read/write.


AnimationSettings.AnimateTextInReverse Property (PowerPoint)

 Copy code hover
[image]

AnimationSettings.AnimateTextInReverse Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the specified shape is built in reverse order. Applies only to shapes (such as shapes containing lists) that can be built in more than one step. Read/write.

Syntax

expression .AnimateTextInReverse

expression A variable that represents an AnimationSettings object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified shape is not built in reverse order.
msoTrue | The specified shape is built in reverse order.

You do not see the effects of setting this property unless the specified shape gets animated. For a shape to be animated, the TextLevelEffect property of the AnimationSettings object for the shape must be set to something other than ppAnimateLevelNone and the Animate property must be set to True.

Example

This example adds a slide after slide one in the active presentation, sets the title text, adds a three-item list to the text placeholder, and sets the list to be built in reverse order.

VBA Copy code Copy code
With ActivePresentation.Slides.Add(2, ppLayoutText).Shapes

    .Item(1).TextFrame.TextRange.Text = "Top Three Reasons"

    With .Item(2)

        .TextFrame.TextRange = "Reason 1" & Chr(13) _

            & "Reason 2" & Chr(13) & "Reason 3"

        With .AnimationSettings

            .Animate = msoTrue

            .TextLevelEffect = ppAnimateByFirstLevel

            .AnimateTextInReverse = msoTrue

        End With

    End With

End With

See also

Concepts

AnimationSettings Object

Other resources

AnimationSettings Object Members


ShapeRange.Callout Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.Callout Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a CalloutFormat object that contains callout formatting properties for the specified shape. Applies to Shape or ShapeRange objects that represent line callouts. Read-only.

Syntax

expression .Callout

expression A variable that represents a ShapeRange object.

Return Value

CalloutFormat

Example

This example adds to myDocument an oval and a callout that points to the oval. The callout text won't have a border, but it will have a vertical accent bar that separates the text from the callout line.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    .AddShape msoShapeOval, 180, 200, 280, 130

    With .AddCallout(msoCalloutTwo, 420, 170, 170, 40)

        .TextFrame.TextRange.Text = "My oval"

        With .Callout

            .Accent = True

            .Border = False

        End With

    End With

End With

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


Column Members (PowerPoint)

 Copy code hover
[image]

Column Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a table column. The Column object is a member of the Columns collection. The Columns collection includes all the columns in a table.

Methods

Name | Description
Delete | Deletes the specified Column object.
Select | Selects the specified object.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Cells | Returns a CellRange collection that represents the cells in a table column or row. Read-only.
Parent | Returns the parent object for the specified object.
Width | Returns or sets the width of the specified object, in points. Read/write.


TextRange.Select Method (PowerPoint)

 Copy code hover
[image]

TextRange.Select Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Selects the specified object.

Syntax

expression .Select

expression A variable that represents a TextRange object.

Remarks

If you try to make a selection that isn't appropriate for the view, your code will fail. For example, you can select a slide in slide sorter view but not in slide view.

Example

This example selects the first five characters in the title of slide one in the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(1).Shapes.Title.TextFrame _

    .TextRange.Characters(1, 5).Select

This example selects slide one in the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(1).Select

This example selects a table that has been added to a new slide in a new presentation. The table has three rows and three columns.

VBA Copy code Copy code
With Presentations.Add.Slides

    .Add(1, ppLayoutBlank).Shapes.AddTable(3, 3).Select

End With

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


ChartGroups.Application Property (PowerPoint)

 Copy code hover
[image]

ChartGroups.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents a ChartGroups object.

See also

Concepts

ChartGroups Object

Other resources

ChartGroups Object Members


SlideShowView.AdvanceMode Property (PowerPoint)

 Copy code hover
[image]

SlideShowView.AdvanceMode Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a value that indicates how the slide show in the specified view advances. Read-only.

Syntax

expression .AdvanceMode

expression A variable that represents a SlideShowView object.

Remarks

The value returned by the AdvanceMode property can be one of these PpSlideShowAdvanceMode constants.

ppSlideShowManualAdvance

ppSlideShowRehearseNewTimings

ppSlideShowUseSlideTimings

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


CustomLayout.Width Property (PowerPoint)

 Copy code hover
[image]

CustomLayout.Width Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the width of the specified custom layout, in points. Read-only.

Syntax

expression .Width

expression A variable that represents a CustomLayout object.

Return Value

Single

See also

Concepts

CustomLayout Object

Other resources

CustomLayout Object Members


HeadersFooters.Clear Method (PowerPoint)

 Copy code hover
[image]

HeadersFooters.Clear Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Clears the header and footer from the specified slide or slides.

Syntax

expression .Clear

expression A variable that represents a HeadersFooters object.

See also

Concepts

HeadersFooters Object

Other resources

HeadersFooters Object Members


Presentation.Windows Property (PowerPoint)

 Copy code hover
[image]

Presentation.Windows Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a DocumentWindows collection that represents all document windows associated with the specified presentation. Read-only.

Syntax

expression .Windows

expression A variable that represents a Presentation object.

Return Value

DocumentWindows

Remarks

This property doesn't return any slide show windows associated with the presentation.

If your Visual Studio solution includes the Microsoft.Office.Interop.PowerPoint reference, this property maps to the following types:

  • Microsoft.Office.Interop.PowerPoint._Presentation.Windows

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


TextFrame.Orientation Property (PowerPoint)

 Copy code hover
[image]

TextFrame.Orientation Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets text orientation. Read/write.

Syntax

expression .Orientation

expression A variable that represents a TextFrame object.

Return Value

MsoTextOrientation

Remarks

Some of these constants may not be available to you, depending on the language support (U.S. English, for example) that you've selected or installed.

The value of the Orientation property can be one of these MsoTextOrientation constants.

msoTextOrientationDownward

msoTextOrientationHorizontal

msoTextOrientationHorizontalRotatedFarEast

msoTextOrientationMixed

msoTextOrientationUpward

msoTextOrientationVertical

msoTextOrientationVerticalFarEast

Example

This example orients the text horizontally within shape three on myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes(3).TextFrame.Orientation = msoTextOrientationHorizontal

See also

Concepts

TextFrame Object

Other resources

TextFrame Object Members


Series.Has3DEffect Property (PowerPoint)

 Copy code hover
[image]

Series.Has3DEffect Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if the series has a three-dimensional appearance. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Has3DEffect

expression A variable that represents a Series object.

Remarks

This property applies only to bubble charts.

See also

Concepts

Series Object

Other resources

Series Object Members


BulletFormat.RelativeSize Property (PowerPoint)

 Copy code hover
[image]

BulletFormat.RelativeSize Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the bullet size relative to the size of the first text character in the paragraph. Read/write.

Syntax

expression .RelativeSize

expression A variable that represents a BulletFormat object.

Return Value

Single

Remarks

The RelativeSize property value can be a floating-point value from 0.25 through 4, indicating that the bullet size can be from 25 percent through 400 percent of the text-character size.

Example

This example sets the formatting for the bullet in shape two on slide one in the active presentation. The size of the bullet is 125 percent of the size of the first text character in the paragraph.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(2)

    With .TextFrame.TextRange.ParagraphFormat.Bullet

        .Visible = True

        .RelativeSize = 1.25

        .Character = 169

        With .Font

            .Name = "Symbol"

            .Color.RGB = RGB(255, 0, 0)

        End With

    End With

End With

See also

Concepts

BulletFormat Object

Other resources

BulletFormat Object Members


ProtectedViewWindow.Close Method (PowerPoint)

 Copy code hover
[image]

ProtectedViewWindow.Close Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Closes the specified window.

Syntax

expression .Close

expression A variable that represents a ProtectedViewWindow object.

See also

Concepts

ProtectedViewWindow Object

Other resources

ProtectedViewWindow Object Members


FillFormat.OneColorGradient Method (PowerPoint)

 Copy code hover
[image]

FillFormat.OneColorGradient Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets the specified fill to a one-color gradient.

Syntax

expression .OneColorGradient(Style, Variant, Degree)

expression A variable that represents an FillFormat object.

Parameters

Name | Required/Optional | Data Type | Description
Style | Required | MsoGradientStyle | The gradient style.
Variant | Required | Long | The gradient variant. Can be a value from 1 to 4, corresponding to the four variants on the Gradient tab in the Shape Fill tab. If Style is msoGradientFromTitle or msoGradientFromCenter, this argument can be either 1 or 2.
Degree | Required | Single | The gradient degree. Can be a value from 0.0 (dark) to 1.0 (light).

Remarks

The Style parameter value can be one of these MsoGradientStyle constants.

msoGradientDiagonalDown

msoGradientDiagonalUp

msoGradientFromCenter

msoGradientFromCorner

msoGradientFromTitle

msoGradientHorizontal

msoGradientMixed

msoGradientVertical

Example

This example adds a rectangle with a one-color gradient fill to myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes _

        .AddShape(msoShapeRectangle, 90, 90, 90, 80).Fill

    .ForeColor.RGB = RGB(0, 128, 128)

    .OneColorGradient msoGradientHorizontal, 1, 1

End With

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


PpResampleMediaProfile Enumeration (PowerPoint)

 Copy code hover
[image]

PpResampleMediaProfile Enumeration (PowerPoint)
Send feedback

Specifies the media mobilization profile for a media asset.

Version information

Version Added: PowerPoint 2013

Members

Name | Value | Description
ppResampleMediaProfileCustom | 1 | Custom profile
ppResampleMediaProfileSmall | 2 | Small profile
ppResampleMediaProfileSmaller | 3 | Smaller profile
ppResampleMediaProfileSmallest | 4 | Smallest profile
ppResampleMediaProfileCustom | 1 |
ppResampleMediaProfileSmall | 2 |
ppResampleMediaProfileSmaller | 3 |
ppResampleMediaProfileSmallest | 4 |


Slide.Master Property (PowerPoint)

 Copy code hover
[image]

Slide.Master Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Master object that represents the slide master. Read-only.

Syntax

expression .Master

expression A variable that represents a Slide object.

Return Value

Master

Example

This example sets the background fill for the slide master for slide one in the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(1).Master.Background.Fill _

    .PresetGradient msoGradientDiagonalUp, 1, msoGradientDaybreak

See also

Concepts

Slide Object

Other resources

Slide Object Members


AnimationPoint.Delete Method (PowerPoint)

 Copy code hover
[image]

AnimationPoint.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the specified AnimationPoint object.

Syntax

expression .Delete

expression A variable that represents an AnimationPoint object.

See also

Concepts

AnimationPoint Object

Other resources

AnimationPoint Object Members


Comment Members (PowerPoint)

 Copy code hover
[image]

Comment Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a comment on a given slide or slide range. The Comment object is a member of the Comments collection object.

Methods

Name | Description
Delete | Deletes the specified Comment object.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Author | Returns a String that represents the author as for a specified Comment object. Read-only.
AuthorIndex | Returns a Long representing the index number of a comment for a given author. The first comment for a given author has an index number of 1, their second comment has an index number of 2. Read-only.
AuthorInitials | Returns the author's initials as a read-only String for a specified Comment object. Read-only.
Collapsed | Returns whether the replies to a comment are shown (expanded) or hidden (collapsed). Ready-only.
DateTime | Returns the date and time a comment was created.
Left | Returns a Single that represents the distance in points from the left edge of the comment to the left edge of the slide. Read-only.
Parent | Returns the parent object for the specified object.
ProviderID | Returns a String that represents ID of the service providing contact information. Read-only.
Replies | Returns a Comments collection of Comment objects that are children of the specified comment. Read-only.
Text | Returns a String that represents the text in a comment. Read-only.
TimeZoneBias | Returns a String that specifies the local time zone adjustment for the contact. Read-only.
Top | Returns a Single that represents the distance in points from the left edge of the comment to the left edge of the slide. Read-only.
UserID | Returns a String that represents user ID of the contact. Read-only.


AnimationBehavior.Parent Property (PowerPoint)

 Copy code hover
[image]

AnimationBehavior.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents an AnimationBehavior object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

AnimationBehavior Object

Other resources

AnimationBehavior Object Members


Point.MarkerForegroundColor Property (PowerPoint)

 Copy code hover
[image]

Point.MarkerForegroundColor Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets the marker foreground color as an RGB value or returns the corresponding color index value. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .MarkerForegroundColor

expression A variable that represents a Point object.

Remarks

This property applies only to line, scatter, and radar charts.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the marker background and foreground colors for the second point in series one for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.SeriesCollection(1).Points(2)

            ' Set the background color to green.

            .MarkerBackgroundColor = RGB(0,255,0)

            ' Set the foreground color to red.

            .MarkerForegroundColor = RGB(255,0,0)

        End With

    End If

End With

See also

Concepts

Point Object

Other resources

Point Object Members


ActionSetting.AnimateAction Property (PowerPoint)

 Copy code hover
[image]

ActionSetting.AnimateAction Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Specifies whether the color of the specified shape is momentarily inverted when the specified mouse action occurs. Read/write.

Syntax

expression .AnimateAction

expression A variable that represents an ActionSetting object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The color of the specified shape is not momentarily inverted when the specified mouse action occurs.
msoTrue | The color of the specified shape is momentarily inverted when the specified mouse action occurs.

Example

This example sets shape three on slide one in the active presentation to play the sound of applause and to momentarily invert its color when it is clicked during a slide show.

VBA Copy code Copy code
With ActivePresentation.Slides(1) _

    .Shapes(3).ActionSettings(ppMouseClick)

        .SoundEffect.Name = "applause"

        .AnimateAction = msoTrue

End With

See also

Concepts

ActionSetting Object

Other resources

ActionSetting Object Members


Presentation.FullName Property (PowerPoint)

 Copy code hover
[image]

Presentation.FullName Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the name of the specified add-in or saved presentation, including the path, the current file system separator, and the file name extension. Read-only String.

Syntax

expression .FullName

expression A variable that represents a Presentation object.

Return Value

String

Remarks

This property is equivalent to the Path property, followed by the current file system separator, followed by the Name property.

Example

This example displays the path and file name of every available add-in.

VBA Copy code Copy code
For Each a In Application.AddIns

    MsgBox a.FullName

Next a

This example displays the path and file name of the active presentation (assuming that the presentation has been saved).

VBA Copy code Copy code
MsgBox Application.ActivePresentation.FullName

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


Table.LastCol Property (PowerPoint)

 Copy code hover
[image]

Table.LastCol Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether to display special formatting for the last column of the specified table. Read/write.

Syntax

expression .LastCol

expression A variable that represents a Table object.

Return Value

Boolean

See also

Concepts

Table Object

Other resources

Table Object Members


TextStyleLevel Object (PowerPoint)

 Copy code hover
[image]

TextStyleLevel Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Contains character and paragraph formatting information for an outline level.

Remarks

The TextStyleLevel object is a member of the TextStyleLevels collection. The TextStyleLevels collection contains one TextStyleLevel object for each of the five outline levels.

Example

Use Levels(index), where index is a number from 1 through 5 that corresponds to the outline level, to return a single TextStyleLevel object. The following example sets the font name and font size, the space before paragraphs, and the paragraph alignment for level-one body text on all the slides in the active presentation.

VBA Copy code Copy code
With ActivePresentation.SlideMaster _

        .TextStyles(ppBodyStyle).Levels(1)

    With .Font

        .Name = "Arial"

        .Size = 36

    End With

    With .ParagraphFormat

        .LineRuleBefore = False

        .SpaceBefore = 14

        .Alignment = ppAlignJustify

    End With

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

TextStyleLevel Object Members


AnimationPoints.Smooth Property (PowerPoint)

 Copy code hover
[image]

AnimationPoints.Smooth Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the transition from one animation point to another is smoothed. Read/write.

Syntax

expression .Smooth

expression A variable that represents a AnimationPoints object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The animation point should not be smoothed.
msoTrue | The default. The animation should be smoothed.

Example

This example changes smoothing for an animation point.

VBA Copy code Copy code
Sub ChangeSmooth(ByVal ani As AnimationBehavior, ByVal bln As MsoTriState)

    ani.PropertyEffect.Points.Smooth = bln

End Sub

See also

Concepts

AnimationPoints Object
LegendKey Object
Series Object

Other resources

LegendKey Object Members
AnimationPoints Object Members
Series Object Members


PublishObjects.Item Method (PowerPoint)

 Copy code hover
[image]

PublishObjects.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single PublishObject object from the specified PublishObjects collection.

Syntax

expression .Item(Index)

expression A variable that represents a PublishObjects object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Long | The index number of the single PublishObject object in the collection to be returned.

Return Value

PublishObject

See also

Concepts

PublishObjects Object

Other resources

PublishObjects Object Members


Shape.Top Property (PowerPoint)

 Copy code hover
[image]

Shape.Top Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a Single that represents the distance from the top edge of the shape's bounding box to the top edge of the document. Read/write.

Syntax

expression .Top

expression A variable that represents a Shape object.

Return Value

Single

Example

This example arranges windows one and two horizontally; in other words, each window occupies half the available vertical space and all the available horizontal space in the application window's client area. For this example to work, there must be only two document windows open.

VBA Copy code Copy code
Windows.Arrange ppArrangeTiled

sngHeight = Windows(1).Height                     ' available height

sngWidth = Windows(1).Width + Windows(2).Width    ' available width

With Windows(1)

    .Width = sngWidth

    .Height = sngHeight / 2

    .Left = 0

End With

With Windows(2)

    .Width = sngWidth

    .Height = sngHeight / 2

    .Top = sngHeight / 2

    .Left = 0

End With

See also

Concepts

Shape Object

Other resources

Shape Object Members


ShapeRange Members (PowerPoint)

 Copy code hover
[image]

ShapeRange Members (PowerPoint)
Send feedback

Published: July 12, 2012

Represents a shape range, which is a set of shapes on a document. A shape range can contain as few as a single shape or as many as all the shapes on the document.

Methods

Name | Description
Align | Aligns the shapes in the specified range of shapes.
Apply | Applies to the specified shape range formatting that's been copied by using the PickUp method.
ApplyAnimation | Applies animation to a ShapeRange object.
ConvertTextToSmartArt | Returns the number of objects in the specified collection. Read-only.
Copy | Copies the specified object to the Clipboard.
Cut | Deletes the specified object and places it on the Clipboard.
Delete | Deletes the specified ShapeRange object.
Distribute | Evenly distributes the shapes in the specified range of shapes. You can specify whether you want to distribute the shapes horizontally or vertically and whether you want to distribute them over the entire slide or just over the space they originally occupy.
Duplicate | Creates a duplicate of the specified ShapeRange object, adds the range of shapes to the Shapes collection, and then returns the new ShapeRange object. The duplicated objects are placed at the end of the Shapes collection.
Flip | Flips the specified shape range around its horizontal or vertical axis.
Group | Groups the shapes in the specified range. Returns the grouped shapes as a single Shape object.
IncrementLeft | Moves the specified shape range horizontally by the specified number of points.
IncrementRotation | Changes the rotation of the specified shape range around the z-axis by the specified number of degrees. Use the Rotation property to set the absolute rotation of the shape range.
IncrementTop | Moves the specified shape range vertically by the specified number of points.
Item | Returns a single Shape object from the specified ShapeRange collection.
MergeShapes | Combines all of the shapes in the range to create a single new shape.
PickUp | Copies the formatting of the specified shape. Use the Apply method to apply the copied formatting to another shape.
PickupAnimation | Picks up all animation from the ShapeRange object.
Regroup | Regroups the group that the specified shape range belonged to previously. Returns the regrouped shapes as a single Shape object.
RerouteConnections | Reroutes connectors so that they take the shortest possible path between the shapes they connect. To do this, the RerouteConnections method may detach the ends of a connector and reattach them to different connecting sites on the connected shapes.
ScaleHeight | Scales the height of the shapes in the range by a specified factor.
ScaleWidth | Scales the width of the shapes in the range by a specified factor.
Select | Selects the specified object.
SetShapesDefaultProperties | Applies the formatting for the specified shape to the default shape. Shapes created after this method has been used will have this formatting applied to them by default.
Ungroup | Ungroups any grouped shapes in the specified shape or range of shapes. Disassembles pictures and OLE objects within the specified shape or range of shapes. Returns the ungrouped shapes as a single ShapeRange object.
UpgradeMedia | Upgrades media within the specified ShapeRange object.
ZOrder | Moves the specified shape range in front of or behind other shapes in the collection (that is, changes the shape range's position in the z-order).

Properties

Name | Description
ActionSettings | Returns an ActionSettings object that contains information about what action occurs when the user clicks or moves the mouse over the specified shape or text range during a slide show. Read-only.
Adjustments | Returns an Adjustments object that contains adjustment values for all the adjustments in the specified shape. Applies to any ShapeRange object that represents an AutoShape, WordArt, or a connector. Read-only.
AlternativeText | Returns or sets the alternative text associated with a shape in a Web presentation. Read/write.
AnimationSettings | Returns an AnimationSettings object that represents all the special effects you can apply to the animation of the specified shape. Read-only.
Application | Returns an Application object that represents the creator of the specified object.
AutoShapeType | Returns or sets the shape type for the specified ShapeRange object, which must represent an AutoShape other than a line, freeform drawing, or connector. Read/write.
BackgroundStyle | Sets or returns the background style of the specified object. Read/write.
BlackWhiteMode | Returns or sets a value that indicates how the specified shape appears when the presentation is viewed in black-and-white mode. Read/write.
Callout | Returns a CalloutFormat object that contains callout formatting properties for the specified shape. Applies to Shape or ShapeRange objects that represent line callouts. Read-only.
Chart | Returns the Chart object of the current ShapeRange object. Read-only.
Child | MsoTrue if the shape is a child shape or if all shapes in a shape range are child shapes of the same parent. Read-only.
ConnectionSiteCount | Returns the number of connection sites on the specified shape. Read-only.
Connector | Determines whether the specified shape is a connector. Read-only.
ConnectorFormat | Returns a ConnectorFormat object that contains connector formatting properties. Applies to Shape or ShapeRange objects that represent connectors. Read-only.
Count | Returns the number of objects in the specified collection. Read-only.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
CustomerData | Returns a CustomerData object.
Fill | Returns a FillFormat object that contains fill formatting properties for the specified shape. Read-only.
Glow | Returns the glow format for the specified range of shapes. Read-only.
GroupItems | Returns a GroupShapes object that represents the individual shapes in the specified group. Use the Item method of the GroupShapes object to return a single shape from the group. Read-only.
HasChart | Returns whether the shape range represented by the specified object contains a chart. Read-only.
HasSmartArt | Returns True if the current ShapeRange object has a SmartArt diagram. Read-only.
HasTable | Returns whether the specified shape is a table. Read-only.
HasTextFrame | Returns whether the specified shape has a text frame. Read-only.
Height | Returns or sets the height of the specified object, in points. Read/write.
HorizontalFlip | Returns whether the specified shape is flipped around the horizontal axis. Read-only.
Id | Returns a Long that identifies the shape or range of shapes. Read-only.
Left | Returns or sets a Single that represents the distance in points from the left edge of the leftmost shape in the shape range to the left edge of the slide. Read/write.
Line | Returns a LineFormat object that contains line formatting properties for the specified shape. (For a line, the LineFormat object represents the line itself; for a shape with a border, the LineFormat object represents the border.) Read-only.
LinkFormat | Returns a LinkFormat object that contains the properties that are unique to linked OLE objects. Read-only.
LockAspectRatio | Determines whether the specified shape retains its original proportions when you resize it. Read/write.
MediaFormat | Returns the current MediaFormat object. Read-only.
MediaType | Returns the OLE media type. Read-only.
Name | When a shape is created, Microsoft PowerPoint automatically assigns it a name in the form ShapeType Number, where ShapeType identifies the type of shape or AutoShape, and Number is an integer that's unique within the collection of shapes on the slide. For example, the automatically generated names of the shapes on a slide could be Placeholder 1, Oval 2, and Rectangle 3. To avoid conflict with automatically assigned names, don't use the form ShapeType Number for user-defined names, where ShapeType is a value that is used for automatically generated names, and Number is any positive integer. A shape range must contain exactly one shape. Read/write.
Nodes | Returns a ShapeNodes collection that represents the geometric description of the specified shape. Applies to ShapeRange objects that represent freeform drawings.
OLEFormat | Returns an OLEFormat object that contains OLE formatting properties for the specified shape. Applies to Shape or ShapeRange objects that represent OLE objects. Read-only.
Parent | Returns the parent object for the specified object.
ParentGroup | Returns a Shape object that represents the common parent shape of a child shape or a range of child shapes.
PictureFormat | Returns a PictureFormat object that contains picture formatting properties for the specified shape. Read-only.
PlaceholderFormat | Returns a PlaceholderFormat object that contains the properties that are unique to placeholders. Read-only.
Reflection | Returns the reflection format for the specified range of shapes. Read-only.
Rotation | Returns or sets the number of degrees the specified shape is rotated around the z-axis. Read/write.
Shadow | Returns a ShadowFormat object that contains shadow formatting properties for the specified shapes. Read-only.
ShapeStyle | Sets or returns the shape style index for the specified object.
SmartArt | Returns the SmartArt diagram of the ShapeRange object. Read-only.
SoftEdge | Returns the soft edge format for the specified range of shapes. Read-only.
Table | Returns a Table object that represents a table in a shape or in a shape range. Read-only.
Tags | Returns a Tags object that represents the tags for the specified object. Read-only.
TextEffect | Returns a TextEffectFormat object that contains text-effect formatting properties for the specified shape. Read-only.
TextFrame | Returns a TextFrame object that contains the alignment and anchoring properties for the specified shape or master text style. Read-only.
TextFrame2 | Returns the TextFrame2 object associated with the specified ShapeRange object that contains the alignment and anchoring properties for the specified shape range. Read-only.
ThreeD | Returns a ThreeDFormat object that contains 3-D - effect formatting properties for the specified shape. Read-only.
Title | Returns a Shape object that represents the slide title. Read-only.
Top | Returns or sets a Single that represents the distance from the top edge of the topmost shape in the shape range to the top edge of the document. Read/write.
Type | Represents the type of shape or shapes in a range of shapes. Read-only.
VerticalFlip | Determines whether the specified shape is flipped around the vertical axis. Read-only.
Vertices | Returns the coordinates of the specified freeform drawing's vertices (and control points for Bézier curves) as a series of coordinate pairs. Read-only.
Visible | Returns or sets the visibility of the specified object or the formatting applied to the specified object. Read/write.
Width | Returns or sets the width of the specified object, in points. Read/write.
ZOrderPosition | Returns the position of the specified shape in the z-order. Read-only.


SlideShowView.Next Method (PowerPoint)

 Copy code hover
[image]

SlideShowView.Next Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Displays the slide immediately following the slide that's currently displayed.

Syntax

expression .Next

expression A variable that represents a SlideShowView object.

Remarks

If the last slide is displayed, the Next method closes the slide show in speaker mode and returns to the first slide in kiosk mode.

Use the View property of the SlideShowWindow object to return the SlideShowView object.

Example

This example shows the slide immediately following the currently displayed slide on slide show window one.

VBA Copy code Copy code
SlideShowWindows(1).View.Next

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


Column.Select Method (PowerPoint)

 Copy code hover
[image]

Column.Select Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Selects the specified object.

Syntax

expression .Select

expression A variable that represents a Column object.

Remarks

If you try to make a selection that isn't appropriate for the view, your code will fail. For example, you can select a slide in slide sorter view but not in slide view.

Example

This example selects the first five characters in the title of slide one in the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(1).Shapes.Title.TextFrame _

    .TextRange.Characters(1, 5).Select

This example selects slide one in the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(1).Select

This example selects a table that has been added to a new slide in a new presentation. The table has three rows and three columns.

VBA Copy code Copy code
With Presentations.Add.Slides

    .Add(1, ppLayoutBlank).Shapes.AddTable(3, 3).Select

End With

See also

Concepts

Column Object

Other resources

Column Object Members


ShapeRange.ApplyAnimation Method (PowerPoint)

 Copy code hover
[image]

ShapeRange.ApplyAnimation Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Applies animation to a ShapeRange object.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .ApplyAnimation

expression A variable that represents a ShapeRange object.

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


Trendlines.Parent Property (PowerPoint)

 Copy code hover
[image]

Trendlines.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents a Trendlines object.

See also

Concepts

Trendlines Object

Other resources

Trendlines Object Members


PpSlideSizeType Enumeration (PowerPoint)

 Copy code hover
[image]

PpSlideSizeType Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Constants that specify the size type for the slide, passed to and returned by the SlideSize property of the PageSetup object.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppSlideSize35MM | 4 | 35MM
ppSlideSizeA3Paper | 9 | A3 Paper
ppSlideSizeA4Paper | 3 | A4 Paper
ppSlideSizeB4ISOPaper | 10 | B4 ISO Paper
ppSlideSizeB4JISPaper | 12 | B4 JIS Paper
ppSlideSizeB5ISOPaper | 11 | B5 ISO Paper
ppSlideSizeB5JISPaper | 13 | B5 JIS Paper
ppSlideSizeBanner | 6 | Banner
ppSlideSizeCustom | 7 | Custom
ppSlideSizeHagakiCard | 14 | Hagaki Card
ppSlideSizeLedgerPaper | 8 | Ledger Paper
ppSlideSizeLetterPaper | 2 | Letter Paper
ppSlideSizeOnScreen | 1 | On Screen
ppSlideSizeOverhead | 5 | Overhead


TextRange.BoundTop Property (PowerPoint)

 Copy code hover
[image]

TextRange.BoundTop Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the distance (in points) from the top of the of the text bounding box for the specified text frame to the top of the slide. Read-only.

Syntax

expression .BoundTop

expression A variable that represents a TextRange object.

Return Value

Single

Example

This example adds a rounded rectangle to slide one in the active presentation. The rectangle has the same dimensions as the text bounding box for shape one.

VBA Copy code Copy code
With Application.ActivePresentation.Slides(1).Shapes

    Set tr = .Item(1).TextFrame.TextRange

    Set roundRect = .AddShape(msoShapeRoundedRectangle, _

        tr.BoundLeft, tr.BoundTop, tr.BoundWidth, tr.BoundHeight)

End With

With roundRect.Fill

    .ForeColor.RGB = RGB(255, 0, 128)

    .Transparency = 0.75

End With

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


Selection Members (PowerPoint)

 Copy code hover
[image]

Selection Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents the selection in the specified document window. The Selection object is deleted whenever you change slides in an active slide view (the Type property will return ppSelectionNone).

Methods

Name | Description
Copy | Copies the specified object to the Clipboard.
Cut | Deletes the specified object and places it on the Clipboard.
Delete | Deletes the specified Selection object.
Unselect | Cancels the current selection.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
ChildShapeRange | Returns a ShapeRange object that represents the child shapes of a selection.
HasChildShapeRange | True if the selection contains child shapes. Read-only.
Parent | Returns the parent object for the specified object.
ShapeRange | Returns a ShapeRange object that represents all the slide objects that have been selected on the specified slide. Read-only.
SlideRange | Returns a SlideRange object that represents a range of selected slides. Read-only.
TextRange | Returns a TextRange object that represents the selected text. Read-only.
TextRange2 | Returns the TextRange2 object of the current Selection object. Read-only.
Type | Represents the type of objects in a selection. Read-only.


AnimationBehaviors.Count Property (PowerPoint)

 Copy code hover
[image]

AnimationBehaviors.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents an AnimationBehaviors object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

AnimationBehaviors Object

Other resources

AnimationBehaviors Object Members


ActionSettings.Parent Property (PowerPoint)

 Copy code hover
[image]

ActionSettings.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents an ActionSettings object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

ActionSettings Object

Other resources

ActionSettings Object Members


ShapeNodes.Creator Property (PowerPoint)

 Copy code hover
[image]

ShapeNodes.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.

Syntax

expression .Creator

expression A variable that represents a ShapeNodes object.

Return Value

Long

Remarks

The Creator property is designed to be used in Microsoft Office applications for the Macintosh.

Example

This example displays a message about the creator of myObject.

VBA Copy code Copy code
Set myObject = Application.ActivePresentation.Slides(1).Shapes(1)

If myObject.Creator = &h50575054 Then

    MsgBox "This is a PowerPoint object"

Else

    MsgBox "This is not a PowerPoint object"

End If

See also

Concepts

ShapeNodes Object

Other resources

ShapeNodes Object Members


Presentation.ReadOnly Property (PowerPoint)

 Copy code hover
[image]

Presentation.ReadOnly Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns whether the specified presentation is read-only. Read-only.

Syntax

expression .ReadOnly

expression A variable that represents a Presentation object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified presentation is not read-only.
msoTrue | The specified presentation is read-only.

Example

If the active presentation is read-only, this example saves it as newfile.ppt.

VBA Copy code Copy code
With Application.ActivePresentation

    If .ReadOnly Then .SaveAs FileName:="newfile"

End With

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


Axis.MajorGridlines Property (PowerPoint)

 Copy code hover
[image]

Axis.MajorGridlines Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the major gridlines for the specified axis. Read-only Gridlines.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .MajorGridlines

expression A variable that represents an Axis object.

Remarks

Only axes in the primary axis group can have gridlines.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the color of the major gridlines for the value axis of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.Axes(xlValue)

            If .HasMajorGridlines Then

                 ' Set the color to blue.

                .MajorGridlines.Border.ColorIndex = 5

            End If

        End With

    End If

End With

See also

Concepts

Axis Object

Other resources

Axis Object Members


SoundEffect.Play Method (PowerPoint)

 Copy code hover
[image]

SoundEffect.Play Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Plays the specified sound effect.

Syntax

expression .Play

expression A variable that represents a SoundEffect object.

Example

This example plays the sound effect that's been set for the transition to slide two in the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(2).SlideShowTransition.SoundEffect.Play

See also

Concepts

SoundEffect Object
Player Object

Other resources

SoundEffect Object Members
Player Object Members


RotationEffect Object (PowerPoint)

 Copy code hover
[image]

RotationEffect Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a rotation effect for an AnimationBehavior object.

Example

Use the RotationEffect property of the AnimationBehavior object to return a RotationEffect object. The following example refers to the rotation effect for a given animation behavior.

VBA Copy code Copy code
ActivePresentation.Slides(1).TimeLine.MainSequence.Item.Behaviors(1).RotationEffect

Use the By , From , and To properties of the RotationEffect object to affect an object's animation rotation. The following example adds a new shape to the first slide and sets the rotation animation behavior.

VBA Copy code Copy code
Sub AddRotation()

    Dim shpNew As Shape

    Dim effNew As Effect

    Dim aniNew As AnimationBehavior

    Set shpNew = ActivePresentation.Slides(1).Shapes _

        .AddShape(Type:=msoShape5pointStar, Left:=0, _

        Top:=0, Width:=100, Height:=100)

    Set effNew = ActivePresentation.Slides(1).TimeLine.MainSequence _

        .AddEffect(Shape:=shpNew, effectId:=msoAnimEffectCustom)

    Set aniNew = effNew.Behaviors.Add(msoAnimTypeRotation)

    With aniNew.RotationEffect

        'Rotate 270 degrees from current position

        .By = 270

    End With

End Sub

See also

Concepts

PowerPoint Object Model Reference

Other resources

RotationEffect Object Members


MediaFormat.Resample Method (PowerPoint)

 Copy code hover
[image]

MediaFormat.Resample Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Adds the current media object to the queue and begins resampling, based on the specified parameters.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Resample(Trim, SampleHeight, SampleWidth, VideoFrameRate, AudioSamplingRate, VideoBitRate)

expression An expression that returns a MediaFormat object.

Parameters

Name | Required/Optional | Data Type | Description
Trim | Optional | Boolean | Whether to trim the sample.
SampleHeight | Optional | Integer | The sample resolution height.
SampleWidth | Optional | Integer | The sample resolution width.
VideoFrameRate | Optional | Long | The video frame rate, in frames per second.
AudioSamplingRate | Optional | Long | The audio sampling rate, in bits per second.
VideoBitRate | Optional | Long | The video bit rate, in bits per second.

Return Value

Nothing

Remarks

Resample ignores the values of parameters that are not applicable to the media.

See also

Concepts

MediaFormat Object

Other resources

MediaFormat Object Members


SlideShowView.EraseDrawing Method (PowerPoint)

 Copy code hover
[image]

SlideShowView.EraseDrawing Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Removes lines drawn during a slide show by using either the DrawLine method or the pen tool.

Syntax

expression .EraseDrawing

expression A variable that represents a SlideShowView object.

Example

VBA Copy code Copy code
SlideShowWindows(1).View.EraseDrawing

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


Axis.Left Property (PowerPoint)

 Copy code hover
[image]

Axis.Left Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the distance, in points, from the left edge of the object to the left edge of the chart area. Read-only Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Left

expression A variable that represents an Axis object.

See also

Concepts

Axis Object

Other resources

Axis Object Members


Research.IsResearchService Method (PowerPoint)

 Copy code hover
[image]

Research.IsResearchService Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Indicates whether the GUID specified in the ServiceID parameter corresponds to a currently configured research service.

Syntax

expression .IsResearchService(ServiceID)

expression An expression that returns a Research object.

Parameters

Name | Required/Optional | Data Type | Description
ServiceID | Required | String | A GUID that identifies the research service.

Return Value

Boolean

See also

Concepts

Research Object

Other resources

Research Object Members


Hyperlink.CreateNewDocument Method (PowerPoint)

 Copy code hover
[image]

Hyperlink.CreateNewDocument Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Creates a new Web presentation associated with the specified hyperlink.

Syntax

expression .CreateNewDocument(FileName, EditNow, Overwrite)

expression A variable that represents a Hyperlink object.

Parameters

Name | Required/Optional | Data Type | Description
FileName | Required | String | The path and file name of the document.
EditNow | Required | MsoTriState | Determines whether the document is opened immediately in its associated editor.
Overwrite | Required | MsoTriState | Determines whether any existing file of the same name in the same folder is overwritten.

Return Value

Nothing

Example

This example creates a new Web presentation to be associated with hyperlink one on slide one. The new presentation is called Brittany.ppt, and it overwrites any file of the same name in the HTMLPres folder. The new presentation document is loaded into Microsoft PowerPoint immediately for editing.

VBA Copy code Copy code
ActivePresentation.Slides(1).Hyperlinks(1).CreateNewDocument _
    FileName:="C:\HTMLPres\Brittany.ppt", _
    EditNow:=msoTrue, _
    Overwrite:=msoTrue

See also

Concepts

Hyperlink Object

Other resources

Hyperlink Object Members


LinkFormat Methods (PowerPoint)

 Copy code hover
[image]

LinkFormat Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
BreakLink | Breaks the link between the source file and the specified OLE object, picture, or linked field.
Update | Updates the specified linked OLE object.


ThreeDFormat.IncrementRotationVertical Method (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.IncrementRotationVertical Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Rotates the ThreeDFormat object along the vertical axis by the specified number of degrees.

Syntax

expression .IncrementRotationVertical(Increment)

expression A variable that represents a ThreeDFormat object.

Parameters

Name | Required/Optional | Data Type | Description
Increment | Required | Single | The number of degrees to rotate the ThreeDFormat object, between -180 and 180 degrees.

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


Points.Item Method (PowerPoint)

 Copy code hover
[image]

Points.Item Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a single object from a collection.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Item(Index)

expression A variable that represents a Points object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Long | The index number for the object.

Return Value

A Point object that the collection contains.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the marker style for the third point in series one in embedded chart one on worksheet one. The specified series must be a 2-D line, scatter, or radar series.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).Points.Item(3). _

            MarkerStyle = xlDiamond

    End If

End With

See also

Concepts

Points Object

Other resources

Points Object Members


PrintOptions.PrintInBackground Property (PowerPoint)

 Copy code hover
[image]

PrintOptions.PrintInBackground Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the specified presentation is printed in the background. Read/write.

Syntax

expression .PrintInBackground

expression A variable that represents a PrintOptions object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified presentation is not printed in the background.
msoTrue | The default. The specified presentation is printed in the background, which means that you can continue to work while it is being printed.

Example

This example prints the active presentation in the background.

VBA Copy code Copy code
With ActivePresentation

    .PrintOptions.PrintInBackground = msoTrue

    .PrintOut

End With

See also

Concepts

PrintOptions Object

Other resources

PrintOptions Object Members


ChartGroup.DownBars Property (PowerPoint)

 Copy code hover
[image]

ChartGroup.DownBars Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the down bars on a line chart. Read-only DownBars.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .DownBars

expression A variable that represents a ChartGroup object.

Remarks

This property applies only to line charts.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example enables up bars and down bars for chart group one of the first chart in the active document and then sets their colors. You should run the example on a 2-D line chart that has two series that cross each other at one or more data points.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With Chart.ChartGroups(1)

            .HasUpDownBars = True

            .DownBars.Interior.ColorIndex = 3

            .UpBars.Interior.ColorIndex = 5

        End With

    End If

End With

See also

Concepts

ChartGroup Object

Other resources

ChartGroup Object Members


AutoCorrect.DisplayAutoCorrectOptions Property (PowerPoint)

 Copy code hover
[image]

AutoCorrect.DisplayAutoCorrectOptions Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether Microsoft PowerPoint should display the AutoCorrect Options button. Read/write.

Syntax

expression .DisplayAutoCorrectOptions

expression A variable that represents an AutoCorrect object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | Do not display the AutoCorrect Options button.
msoTrue | Display the AutoCorrect Options button.

Example

This example disables display of the AutoCorrect Options and AutoLayout Options buttons.

VBA Copy code Copy code
Sub HideAutoCorrectOpButton()

    With Application.AutoCorrect

        .DisplayAutoCorrectOptions = msoFalse

        .DisplayAutoLayoutOptions = msoFalse

    End With

End Sub

See also

Concepts

AutoCorrect Object

Other resources

AutoCorrect Object Members


Hyperlink.Address Property (PowerPoint)

 Copy code hover
[image]

Hyperlink.Address Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the Internet address (URL) to the target document. Read/write.

Syntax

expression .Address

expression A variable that represents an Hyperlink object.

Return Value

String

Example

This example scans all shapes on the first slide for the URL to the Microsoft Web site.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

For Each s In myDocument.Hyperlinks

    If s.Address = "http://www.microsoft.com/" Then

        MsgBox "You have a link to the Microsoft Home Page"

    End If

Next

See also

Concepts

Hyperlink Object

Other resources

Hyperlink Object Members


TabStop.Application Property (PowerPoint)

 Copy code hover
[image]

TabStop.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a TabStop object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

TabStop Object

Other resources

TabStop Object Members


ShadowFormat.Size Property (PowerPoint)

 Copy code hover
[image]

ShadowFormat.Size Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the size of the specified shadow as a percentage of the shape size, from 0 to 200. Read/write.

Syntax

expression .Size

expression A variable that represents a ShadowFormat object.

Return Value

Single

Remarks

Setting the Size property to 0 removes the shadow. Setting the Size property to 100 creates a shadow the same size as its associated shape. Setting the Size property to 200 creates a shadow double the size of its shape.

See also

Concepts

ShadowFormat Object

Other resources

ShadowFormat Object Members


SlideShowView.DrawLine Method (PowerPoint)

 Copy code hover
[image]

SlideShowView.DrawLine Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Draws a line in the specified slide show view.

Syntax

expression .DrawLine(BeginX, BeginY, EndX, EndY)

expression A variable that represents a SlideShowView object.

Parameters

Name | Required/Optional | Data Type | Description
BeginX | Required | Single | The position (in points) of the line's starting point relative to the upper-left corner of the slide.
BeginY | Required | Single | The position (in points) of the line's starting point relative to the upper-left corner of the slide.
EndX | Required | Single | The position (in points) of the line's ending point relative to the upper-left corner of the slide.
EndY | Required | Single | The position (in points) of the line's ending point relative to the upper-left corner of the slide.

Example

This example draws a line in slide show window one.

VBA Copy code Copy code
SlideShowWindows(1).View.DrawLine 5, 5, 250, 250

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


CustomLayouts.Paste Method (PowerPoint)

 Copy code hover
[image]

CustomLayouts.Paste Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Pastes the slides on the Clipboard into a custom layout and adds the custom layout to the CustomLayouts collection.

Syntax

expression .Paste(Index)

expression A variable that represents a CustomLayouts object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Optional | Long | The index number of the custom layout before which the new custom layout is pasted. If this argument is omitted, the new custom layout is pasted at the end of the CustomLayouts collection.

Return Value

CustomLayout

See also

Concepts

CustomLayouts Object

Other resources

CustomLayouts Object Members


Presentation.TitleMaster Property (PowerPoint)

 Copy code hover
[image]

Presentation.TitleMaster Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Master object that represents the title master for the specified presentation.

Syntax

expression .TitleMaster

expression A variable that represents a Presentation object.

Return Value

Master

Remarks

If the presentation doesn't have a title master, an error occurs.

Use the AddTitleMaster method to add a title master to a presentation.

Example

If the active presentation has a title master, this example sets the footer text for the title master.

VBA Copy code Copy code
With Application.ActivePresentation

    If .HasTitleMaster Then

        .TitleMaster.HeadersFooters.Footer.Text = "Introduction"

    End If

End With

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


AddIn.Name Property (PowerPoint)

 Copy code hover
[image]

AddIn.Name Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

The name (title) of the add-in for file types that are registered. Read-only.

Syntax

expression .Name

expression A variable that represents an AddIn object.

Return Value

String

Remarks

You can use the object's name in conjunction with the Item method to return a reference to the object if the Item method for the collection that contains the object takes a Variant argument. For example, if the value of the Name property for a shape is Rectangle 2, then .Shapes("Rectangle 2") will return a reference to that shape.

See also

Concepts

AddIn Object

Other resources

AddIn Object Members


Axis.Height Property (PowerPoint)

 Copy code hover
[image]

Axis.Height Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the height, in points, of the object. Read-only Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Height

expression A variable that represents an Axis object.

See also

Concepts

Axis Object

Other resources

Axis Object Members


ChartTitle.Height Property (PowerPoint)

 Copy code hover
[image]

ChartTitle.Height Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a Double value that represents the height, in points, of the object. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Height

expression A variable that represents a ChartTitle object.

Return Value

Double

See also

Concepts

ChartTitle Object

Other resources

ChartTitle Object Members


LegendEntries.Application Property (PowerPoint)

 Copy code hover
[image]

LegendEntries.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents a LegendEntries object.

See also

Concepts

LegendEntries Object

Other resources

LegendEntries Object Members


ThreeDFormat Object (PowerPoint)

 Copy code hover
[image]

ThreeDFormat Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a shape's three-dimensional formatting.

Remarks

You cannot apply three-dimensional formatting to some kinds of shapes, such as beveled shapes or multiple-disjoint paths. Most of the properties and methods of the ThreeDFormat object for such a shape will fail.

Example

Use the ThreeD property to return a ThreeDFormat object. The following example adds an oval to myDocument and then specifies that the oval be extruded to a depth of 50 points and that the extrusion be purple.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

Set myShape = myDocument.Shapes _

    .AddShape(msoShapeOval, 90, 90, 90, 40)

With myShape.ThreeD

    .Visible = True

    .Depth = 50

    'RGB value for purple

    .ExtrusionColor.RGB = RGB(255, 100, 255)

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

ThreeDFormat Object Members


Application.Presentations Property (PowerPoint)

 Copy code hover
[image]

Application.Presentations Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Presentations collection that represents all open presentations. Read-only.

Syntax

expression .Presentations

expression A variable that represents a Application object.

Return Value

Presentations

Remarks

For information about returning a single member of a collection, see Returning an Object from a Collection.

If your Visual Studio solution includes the Microsoft.Office.Interop.PowerPoint reference, this property maps to the following types:

  • Microsoft.Office.Interop.PowerPoint._Application.Presentations

Example

This example opens the presentation named "Long Version.ppt."

VBA Copy code Copy code
Application.Presentations.Open _
    FileName:="c:\My Documents\Long version.ppt"

This example saves presentation one as "Year-End Report.ppt."

VBA Copy code Copy code
Application.Presentations(1).SaveAs "Year-End Report"

This example closes the year-end report presentation.

VBA Copy code Copy code
Application.Presentations("Year-End Report.ppt").Close

See also

Concepts

Application Object

Other resources

Application Object Members


Interior.PatternColorIndex Property (PowerPoint)

 Copy code hover
[image]

Interior.PatternColorIndex Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets the color of the interior pattern as an index into the current color palette, or as one of the following XlColorIndex constants: xlColorIndexAutomatic or xlColorIndexNone. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .PatternColorIndex

expression A variable that represents an Interior object.

Remarks

Set this property to xlColorIndexAutomatic to specify the automatic fill style for drawing objects. Set this property to xlColorIndexNone to specify that you do not want a pattern (this is the same as setting the Pattern property of the Interior object to xlPatternNone).

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example enables up and down bars, then adds a criss-cross pattern to the down bars and sets the pattern color to red, for the first chart group of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.ChartGroups(1)

            .HasUpDownBars = True

            .DownBars.Interior.Pattern = xlPatternCrissCross

            .DownBars.Interior.PatternColorIndex = 3

        End With

    End If

End With

See also

Concepts

Interior Object

Other resources

Interior Object Members


SlideShowView.Player Method (PowerPoint)

 Copy code hover
[image]

SlideShowView.Player Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Allows access to playback controls for the associated view in the current window.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Player(ShapeId)

expression A variable that represents a SlideShowView object.

Parameters

Name | Required/Optional | Data Type | Description
ShapeId | Required | Variant | The playback control.

Return Value

Player

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


Trendlines.Add Method (PowerPoint)

 Copy code hover
[image]

Trendlines.Add Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Creates a new trendline.

Syntax

expression .Add(Type, Order, Period, Forward, Backward, Intercept, DisplayEquation, DisplayRSquared, Name)

expression A variable that represents a Trendlines object.

Parameters

Name

Required/Optional

Data Type

Description

Type

Optional

XlTrendlineType

One of the enumeration values that specifies the trendline type. The default is xlLinear.

Order

Optional

Variant

The trendline order. Required ifType is set to xlPolynomial. If specified, the value must be an integer from 2 through 6.

Period

Optional

Variant

The trendline period. Required ifType is set to xlMovingAvg. If specified, the value must be an integer greater than 1 and less than the number of data points in the series to which you are adding a trendline.

Forward

Optional

Variant

The number of periods (or units on a scatter chart) that the trendline extends forward.

Backward

Optional

Variant

The number of periods (or units on a scatter chart) that the trendline extends backward.

Intercept

Optional

Variant

The trendline intercept. If specified, the value must be a double-precision floating-point number. If omitted, the intercept is automatically set by the regression, and the InterceptIsAuto property of the resulting Trendline object is set to True.

Note Note

This parameter is applicable only ifType is set to xlExponential, xlLinear, or xlPolynomial.

DisplayEquation

Optional

Variant

True to display the equation of the trendline on the chart (in the same data label as the R-squared value). The default is False.

DisplayRSquared

Optional

Variant

True to display the R-squared value of the trendline on the chart (in the same data label as the equation). The default is False.

Name

Optional

Variant

The name of the trendline. If omitted, Microsoft Word generates a name, and the NameIsAuto property of the resulting Trendline object is set to True.

Return Value

A Trendline object that represents the new trendline.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example creates a new linear trendline for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)
    If .HasChart Then
        .Chart.SeriesCollection(1).Trendlines.Add
    End If
End With

See also

Concepts

Trendlines Object

Other resources

Trendlines Object Members


CalloutFormat.Type Property (PowerPoint)

 Copy code hover
[image]

CalloutFormat.Type Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the type of callout. Read/write.

Syntax

expression .Type

expression A variable that represents a CalloutFormat object.

Return Value

MsoCalloutType

Remarks

The value of the Type property can be one of these MsoCalloutType constants.

msoCalloutFour

msoCalloutMixed

msoCalloutOne

msoCalloutThree

msoCalloutTwo

See also

Concepts

CalloutFormat Object

Other resources

CalloutFormat Object Members


Presentation.NoLineBreakBefore Property (PowerPoint)

 Copy code hover
[image]

Presentation.NoLineBreakBefore Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets the characters that cannot begin a line. Read/write.

Syntax

expression .NoLineBreakBefore

expression A variable that represents a Presentation object.

Return Value

String

Example

This example sets "!", ")", and "]" as characters that cannot begin a line.

VBA Copy code Copy code
With ActivePresentation

    .FarEastLineBreakLevel = ppFarEastLineBreakLevelCustom

    .NoLineBreakBefore =  "!)]"

End With

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


Application.Top Property (PowerPoint)

 Copy code hover
[image]

Application.Top Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets a Single that represents the distance in points from the top edge of the document, application, and slide show window to the top edge of the application window's client area. Read/write.

Syntax

expression .Top

expression A variable that represents an Application object.

Return Value

Single

Remarks

Setting this property to a very large positive or negative value may position the window completely off the desktop.

Example

This example arranges windows one and two horizontally; in other words, each window occupies half the available vertical space and all the available horizontal space in the application window's client area. For this example to work, there must be only two document windows open.

VBA Copy code Copy code
Windows.Arrange ppArrangeTiled

sngHeight = Windows(1).Height                     ' available height

sngWidth = Windows(1).Width + Windows(2).Width    ' available width

With Windows(1)

    .Width = sngWidth

    .Height = sngHeight / 2

    .Left = 0

End With

With Windows(2)

    .Width = sngWidth

    .Height = sngHeight / 2

    .Top = sngHeight / 2

    .Left = 0

End With

See also

Concepts

Application Object

Other resources

Application Object Members


ShapeRange.MediaFormat Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.MediaFormat Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the current MediaFormat object. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .MediaFormat

expression A variable that represents a ShapeRange object.

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


AnimationSettings.AfterEffect Property (PowerPoint)

 Copy code hover
[image]

AnimationSettings.AfterEffect Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a PpAfterEffect constant that indicates whether the specified shape appears dimmed, hidden, or unchanged after it is built. Read/write.

Syntax

expression .AfterEffect

expression A variable that represents an AnimationSettings object.

Remarks

You won't see the aftereffect you set for a shape unless the shape gets animated and at least one other shape on the slide gets animated after it. For a shape to be animated, the TextLevelEffect property of the AnimationSettings object for the shape must be set to something other than ppAnimateLevelNone, or the EntryEffect property must be set to a constant other than ppEffectNone. In addition, the Animate property must be set to True. To change the build order of the shapes on a slide, use the AnimationOrder property.

The value of the AfterEffect property can be one of these PpAfterEffect constants.

ppAfterEffectDim

ppAnimAfterEffectHide

ppAfterEffectHideOnNextClick

ppAfterEffectMixed

ppAfterEffectNone

Example

This example specifies that the title on slide one in the active presentation is to appear dimmed after the title is built. If the title is the last or only shape to be built on slide one, the text does not appear dimmed.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes.Title.AnimationSettings

    .Animate = True

    .TextLevelEffect = ppAnimateByAllLevels

    .AfterEffect = ppAfterEffectDim

End With

See also

Concepts

AnimationSettings Object

Other resources

AnimationSettings Object Members


ScaleEffect Members (PowerPoint)

 Copy code hover
[image]

ScaleEffect Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a scaling effect for an AnimationBehavior object.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
ByX | Sets or returns a Single that represents scaling or moving an object horizontally by a specified percentage of the screen width, depending on whether it used in conjunction with a ScaleEffect or MotionEffect object, respectively. For example, a value of 50 for a motion effect means to move the object half the screen width to the right. Read/write.
ByY | Sets or returns a Single that represents scaling or moving an object vertically by a specified percentage of the screen width, depending on whether it is used in conjunction with a ScaleEffect or MotionEffect object, respectively. Read/write.
FromX | Sets or returns a Single that represents the starting width or horizontal position of a ScaleEffect object, specified as a percent of the screen width. Read/write.
FromY | Returns or sets a Single that represents the starting height of a ScaleEffect object, specified as a percentage of the screen width. Read/write.
Parent | Returns the parent object for the specified object.
ToX | Sets or returns a Single that represents the ending width of a ScaleEffect object, specified as a percent of the screen width. Read/write.
ToY | Returns or sets a Single that represents the ending height of a ScaleEffect object, specified as a percentage of the screen width. Read/write.


Series.ApplyDataLabels Method (PowerPoint)

 Copy code hover
[image]

Series.ApplyDataLabels Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Applies data labels to a series.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ApplyDataLabels(Type, LegendKey, AutoText, HasLeaderLines, ShowSeriesName, ShowCategoryName, ShowValue, ShowPercentage, ShowBubbleSize, Separator)

expression A variable that represents a Series object.

Parameters

Name | Required/Optional | Data Type | Description
Type | Optional | XlDataLabelsType | The type of data label to apply.
LegendKey | Optional | Variant | True to show the legend key next to the point. The default is False.
AutoText | Optional | Variant | True if the object automatically generates appropriate text based on content.
HasLeaderLines | Optional | Variant | For the Chart and Series objects, True if the series has leader lines.
ShowSeriesName | Optional | Variant | True to enable the series name for the data label; otherwise, False.
ShowCategoryName | Optional | Variant | True to enable the category name for the data label; otherwise, False.
ShowValue | Optional | Variant | True to enable the value for the data label; otherwise, False.
ShowPercentage | Optional | Variant | True to enable the percentage for the data label; otherwise, False.
ShowBubbleSize | Optional | Variant | True to enable the bubble size for the data label; otherwise, False.
Separator | Optional | Variant | The separator for the data label.

Remarks

The Type parameter can be one of the following XlDataLabelsType constants:

  • xlDataLabelsShowBubbleSizes—The bubble size for the data label.

  • xlDataLabelsShowLabelAndPercent—The percentage of the total, and the category for the point. Available only for pie charts and doughnut charts.

  • xlDataLabelsShowPercent—The percentage of the total. Available only for pie charts and doughnut charts.

  • xlDataLabelsShowLabel—The category for the point.

  • xlDataLabelsShowNone—No data labels.

  • xlDataLabelsShowValue—(Default) The value for the point (assumed if this argument is not specified).

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example applies category labels to series one of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1). _

            ApplyDataLabels Type:=xlDataLabelsShowLabel

    End If

End With

See also

Concepts

Series Object

Other resources

Series Object Members


Presentation.InMergeMode Property (PowerPoint)

 Copy code hover
[image]

Presentation.InMergeMode Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Indicates whether the document window is in merge mode. Read-only

Version Information

Version Added: PowerPoint 2010

Syntax

expression .InMergeMode

expression A variable that represents a Presentation object.

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


LeaderLines Properties (PowerPoint)

 Copy code hover
[image]

LeaderLines Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Border | Returns the border of the object. Read-only ChartBorder.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Parent | Returns the parent for the specified object. Read-only Object.


ParagraphFormat.WordWrap Property (PowerPoint)

 Copy code hover
[image]

ParagraphFormat.WordWrap Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Used only with Kanji characters. Read/write.

Syntax

expression .WordWrap

expression A variable that represents a ParagraphFormat object.

Return Value

Long

See also

Concepts

ParagraphFormat Object

Other resources

ParagraphFormat Object Members


PpPublishSourceType Enumeration (PowerPoint)

 Copy code hover
[image]

PpPublishSourceType Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Constants that specify the type of source material to be published, passed to and returned by the SourceType property of the PublishObject object.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppPublishAll | 1 | Publish all.
ppPublishNamedSlideShow | 3 | Publish a named slideshow.
ppPublishSlideRange | 2 | Publish a range of slides.


ChartTitle.Name Property (PowerPoint)

 Copy code hover
[image]

ChartTitle.Name Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the name of the object. Read-only String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Name

expression A variable that represents a ChartTitle object.

See also

Concepts

ChartTitle Object

Other resources

ChartTitle Object Members


Placeholders Object (PowerPoint)

 Copy code hover
[image]

Placeholders Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

A collection of all the Shape objects that represent placeholders on the specified slide.

Remarks

Each Shape object in the Placeholders collection represents a placeholder for text, a chart, a table, an organizational chart, or some other type of object. If the slide has a title, the title is the first placeholder in the collection.

You can delete individual placeholders by using the Delete method, and you can restore deleted placeholders by using the AddPlaceholder method, but you cannot add any more placeholders to a slide than it had when it was created. To change the number of placeholders on a given slide, set the Layout property.

Example

Use the Placeholders property to return the Placeholders collection. Use Placeholders(index), where index is the placeholder index number, to return a Shape object that represents a single placeholder. Note that for any slide that has a title, Shapes.Title is equivalent to Shapes.Placeholders(1).The following example adds a new slide with a Bulleted List slide layout to the beginning of the presentation, sets the text for the title, and then adds two paragraphs to the text placeholder.

VBA Copy code Copy code
Set sObj = ActivePresentation.Slides.Add(1, ppLayoutText).Shapes

sObj.Title.TextFrame.TextRange.Text = "This is the title text"

sObj.Placeholders(2).TextFrame.TextRange.Text = _

    "Item 1" & Chr(13) & "Item 2"

See also

Concepts

PowerPoint Object Model Reference

Other resources

Placeholders Object Members


CustomLayouts.Add Method (PowerPoint)

 Copy code hover
[image]

CustomLayouts.Add Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a CustomLayout object that represents a new custom layout.

Syntax

expression .Add(Index)

expression A variable that represents a CustomLayouts object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Long | The index number of the custom layout. The default value is -1, which means that if the Index argument is omitted, the new custom layout is added at the end of existing custom layouts.

Return Value

CustomLayout

See also

Concepts

CustomLayouts Object

Other resources

CustomLayouts Object Members


Columns.Count Property (PowerPoint)

 Copy code hover
[image]

Columns.Count Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a Columns object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

Columns Object

Other resources

Columns Object Members


RGBColor.Application Property (PowerPoint)

 Copy code hover
[image]

RGBColor.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a RGBColor object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

RGBColor Object

Other resources

RGBColor Object Members


AnimationBehavior.SetEffect Property (PowerPoint)

 Copy code hover
[image]

AnimationBehavior.SetEffect Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a SetEffect object for the animation behavior. Read-only.

Syntax

expression .SetEffect

expression A variable that represents a AnimationBehavior object.

Return Value

SetEffect

Remarks

You can use the SetEffect object returned to set the value of a property.

Example

The following example adds a shape to the first slide of the active presentation and sets a set effect animation behavior.

VBA Copy code Copy code
Sub ChangeSetEffect()

    Dim sldFirst As Slide

    Dim shpHeart As Shape

    Dim effNew As Effect

    Dim bhvEffect As AnimationBehavior

    Set sldFirst = ActivePresentation.Slides(1)

    Set shpHeart = sldFirst.Shapes.AddShape(Type:=msoShapeHeart, _

        Left:=100, Top:=100, Width:=100, Height:=100)

    Set effNew = sldFirst.TimeLine.MainSequence.AddEffect _

        (Shape:=shpHeart, EffectID:=msoAnimEffectChangeFillColor, _

        Trigger:=msoAnimTriggerAfterPrevious)

    Set bhvEffect = effNew.Behaviors.Add(msoAnimTypeSet)

    With bhvEffect.SetEffect

         .Property = msoAnimShapeFillColor

        .To = RGB(Red:=0, Green:=255, Blue:=255)

    End With

End Sub

See also

Concepts

AnimationBehavior Object

Other resources

AnimationBehavior Object Members


MotionEffect.ByX Property (PowerPoint)

 Copy code hover
[image]

MotionEffect.ByX Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns a Single that represents scaling or moving an object horizontally by a specified percentage of the screen width, depending on whether it used in conjunction with a ScaleEffect or MotionEffect object, respectively. For example, a value of 50 for a motion effect means to move the object half the screen width to the right. Read/write.

Syntax

expression .ByX

expression A variable that represents a MotionEffect object.

Return Value

Single

Remarks

Negative numbers move the object horizontally to the left. Floating point numbers (for example, 55.5) are allowed.

To scale or move an object vertically, use the ByY property.

If both the ByX and ByY properties are set, then the object is scaled or moves both horizontally and vertically.

Do not confuse this property with the By property of the ColorEffect , RotationEffect , or PropertyEffect objects, which is used to set colors, rotations, or other properties of an animation behavior, respectively.

Example

The following example adds an animation path; then sets the horizontal and vertical movement of the shape.

VBA Copy code Copy code
Sub AddMotionPath()

    Dim effCustom As Effect

    Dim animBehavior As AnimationBehavior

    Dim shpRectangle As Shape

    'Adds rectangle and sets effect and animation

    Set shpRectangle = ActivePresentation.Slides(1).Shapes _

        .AddShape(Type:=msoShapeRectangle, Left:=300, _

        Top:=300, Width:=300, Height:=150)

    Set effCustom = ActivePresentation.Slides(1).TimeLine _

        .MainSequence.AddEffect(Shape:=shpRectangle, _

         effectId:=msoAnimEffectCustom)

    Set animBehavior = effCustom.Behaviors.Add(msoAnimTypeMotion)

    'Specifies animation motion

    With animBehavior.MotionEffect

        .ByX = 50

        .ByY = 50

    End With

End Sub

See also

Concepts

MotionEffect Object

Other resources

MotionEffect Object Members


DataLabel.Top Property (PowerPoint)

 Copy code hover
[image]

DataLabel.Top Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the distance, in points, from the top edge of the object to the top of the first row (on a worksheet) or the top of the chart area (on a chart). Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Top

expression A variable that represents a DataLabel object.

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


Theme.Application Property (PowerPoint)

 Copy code hover
[image]

Theme.Application Property (PowerPoint)
Send feedback

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2013

Syntax

expression .Application

expression A variable that represents a Theme object.


ResampleMediaTask Object (PowerPoint)

 Copy code hover
[image]

ResampleMediaTask Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Version Information

Version Added: PowerPoint 2010

See also

Concepts

PowerPoint Object Model Reference

Other resources

ResampleMediaTask Object Members


ShapeRange.Parent Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.Parent Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a ShapeRange object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


Hyperlink.Follow Method (PowerPoint)

 Copy code hover
[image]

Hyperlink.Follow Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Displays the HTML document associated with the specified hyperlink in a new Web browser window.

Syntax

expression .Follow

expression A variable that represents a Hyperlink object.

Example

This example loads the document associated with the first hyperlink on slide one in a new instance of the Web browser.

VBA Copy code Copy code
ActivePresentation.Slides(1).Hyperlinks(1).Follow

See also

Concepts

Hyperlink Object

Other resources

Hyperlink Object Members


ResampleMediaTasks.Resume Method (PowerPoint)

 Copy code hover
[image]

ResampleMediaTasks.Resume Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Resumes mobilization of the current media asset.

Syntax

expression .Resume

expression A variable that represents a ResampleMediaTasks object.

Return Value

Nothing

See also

Concepts

ResampleMediaTasks Object

Other resources

ResampleMediaTasks Object Members


SlideShowSettings Object (PowerPoint)

 Copy code hover
[image]

SlideShowSettings Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the slide show setup for a presentation.

Example

Use the SlideShowSettings property to return the SlideShowSettings object. The first section in the following example sets all the slides in the active presentation to advance automatically after five seconds. The second section sets the slide show to start on slide two, end on slide four, advance slides by using the timings set in the first section, and run in a continuous loop until the user presses ESC. Finally, the example runs the slide show.

VBA Copy code Copy code
For Each s In ActivePresentation.Slides

    With s.SlideShowTransition

        .AdvanceOnTime = True

        .AdvanceTime = 5

    End With

Next

With ActivePresentation.SlideShowSettings

    .RangeType = ppShowSlideRange

    .StartingSlide = 2

    .EndingSlide = 4

    .AdvanceMode = ppSlideShowUseSlideTimings

    .LoopUntilStopped = True

    .Run

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

SlideShowSettings Object Members


Comments.Item Method (PowerPoint)

 Copy code hover
[image]

Comments.Item Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a single Comment object from the specified Comments collection.

Syntax

expression .Item(Index)

expression A variable that represents a Comments object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Long | The index number of the single Comment object in the collection to be returned.

Return Value

Comment

See also

Concepts

Comments Object

Other resources

Comments Object Members


Presentation.SaveAs Method (PowerPoint)

 Copy code hover
[image]

Presentation.SaveAs Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Saves a presentation that's never been saved, or saves a previously saved presentation under a different name.

Syntax

expression .SaveAs(Filename, FileFormat, EmbedFonts)

expression A variable that represents a Presentation object.

Parameters

Name | Required/Optional | Data Type | Description
Filename | Required | String | Specifies the name to save the file under. If you don't include a full path, PowerPoint saves the file in the current folder.
FileFormat | Optional | PpSaveAsFileType | Specifies the saved file format. If this argument is omitted, the file is saved in the default file format (ppSaveAsDefault).
EmbedFonts | Optional | MsoTriState | Specifies whether PowerPoint embeds TrueType fonts in the saved presentation.

Remarks

The FileFormat parameter value can be one of these PpSaveAsFileType constants. The default is ppSaveAsDefault.

ppSaveAsAddIn

ppSaveAsBMP

ppSaveAsDefault

ppSaveAsEMF

ppSaveAsExternalConverter

ppSaveAsGIF

ppSaveAsJPG

ppSaveAsMetaFile

ppSaveAsMP4

ppSaveAsOpenDocumentPresentation

ppSaveAsOpenXMLAddin

ppSaveAsOpenXMLPicturePresentation

ppSaveAsOpenXMLPresentation

ppSaveAsOpenXMLPresentationMacroEnabled

ppSaveAsOpenXMLShow

ppSaveAsOpenXMLShowMacroEnabled

ppSaveAsOpenXMLTemplate

ppSaveAsOpenXMLTemplateMacroEnabled

ppSaveAsOpenXMLTheme

ppSaveAsPDF

ppSaveAsPNG

ppSaveAsPresentation

ppSaveAsRTF

ppSaveAsShow

ppSaveAsStrictOpenXMLPresentation

ppSaveAsTemplate

ppSaveAsTIF

ppSaveAsWMV

ppSaveAsXMLPresentation

ppSaveAsXPS

The EmbedFonts parameter value can be one of these MsoTriState constants.

Constant | Description
msoFalse | TrueType fonts are not embedded.
msoTriStateMixed | Embedded fonts are a mixture of TrueType and non-TrueType. The default.
msoTrue | TrueType fonts are embedded.

Example

This example saves a copy of the active presentation under the name "New Format Copy.ppt." By default, this copy is saved in the format of a presentation in the current version of PowerPoint. The presentation is then saved as a PowerPoint 4.0 file named "Old Format Copy."

VBA Copy code Copy code
With Application.ActivePresentation
    .SaveCopyAs "New Format Copy"
    .SaveAs "Old Format Copy", ppSaveAsPowerPoint4
End With

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


ShapeRange.Height Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.Height Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the height of the specified object, in points. Read/write.

Syntax

expression .Height

expression A variable that represents a ShapeRange object.

Return Value

Single

Remarks

The Height property of a Shape object returns or sets the height of the forward-facing surface of the specified shape. This measurement doesn't include shadows or 3-D effects.

Example

This example sets the height of document window two to half the height of the application window.

VBA Copy code Copy code
Windows(2).Height = Application.Height / 2

This example sets the height for row two in the specified table to 100 points (72 points per inch).

VBA Copy code Copy code
ActivePresentation.Slides(2).Shapes(5).Table.Rows(2).Height = 100

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


Shapes Properties (PowerPoint)

 Copy code hover
[image]

Shapes Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
HasTitle | Returns whether the collection of objects on the specified slide contains a title placeholder. Read-only.
Parent | Returns the parent object for the specified object.
Placeholders | Returns a Placeholders collection that represents the collection of all the placeholders on a slide. Read-only.
Title | Returns a Shape object that represents the slide title. Read-only.


How to: Initialize Control Properties

 Copy code hover
[image]

How to: Initialize Control Properties
Send feedback

You can initialize controls at run time by using Visual Basic code in a macro. For example, you could fill a list box, set text values, or set option buttons.

The following example uses the AddItem method to add data to a list box. Then it sets the value of a text box and displays the form.

VBA Copy code Copy code
Private Sub GetUserName()
    With UserForm1
        .lstRegions.AddItem "North"
        .lstRegions.AddItem "South"
        .lstRegions.AddItem "East"
        .lstRegions.AddItem "West"
        .txtSalesPersonID.Text = "00000"
        .Show
        ' ...
    End With
End Sub

You can also use code in the Initialize event of a form to set initial values for controls on the form. An advantage to setting initial control values in the Initialize event is that the initialization code stays with the form. You can copy the form to another project, and when you run the Show method to display the dialog box, the controls will be initialized.

VBA Copy code Copy code
Private Sub UserForm_Initialize()
    With UserForm1
        With .lstRegions
           .AddItem "North"
            .AddItem "South"
            .AddItem "East"
            .AddItem "West"
        End With
        .txtSalesPersonID.Text = "00000"
    End With
End Sub


ConnectorFormat.Type Property (PowerPoint)

 Copy code hover
[image]

ConnectorFormat.Type Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the type of connector. Read/write.

Syntax

expression .Type

expression A variable that represents a ConnectorFormat object.

Return Value

MsoConnectorType

Remarks

The value of the Type property can be one of these MsoConnectorType constants.

msoConnectorCurve

msoConnectorElbow

msoConnectorStraight

msoConnectorTypeMixed

See also

Concepts

ConnectorFormat Object

Other resources

ConnectorFormat Object Members


FillFormat.BackColor Property (PowerPoint)

 Copy code hover
[image]

FillFormat.BackColor Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a ColorFormat object that represents the background color for the specified fill or patterned line. Read/write.

Syntax

expression .BackColor

expression A variable that represents a FillFormat object.

Return Value

ColorFormat

Example

This example adds a rectangle to myDocument and then sets the foreground color, background color, and gradient for the rectangle's fill.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddShape(msoShapeRectangle, _

        90, 90, 90, 50).Fill

    .ForeColor.RGB = RGB(128, 0, 0)

    .BackColor.RGB = RGB(170, 170, 170)

    .TwoColorGradient msoGradientHorizontal, 1

End With

This example adds a patterned line to myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddLine(10, 100, 250, 0).Line

    .Weight = 6

    .ForeColor.RGB = RGB(0, 0, 255)

    .BackColor.RGB = RGB(128, 0, 0)

    .Pattern = msoPatternDarkDownwardDiagonal

End With

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


Presentation.HandoutMaster Property (PowerPoint)

 Copy code hover
[image]

Presentation.HandoutMaster Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Master object that represents the handout master. Read-only.

Syntax

expression .HandoutMaster

expression A variable that represents a Presentation object.

Return Value

Master

Example

This example sets the background pattern on the handout master in the active presentation.

VBA Copy code Copy code
Application.ActivePresentation.HandoutMaster.Background.Fill _

    .Patterned msoPatternDarkHorizontal

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


How to: Return Objects from Collections

 Copy code hover
[image]

How to: Return Objects from Collections
Send feedback

The Item method returns a single object from a collection. The following example sets the firstPres variable to a Presentation object that represents presentation one variable to a Presentation object that represents presentation one.

VBA Copy code Copy code
Set firstPres = Presentations.Item(1)

The Item method is the default method for most collections, so you can write the same statement more concisely by omitting the Item keyword.

VBA Copy code Copy code
Set firstPres = Presentations(1)

For more information about a specific collection, see the Help topic for that collection or the Item method for the collection.

Named Objects

Although you can usually specify an integer value by using the Item method, it may be more convenient to return an object by name. Many objects are given automatically generated names when they are created. For example, the first slide you create will be automatically named "Slide1." If the first two shapes you create are a rectangle and an oval, their default names will be "Rectangle 1" and "Oval 2". You may want to give an object a more meaningful name to make it easier to refer to later. Most often, this is done by setting the object's Name property. The following example sets a meaningful name for a slide as it is added. You can then use the name instead of the index number to refer to the slide.

VBA Copy code Copy code
ActivePresentation.Slides.Add(1, 1).Name = "Home Page Slide"
With ActivePresentation.Slides("Home Page Slide")
    .FollowMasterBackground = False
    .Background.Fill.PresetGradient _
        msoGradientDiagonalDown, 1, msoGradientBrass
End With

Predefined Index Values

Some collections have predefined index values you can use to return single objects. Each predefined index value is represented by a constant. For example, you specify a PpTextStyleType constant with the Item method of the TextStyles collection to return a single text style.

The following example sets the margins for the body area on slides in the active presentation.

VBA Copy code Copy code
With ActivePresentation.SlideMaster _
        .TextStyles(ppBodyStyle).TextFrame
    .MarginBottom = 50
    .MarginLeft = 50
    .MarginRight = 50
    .MarginTop = 50
End With


MediaFormat Methods (PowerPoint)

 Copy code hover
[image]

MediaFormat Methods (PowerPoint)
Send feedback

Published: July 12, 2012

This object has the following methods:

Methods

Name | Description
Resample | Adds the current media object to the queue and begins resampling, based on the specified parameters.
ResampleFromProfile | Adds the current media object to the queue and begins resampling base on the specified profile.
SetDisplayPicture | Sets the display picture at the specified time position.
SetDisplayPictureFromFile | Sets the display picture from a picture file.


Comments.Application Property (PowerPoint)

 Copy code hover
[image]

Comments.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a Comments object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

Comments Object

Other resources

Comments Object Members


SectionProperties.Name Method (PowerPoint)

 Copy code hover
[image]

SectionProperties.Name Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the name of the specified section as a String.

Syntax

expression .Name(sectionIndex)

expression A variable that represents a SectionProperties object.

Parameters

Name | Required/Optional | Data Type | Description
sectionIndex | Required | Integer | The index of the section in the SectionProperties colleciton.

Return Value

String

See also

Concepts

SectionProperties Object

Other resources

SectionProperties Object Members


Cell.Application Property (PowerPoint)

 Copy code hover
[image]

Cell.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a Cell object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

Cell Object

Other resources

Cell Object Members


PrintOptions.Parent Property (PowerPoint)

 Copy code hover
[image]

PrintOptions.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a PrintOptions object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

PrintOptions Object

Other resources

PrintOptions Object Members


ScaleEffect.Parent Property (PowerPoint)

 Copy code hover
[image]

ScaleEffect.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a ScaleEffect object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

ScaleEffect Object

Other resources

ScaleEffect Object Members


Application.AfterNewPresentation Event (PowerPoint)

 Copy code hover
[image]

Application.AfterNewPresentation Event (PowerPoint)
See also Send feedback

Published: July 16, 2012

Occurs after a presentation is created.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .AfterNewPresentation(Pres)

expression An expression that returns a Application object.

Parameters

Name | Required/Optional | Data Type | Description
Pres | Required | Presentation | Name of the presentation.

Example

This example uses the RGB function to set the slide master background color for the new presentation to salmon pink, and then applies the third color scheme to the new presentation.

VBA Copy code Copy code
Private Sub App_AfterNewPresentation(ByVal Pres As Presentation)

    With Pres

        Set CS3 = .ColorSchemes(3)

        CS3.Colors(ppBackground).RGB = RGB(240, 115, 100)

        .SlideMaster.ColorScheme = CS3

    End With

End Sub

See also

Concepts

Application Object

Other resources

Application Object Members


ChartTitle Methods (PowerPoint)

 Copy code hover
[image]

ChartTitle Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Delete | Deletes the object.
Select | Selects the object.


Broadcast.Resume Method (PowerPoint)

 Copy code hover
[image]

Broadcast.Resume Method (PowerPoint)
Send feedback

Resumes the specified broadcast.

Version information

Version Added: PowerPoint 2013

Syntax

expression .Resume

expression A variable that represents a Broadcast object.

Return value

VOID

Remarks

The Resume method returns an error (#4700) if the document is DRM protected, is already being broadcast (#4698), is not being broadcast at all (#4702), or has conflicting edits (is in merge mode, #4701).


BulletFormat.StartValue Property (PowerPoint)

 Copy code hover
[image]

BulletFormat.StartValue Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the beginning value of a bulleted list when the Type property of the BulletFormat object is set to ppBulletNumbered. Read/write.

Syntax

expression .StartValue

expression A variable that represents a BulletFormat object.

Return Value

Integer

Remarks

The value of the StartValue property must be in the range of 1 to 32767.

Example

This example sets the bullets in the text box specified by shape two on slide one to start with the number five.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(2).TextFrame

    With .TextRange.ParagraphFormat.Bullet

        .Type = ppBulletNumbered

        .StartValue = 5

    End With

End With

See also

Concepts

BulletFormat Object

Other resources

BulletFormat Object Members


TextFrame2.Column Property (PowerPoint)

 Copy code hover
[image]

TextFrame2.Column Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the Column object that represents the columns of the specified text frame. Read-only.

Syntax

expression .Column

expression An expression that returns a TextFrame2 object.

Example

The following example shows how to set the number of columns in the text frame of the first shape on slide one to 2.

VBA Copy code Copy code
Public Sub Column_Example()

    ActivePresentation.Slides(1).Shapes(1).TextFrame2.Column.Number = 2

End Sub

See also

Concepts

TextFrame2 Object

Other resources

TextFrame2 Object Members


Presentation.CreateVideo Method (PowerPoint)

 Copy code hover
[image]

Presentation.CreateVideo Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Creates a video in a Presentation object.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .CreateVideo(FileName, UseTimingsAndNarrations, DefaultSlideDuration, VertResolution, FramesPerSecond, Quality)

expression A variable that represents a Presentation object.

Parameters

Name | Required/Optional | Data Type | Description
FileName | Required | String | The name of the video file to create.
UseTimingsAndNarrations | Optional | Boolean | Indicates whether to use timings and narrations.
DefaultSlideDuration | Optional | [INT] | The duration, in seconds, to view the slide.
VertResolution | Optional | [INT] | The resolution of the slide.
FramesPerSecond | Optional | [INT] | The number of frames per second.
Quality | Optional | [INT] | The level of quality of the slide.

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


Guides.Parent Property (PowerPoint)

 Copy code hover
[image]

Guides.Parent Property (PowerPoint)
Send feedback

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2013

Syntax

expression .Parent

expression A variable that represents a Guides object.


Floor Properties (PowerPoint)

 Copy code hover
[image]

Floor Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Name | Returns the name of the object. Read-only String.
Parent | Returns the parent for the specified object. Read-only Object.
PictureType | Returns or sets a value that specifies how pictures are displayed on the walls and faces of a 3-D chart. Read/write Variant.
Thickness | Returns or sets the thickness of the floor. Read/write Long.


Pane Members (PowerPoint)

 Copy code hover
[image]

Pane Members (PowerPoint)
Send feedback

Published: July 16, 2012

An object representing one of the three panes in normal view or the single pane of any other view in the document window.

Methods

Name | Description
Activate | Activates the specified object.

Properties

Name | Description
Active | Returns whether the specified pane or window is active. Read-only.
Application | Returns an Application object that represents the creator of the specified object.
Parent | Returns the parent object for the specified object.
ViewType | Returns the type of view for the specified pane. Read-only.


TickLabels.MultiLevel Property (PowerPoint)

 Copy code hover
[image]

TickLabels.MultiLevel Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a value that indicates whether an axis is multilevel. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .MultiLevel

expression A variable that represents a TickLabels object.

Remarks

The default value for this property is True.

See also

Concepts

TickLabels Object

Other resources

TickLabels Object Members


Presentation.GetWorkflowTasks Method (PowerPoint)

 Copy code hover
[image]

Presentation.GetWorkflowTasks Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the Microsoft Office WorkflowTasks collection.

Syntax

expression .GetWorkflowTasks

expression An expression that returns a Presentation object.

Return Value

WorkFlowTasks

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


MsoAnimTextUnitEffect Enumeration (PowerPoint)

 Copy code hover
[image]

MsoAnimTextUnitEffect Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies how special effects are applied to the animation for the specified text during a slide show.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
msoAnimTextUnitEffectByCharacter | 1 | By character.
msoAnimTextUnitEffectByParagraph | 0 | By paragraph.
msoAnimTextUnitEffectByWord | 2 | By word.
msoAnimTextUnitEffectMixed | -1 | Mixed effect.


Hyperlinks Methods (PowerPoint)

 Copy code hover
[image]

Hyperlinks Methods (PowerPoint)
Send feedback

Published: July 12, 2012

This object has the following methods:

Methods

Name | Description
Item | Returns a single Hyperlink object from the specified Hyperlinks collection.


Timing.TriggerBookmark Property (PowerPoint)

 Copy code hover
[image]

Timing.TriggerBookmark Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Read/write

Version Information

Version Added: PowerPoint 2010

Syntax

expression .triggerBookmark

expression A variable that represents a Timing object.

See also

Concepts

Timing Object

Other resources

Timing Object Members


SlideRange.SlideIndex Property (PowerPoint)

 Copy code hover
[image]

SlideRange.SlideIndex Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the index number of the specified slide within the Slides collection. Read-only.

Syntax

expression .SlideIndex

expression A variable that represents a SlideRange object.

Return Value

Long

Remarks

Unlike the SlideID property, the SlideIndex property of a Slide object can change when you add slides to the presentation or rearrange the slides in the presentation. Therefore, using the FindBySlideID method with the slide's ID number can be a more reliable way to return a specific Slide object from a Slides collection than using the Item method with the slide's index number.

Example

This example displays the index number of the currently displayed slide in slide show window one.

VBA Copy code Copy code
MsgBox SlideShowWindows(1).View.Slide.SlideIndex

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


ChartGroup.HasDropLines Property (PowerPoint)

 Copy code hover
[image]

ChartGroup.HasDropLines Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if the line chart or area chart has drop lines. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .HasDropLines

expression A variable that represents a ChartGroup object.

Remarks

This property applies only to line and area charts.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example enables drop lines for chart group one of the first chart in the active document and then sets their line style, weight, and color. You should run the example on a 2-D line chart that has one series.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.ChartGroups(1)

            .HasDropLines = True

            With .DropLines.Border

                .LineStyle = xlThin

                .Weight = xlMedium

                .ColorIndex = 3

            End With

        End With

    End If

End With

See also

Concepts

ChartGroup Object

Other resources

ChartGroup Object Members


ShapeRange.Glow Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.Glow Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the glow format for the specified range of shapes. Read-only.

Syntax

expression .Glow

expression A variable that represents a ShapeRange object.

Return Value

MsoGlowType

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


ChartTitle.IncludeInLayout Property (PowerPoint)

 Copy code hover
[image]

ChartTitle.IncludeInLayout Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if a chart title will occupy the chart layout space when a chart layout is being determined. The default is True. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .IncludeInLayout

expression An expression that returns a ChartTitle object.

Remarks

This property does not affect whether a chart is in autolayout mode or not. If the user adds a title by using the Above Chart command, the chart will resize smaller, as in previous versions of Microsoft Office. If the user then removes the title or selects one of the overlay title options, the chart will resize larger, as if the title were not on the chart.

See also

Concepts

ChartTitle Object

Other resources

ChartTitle Object Members


MediaBookmark.Delete Method (PowerPoint)

 Copy code hover
[image]

MediaBookmark.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the bookmark from the collection.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Delete

expression A variable that represents a MediaBookmark object.

Return Value

None

See also

Concepts

MediaBookmark Object

Other resources

MediaBookmark Object Members


Trendline.Forward2 Property (PowerPoint)

 Copy code hover
[image]

Trendline.Forward2 Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the number of periods (or units on a scatter chart) that the trendline extends forward. Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Forward2

expression A variable that represents a Trendline object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the number of units that the trendline for the first chart in the active document extends forward and backward. You should run the example on a 2-D column chart that contains a single series that has a trendline.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.SeriesCollection(1).Trendlines(1)

            .Forward2 = 5

            .Backward2 = .5

        End With

    End If

End With

See also

Concepts

Trendline Object

Other resources

Trendline Object Members


GroupShapes.Range Method (PowerPoint)

 Copy code hover
[image]

GroupShapes.Range Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a ShapeRange object.

Syntax

expression .Range(Index)

expression A variable that represents a GroupShapes object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Variant | The individual shapes that are to be included in the range. Can be an Integer that specifies the index number of the shape, a String that specifies the name of the shape, or an array that contains either integers or strings. If this argument is omitted, the Range method returns all the objects in the specified collection.

Return Value

ShapeRange

Remarks

Although you can use the Range method to return any number of shapes or slides, it is simpler to use the Item method if you only want to return a single member of the collection. For example, Shapes(1) is simpler than Shapes.Range(1), and Slides(2) is simpler than Slides.Range(2).

To specify an array of integers or strings for Index, you can use the Array function. For example, the following instruction returns two shapes specified by name.

Dim myArray() As Variant, myRange As Object myArray = Array("Oval 4", "Rectangle 5") Set myRange = ActivePresentation.Slides(1).Shapes.Range(myArray)

See also

Concepts

GroupShapes Object

Other resources

GroupShapes Object Members


CategoryCollection Methods (PowerPoint)

 Copy code hover
[image]

CategoryCollection Methods (PowerPoint)
Send feedback

This object has the following methods:

Methods

Name | Description
Item | Returns an individual chart category.


ConnectorFormat.BeginConnect Method (PowerPoint)

 Copy code hover
[image]

ConnectorFormat.BeginConnect Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Attaches the beginning of the specified connector to a specified shape.

Syntax

expression .BeginConnect(ConnectedShape, ConnectionSite)

expression A variable that represents a ConnectorFormat object.

Parameters

Name | Required/Optional | Data Type | Description
ConnectedShape | Required | Shape | The shape to attach the beginning of the connector to. The specified Shape object must be in the same Shapes collection as the connector.
ConnectionSite | Required | Long | A connection site on the shape specified by ConnectedShape. Must be an integer between 1 and the integer returned by the ConnectionSiteCount property of the specified shape. If you want the connector to automatically find the shortest path between the two shapes it connects, specify any valid integer for this argument and then use the RerouteConnections method after the connector is attached to shapes at both ends.

Remarks

If there's already a connection between the beginning of the connector and another shape, that connection is broken. If the beginning of the connector isn't already positioned at the specified connecting site, this method moves the beginning of the connector to the connecting site and adjusts the size and position of the connector. Use the EndConnect method to attach the end of the connector to a shape.

When you attach a connector to an object, the size and position of the connector are automatically adjusted, if necessary.

Example

This example adds two rectangles to the first slide in the active presentation and connects them with a curved connector. Notice that the RerouteConnections method makes it irrelevant what values you supply for the ConnectionSite arguments used with the BeginConnect and EndConnect methods.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

Set s = myDocument.Shapes

Set firstRect = s.AddShape(msoShapeRectangle, 100, 50, 200, 100)

Set secondRect = s.AddShape(msoShapeRectangle, 300, 300, 200, 100)

With s.AddConnector(msoConnectorCurve, 0, 0, 100, 100) _

        .ConnectorFormat

    .BeginConnect ConnectedShape:=firstRect, ConnectionSite:=1

    .EndConnect ConnectedShape:=secondRect, ConnectionSite:=1

    .Parent.RerouteConnections

End With

See also

Concepts

ConnectorFormat Object

Other resources

ConnectorFormat Object Members


PrintOptions.Ranges Property (PowerPoint)

 Copy code hover
[image]

PrintOptions.Ranges Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the PrintRanges object, which represents the ranges of slides in the presentation to be printed. Read-only.

Syntax

expression .Ranges

expression A variable that represents a PrintOptions object.

Return Value

PrintRanges

Remarks

If you don't want to print an entire presentation, you must use the Add method to create a PrintRange object for each consecutive run of slides you want to print. For example, if you want to print slide 1, slides 3 through 5, and slides 8 and 9 in a specified presentation, you must create three PrintRange objects: one that represents slide 1; one that represents slides 3 through 5; and one that represents slides 8 and 9. For more information, see the example for this property.

The RangeType property must be set to ppPrintSlideRange for the ranges in the PrintRanges collection to be applied.

To clear all the existing print ranges from the PrintRanges collection, use the ClearAll method.

Specifying a value for the To and From arguments of the PrintOut method sets the contents of the PrintRanges object.

Example

This example prints slide 1, slides 3 through 5, and slides 8 and 9 in the active presentation.

VBA Copy code Copy code
With ActivePresentation

    With .PrintOptions

        .RangeType = ppPrintSlideRange

        With .Ranges

            .Add 1, 1

            .Add 3, 5

            .Add 8, 9

        End With

    End With

    .PrintOut

End With

See also

Concepts

PrintOptions Object

Other resources

PrintOptions Object Members


ChartBorder.Application Property (PowerPoint)

 Copy code hover
[image]

ChartBorder.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents a ChartBorder object.

See also

Concepts

ChartBorder Object

Other resources

ChartBorder Object Members


Chart.Creator Property (PowerPoint)

 Copy code hover
[image]

Chart.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents a Chart object.

See also

Concepts

Chart Object

Other resources

Chart Object Members


PpProtectedViewCloseReason Enumeration (PowerPoint)

 Copy code hover
[image]

PpProtectedViewCloseReason Enumeration (PowerPoint)
Send feedback

Specifies the reason why protected view is being closed.

Version information

Version Added: PowerPoint 2013

Members

Name | Value | Description
ppProtectedViewCloseNormal | 0 | Protected view is being closed normally.
ppProtectedViewCloseEdit | 1 | Protected view is being closed so that the presentation can be edited.
ppProtectedViewCloseForced | 2 | Protected view is forced closed.
ppProtectedViewCloseEdit | 1 |
ppProtectedViewCloseForced | 2 |
ppProtectedViewCloseNormal | 0 |


Theme Properties (PowerPoint)

 Copy code hover
[image]

Theme Properties (PowerPoint)
Send feedback

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Parent | Returns the parent for the specified object. Read-only Object.
ThemeVariants | Returns a ThemeVariants collection that represents the variations in the theme.


PrintOptions.sectionIndex Property (PowerPoint)

 Copy code hover
[image]

PrintOptions.sectionIndex Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the index of the selected section in the PrintOptions object. Read/write.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .sectionIndex

expression A variable that represents a PrintOptions object.

Return Value

Single

See also

Concepts

PrintOptions Object

Other resources

PrintOptions Object Members


Presentation.BuiltInDocumentProperties Property (PowerPoint)

 Copy code hover
[image]

Presentation.BuiltInDocumentProperties Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a DocumentProperties collection that represents all the built-in document properties for the specified presentation. Read-only.

Syntax

expression .BuiltInDocumentProperties

expression A variable that represents a Presentation object.

Return Value

DocumentProperties

Remarks

Use the CustomDocumentProperties property to return the collection of custom document properties.

For information about returning a single member of a collection, see Returning an Object from a Collection.

Example

This example displays the names of all the built-in document properties for the active presentation.

VBA Copy code Copy code
For Each p In Application.ActivePresentation _

        .BuiltInDocumentProperties

    bidpList = bidpList & p.Name & Chr$(13)

Next

MsgBox bidpList

This example sets the "Category" built-in property for the active presentation if the author of the presentation is Jake Jarmel.

VBA Copy code Copy code
With Application.ActivePresentation.BuiltInDocumentProperties

    If .Item("author").Value = "Jake Jarmel" Then

        .Item("category").Value = "Creative Writing"

    End If

End With

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


ShapeNodes.Item Method (PowerPoint)

 Copy code hover
[image]

ShapeNodes.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single ShapeNode object from the specified ShapeNodes collection.

Syntax

expression .Item(Index)

expression A variable that represents a ShapeNodes object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Variant | The name or index number of the single ShapeNode object in the collection to be returned.

Return Value

ShapeNode

See also

Concepts

ShapeNodes Object

Other resources

ShapeNodes Object Members


PrintOptions.HandoutOrder Property (PowerPoint)

 Copy code hover
[image]

PrintOptions.HandoutOrder Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the page layout order in which slides appear on printed handouts that show multiple slides on one page. Read/write.

Syntax

expression .HandoutOrder

expression A variable that represents a PrintOptions object.

Return Value

PpPrintHandoutOrder

Remarks

The value of the HandoutOrder property can be one of these PpPrintHandoutOrder constants.

Constant | Description
ppPrintHandoutHorizontalFirst | Slides are ordered horizontally, with the first slide in the upper-left corner and the second slide to the right of it. If your language setting specifies a right-to-left language, the first slide is in the upper-right corner with the second slide to the left of it.
ppPrintHandoutVerticalFirst | Slides are ordered vertically, with the first slide in the upper-left corner and the second slide below it. If your language setting specifies a right-to-left language, the first slide is in the upper-right corner with the second slide below it.

Example

This example sets handouts of the active presentation to contain six slides per page, orders the slides horizontally on the handouts, and prints them.

VBA Copy code Copy code
With ActivePresentation

    .PrintOptions.OutputType = ppPrintOutputSixSlideHandouts

    .PrintOptions.HandoutOrder = ppPrintHandoutHorizontalFirst

    .PrintOut

End With

See also

Concepts

PrintOptions Object

Other resources

PrintOptions Object Members


SlideRange.SlideShowTransition Property (PowerPoint)

 Copy code hover
[image]

SlideRange.SlideShowTransition Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a SlideShowTransition object that represents the special effects for the specified slide transition. Read-only.

Syntax

expression .SlideShowTransition

expression A variable that represents a SlideRange object.

Return Value

SlideShowTransition

Example

This example sets slide two in the active presentation to advance automatically after 5 seconds during a slide show and to play a dog bark sound at the slide transition.

VBA Copy code Copy code
With ActivePresentation.Slides(2).SlideShowTransition

    .AdvanceOnTime = True

    .AdvanceTime = 5

    .SoundEffect.ImportFromFile "c:\windows\media\dogbark.wav"

End With

ActivePresentation.SlideShowSettings.AdvanceMode = _

    ppSlideShowUseSlideTimings

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


Presentation.SnapToGrid Property (PowerPoint)

 Copy code hover
[image]

Presentation.SnapToGrid Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether to snap shapes to the gridlines in the specified presentation. Read/write.

Syntax

expression .SnapToGrid

expression A variable that represents a Presentation object.

Return Value

MsoTriState

Remarks

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

msoFalse

msoTrue

Example

This example switches snapping shapes to the gridlines in the active presentation.

VBA Copy code Copy code
Sub ToggleSnapToGrid()

    With ActivePresentation

        If .SnapToGrid = msoTrue Then

            .SnapToGrid = msoFalse

        Else

            .SnapToGrid = msoTrue

        End If

    End With

End Sub

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


TextFrame2.NoTextRotation Property (PowerPoint)

 Copy code hover
[image]

TextFrame2.NoTextRotation Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Indicates whether to rotate text with the TextFrame2 rotation. One of the MsoTriState constants. Read/write.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .NoTextRotation

expression A variable that represents a TextFrame2 object.

Remarks

If MsoTriState is set to msoTrue, the text remains horizontal.

See also

Concepts

TextFrame2 Object

Other resources

TextFrame2 Object Members


Floor.ClearFormats Method (PowerPoint)

 Copy code hover
[image]

Floor.ClearFormats Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Clears the formatting of the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ClearFormats

expression A variable that represents a Floor object.

See also

Concepts

Floor Object

Other resources

Floor Object Members


Player.GoToPreviousBookmark Method (PowerPoint)

 Copy code hover
[image]

Player.GoToPreviousBookmark Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Goes to the previous bookmark.

Syntax

expression .GoToPreviousBookmark

expression A variable that represents a Player object.

See also

Concepts

Player Object

Other resources

Player Object Members


SlideRange.Copy Method (PowerPoint)

 Copy code hover
[image]

SlideRange.Copy Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Copies the specified object to the Clipboard.

Syntax

expression .Copy

expression A variable that represents a SlideRange object.

Remarks

Use the Paste method to paste the contents of the Clipboard.

Example

This example copies slide one in the active presentation to the Clipboard.

VBA Copy code Copy code
ActivePresentation.Slides(1).Copy

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


PictureFormat.Creator Property (PowerPoint)

 Copy code hover
[image]

PictureFormat.Creator Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.

Syntax

expression .Creator

expression A variable that represents a PictureFormat object.

Return Value

Long

Remarks

The Creator property is designed to be used in Microsoft Office applications for the Macintosh.

Example

This example displays a message about the creator of myObject.

VBA Copy code Copy code
Set myObject = Application.ActivePresentation.Slides(1).Shapes(1)

If myObject.Creator = &h50575054 Then

    MsgBox "This is a PowerPoint object"

Else

    MsgBox "This is not a PowerPoint object"

End If

See also

Concepts

PictureFormat Object

Other resources

PictureFormat Object Members


Application.Quit Method (PowerPoint)

 Copy code hover
[image]

Application.Quit Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Quits Microsoft PowerPoint. This is equivalent to clicking the Office button and then clicking Exit PowerPoint.

Syntax

expression .Quit

expression A variable that represents an Application object.

Remarks

To avoid being prompted to save changes, use either the Save or SaveAs method to save all open presentations before calling the Quit method.

Example

This example saves all open presentations and then quits PowerPoint.

VBA Copy code Copy code
With Application

    For Each w In .Presentations

        w.Save

    Next w

    .Quit

End With

See also

Concepts

Application Object

Other resources

Application Object Members


ProtectedViewWindows.Parent Property (PowerPoint)

 Copy code hover
[image]

ProtectedViewWindows.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object. Read-only.

Syntax

expression .Parent

expression A variable that represents a ProtectedViewWindows object.

See also

Concepts

ProtectedViewWindows Object

Other resources

ProtectedViewWindows Object Members


Shape.OLEFormat Property (PowerPoint)

 Copy code hover
[image]

Shape.OLEFormat Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns an OLEFormat object that contains OLE formatting properties for the specified shape. Applies to Shape or ShapeRange objects that represent OLE objects. Read-only.

Syntax

expression .OLEFormat

expression A variable that represents a Shape object.

Return Value

OLEFormat

Example

This example loops through all the objects on all the slides in the active presentation and sets all linked Microsoft Word documents to be updated manually.

VBA Copy code Copy code
For Each sld In ActivePresentation.Slides

    For Each sh In sld.Shapes

        If sh.Type = msoLinkedOLEObject Then

            If sh.OLEFormat.ProgID = "Word.Document" Then

                sh.LinkFormat.AutoUpdate = ppUpdateOptionManual

            End If

        End If

    Next

Next

See also

Concepts

Shape Object

Other resources

Shape Object Members


ShapeRange.Nodes Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.Nodes Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a ShapeNodes collection that represents the geometric description of the specified shape. Applies to ShapeRange objects that represent freeform drawings.

Syntax

expression .Nodes

expression A variable that represents a ShapeRange object.

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


ShapeRange.Duplicate Method (PowerPoint)

 Copy code hover
[image]

ShapeRange.Duplicate Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Creates a duplicate of the specified ShapeRange object, adds the range of shapes to the Shapes collection, and then returns the new ShapeRange object. The duplicated objects are placed at the end of the Shapes collection.

Syntax

expression .Duplicate

expression A variable that represents a ShapeRange object.

Return Value

ShapeRange

Example

This example adds a new, blank slide at the end of the active presentation, adds a diamond shape to the new slide, duplicates the diamond, and then sets properties for the duplicate. The first diamond will have the default fill color for the active color scheme; the second diamond will be offset from the first one and will have the default shadow color.

VBA Copy code Copy code
Set mySlides = ActivePresentation.Slides

Set newSlide = mySlides.Add(mySlides.Count + 1, ppLayoutBlank)

Set firstObj = newSlide.Shapes _

    .AddShape(msoShapeDiamond, 10, 10, 250, 350)

With firstObj.Duplicate

    .Left = 150

    .Fill.ForeColor.SchemeColor = ppShadow

End With

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


TabStop Methods (PowerPoint)

 Copy code hover
[image]

TabStop Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Clear | Clears the specified tab stop from the ruler and deletes it from the TabStops collection.


Tags.Name Method (PowerPoint)

 Copy code hover
[image]

Tags.Name Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the name of the specified tag as a String.

Syntax

expression .Name(Index)

expression A variable that represents a Tags object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Long | The tag number.

Return Value

String

Example

This example displays the name and value for each tag associated with slide one in the active presentation.

VBA Copy code Copy code
With Application.ActivePresentation.Slides(1).Tags

    For i = 1 To .Count

        MsgBox "Tag #" & i & ": Name = " & .Name(i)

        MsgBox "Tag #" & i & ": Value = " & .Value(i)

    Next

End With

This example searches through the tags for each slide in the active presentation. If there is a tag named "PRIORITY," a message box displays the tag value. If there is no tag named "PRIORITY," the example adds this tag, giving it the value "Unknown."

VBA Copy code Copy code
For Each s In Application.ActivePresentation.Slides

    With s.Tags

        found = False

        For i = 1 To .Count

            If .Name(i) = "PRIORITY" Then

                found = True

                slNum = .Parent.SlideIndex

                MsgBox "Slide " & slNum & _

                    " priority: " & .Value(i)

            End If

        Next

        If Not found Then

            slNum = .Parent.SlideIndex

            .Add "Name", "New Figures"

            .Add "Priority", "Unknown"

            MsgBox "Slide " & slNum & _

                " priority tag added: Unknown"

        End If

    End With

Next

See also

Concepts

Tags Object

Other resources

Tags Object Members


HeaderFooter.UseFormat Property (PowerPoint)

 Copy code hover
[image]

HeaderFooter.UseFormat Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the date and time object contains automatically updated information. Read/write.

Syntax

expression .UseFormat

expression A variable that represents an HeaderFooter object.

Return Value

MsoTriState

Remarks

This property applies only to a HeaderFooter object that represents a date and time (returned by the DateAndTime property). Set the UseFormat property of a date and time HeaderFooter object to True when you want to set or return the date and time format by using the Format property. Set the UseFormat property to msoFalse when you want to set or return the text string for the fixed date and time.

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

Constant | Description
msoFalse | The date and time object is a fixed string.
msoTrue | The date and time object contains automatically updated information.

Example

This example sets the date and time for the slide master of the active presentation to be updated automatically and then it sets the date and time format to show hours, minutes, and seconds.

VBA Copy code Copy code
Set myPres = Application.ActivePresentation

With myPres.SlideMaster.HeadersFooters.DateAndTime

    .UseFormat = msoTrue

    .Format = ppDateTimeHmmss

End With

See also

Concepts

HeaderFooter Object

Other resources

HeaderFooter Object Members


Sequence.ConvertToAnimateInReverse Method (PowerPoint)

 Copy code hover
[image]

Sequence.ConvertToAnimateInReverse Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether text will be animated in reverse order. Returns an Effect object representing the text animation.

Syntax

expression .ConvertToAnimateInReverse(Effect, animateInReverse)

expression A variable that represents a Sequence object.

Parameters

Name | Required/Optional | Data Type | Description
Effect | Required | Effect | The animation effect to which the reversal will apply.
animateInReverse | Required | MsoTriState | Determines the text animation order.

Return Value

Effect

Example

This example creates a shape with text on a slide and adds a random animation to the shape, ensuring the shape's text animates in reverse.

VBA Copy code Copy code
Sub AnimateInReverse()

    Dim sldActive As Slide
    Dim timeMain As TimeLine
    Dim shpRect As Shape

    ' Create a slide, add a rectangular shape to the slide, and
    ' access the slide's animation timeline.
    With ActivePresentation
        Set sldActive = .Slides.Add(Index:=1, Layout:=ppLayoutBlank)
        Set shpRect = sldActive.Shapes.AddShape(Type:=msoShapeRectangle, _
            Left:=100, Top:=100, Width:=300, Height:=150)
        Set timeMain = sldActive.TimeLine
    End With

    shpRect.TextFrame.TextRange.Text = "This is a rectangle."

    ' Add a random animation effect to the rectangle,
    ' and animate the text in reverse.
    With timeMain.MainSequence
        .ConvertToAnimateInReverse _
            Effect:=.AddEffect(Shape:=shpRect, effectId:=msoAnimEffectRandom), _
            AnimateInReverse:=msoTrue
    End With

End Sub

See also

Concepts

Sequence Object

Other resources

Sequence Object Members


ChartArea.Top Property (PowerPoint)

 Copy code hover
[image]

ChartArea.Top Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the distance, in points, from the top edge of the object to the top of row 1 (on a worksheet) or the top of the chart area (on a chart). Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Top

expression A variable that represents a ChartArea object.

See also

Concepts

ChartArea Object

Other resources

ChartArea Object Members


Trendline.DisplayEquation Property (PowerPoint)

 Copy code hover
[image]

Trendline.DisplayEquation Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if the equation for the trendline is displayed on the chart (in the same data label as the R-squared value). Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .DisplayEquation

expression A variable that represents a Trendline object.

Remarks

Setting this property to True automatically enables data labels.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example displays the R-squared value and equation for the first trendline of the first chart in the active document. You should run the example on a 2-D column chart that has a trendline for the first series.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.SeriesCollection(1).Trendlines(1)

            .DisplayRSquared = True

            .DisplayEquation = True

        End With

    End If

End With

See also

Concepts

Trendline Object

Other resources

Trendline Object Members


DataLabel.Formula Property (PowerPoint)

 Copy code hover
[image]

DataLabel.Formula Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets the object's formula in A1-style notation. Read/write.

Syntax

expression .Formula

expression A variable that represents a DataLabel object.

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


Slides.Item Method (PowerPoint)

 Copy code hover
[image]

Slides.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single Slide object from the specified Slides collection.

Syntax

expression .Item(Index)

expression A variable that represents a Slides object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Variant | The name or index number of the single Slide object in the collection to be returned.

Return Value

Slide

See also

Concepts

Slides Object

Other resources

Slides Object Members


GroupShapes Object (PowerPoint)

 Copy code hover
[image]

GroupShapes Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the individual shapes within a grouped shape. Each shape is represented by a Shape object. Using the Item method with this object, you can work with single shapes within a group without having to ungroup them.

Example

Use the GroupItems property to return the GroupShapes collection. Use GroupItems(index), where index is the number of the individual shape within the grouped shape, to return a single shape from the GroupShapes collection. The following example adds three triangles to myDocument, groups them, sets a color for the entire group, and then changes the color for the second triangle only.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    .AddShape(msoShapeIsoscelesTriangle, 10, _

        10, 100, 100).Name = "shpOne"

    .AddShape(msoShapeIsoscelesTriangle, 150, _

        10, 100, 100).Name = "shpTwo"

    .AddShape(msoShapeIsoscelesTriangle, 300, _

        10, 100, 100).Name = "shpThree"

    With .Range(Array("shpOne", "shpTwo", "shpThree")).Group

        .Fill.PresetTextured msoTextureBlueTissuePaper

        .GroupItems(2).Fill.PresetTextured msoTextureGreenMarble

    End With

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

GroupShapes Object Members


Table.AlternativeText Property (PowerPoint)

 Copy code hover
[image]

Table.AlternativeText Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the alternative text associated with a shape in a Web presentation. Read/write.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .AlternativeText

expression A variable that represents a Table object.

Example

The following example sets the alternative text for the selected shape in the active window. The selected shape is a picture of a mallard duck.

VBA Copy code Copy code
ActiveWindow.Selection.ShapeRange.AlternativeText = "This is a mallard duck."

See also

Concepts

Table Object

Other resources

Table Object Members


AddIn.Parent Property (PowerPoint)

 Copy code hover
[image]

AddIn.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents an AddIn object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

AddIn Object

Other resources

AddIn Object Members


Welcome to the PowerPoint 2013 developer reference

 Copy code hover
[image]

Welcome to the PowerPoint 2013 developer reference
Send feedback

This reference contains conceptual overviews, programming tasks, samples, and references to guide you in developing solutions based on PowerPoint 2013.

We welcome your comments or questions about this content. You can send feedback to docthis@microsoft.com.

Initial publication: July 2012 | Updated: March 2013

This documentation contains the following sections:

  • Concepts: Provides important concepts for developing custom PowerPoint solutions.

  • How do I: Provides a list of how-to topics for developing custom PowerPoint solutions.

  • Reference: Provides reference materials for the PowerPoint object model.

Additional resources

  • PowerPoint Developer Center

  • Accessibility in Microsoft Products

  • Document Conventions

  • PowerPoint 2013 developer reference copyright notice

  • Microsoft Online Privacy Notice


ChartTitle.Format Property (PowerPoint)

 Copy code hover
[image]

ChartTitle.Format Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Format

expression A variable that represents a ChartTitle object.

See also

Concepts

ChartTitle Object

Other resources

ChartTitle Object Members


DataLabels.Orientation Property (PowerPoint)

 Copy code hover
[image]

DataLabels.Orientation Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the text orientation. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Orientation

expression A variable that represents a DataLabels object.

Remarks

The value of this property can be an integer from -90 through 90 degrees or one of the XlOrientation constants.

See also

Concepts

DataLabels Object

Other resources

DataLabels Object Members


Point.Application Property (PowerPoint)

 Copy code hover
[image]

Point.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents a Point object.

See also

Concepts

Point Object

Other resources

Point Object Members


Axes Properties (PowerPoint)

 Copy code hover
[image]

Axes Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Count | Returns the number of objects in the collection. Read-only Long.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Parent | Returns the parent for the specified object. Read-only Object.


CustomLayout Methods (PowerPoint)

 Copy code hover
[image]

CustomLayout Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Copy | Copies the specified object to the Clipboard.
Cut | Deletes the specified object and places it on the Clipboard.
Delete | Deletes the specified object.
Duplicate | Creates a duplicate of the specified custom layout, adds the new custom layout to the CustomLayouts collection immediately after the original custom layout, and returns a CustomLayout object that represents the duplicate layout.
MoveTo | Moves the specified CustomLayout object to a different position in the CustomLayouts collection.
Select | Selects the specified CustomLayout object.


FillFormat Properties (PowerPoint)

 Copy code hover
[image]

FillFormat Properties (PowerPoint)
Send feedback

Published: July 12, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
BackColor | Returns or sets a ColorFormat object that represents the background color for the specified fill or patterned line. Read/write.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
ForeColor | Returns or sets a ColorFormat object that represents the foreground color for the fill, line, or shadow. Read/write.
GradientAngle | Returns or sets the angle of the gradient fill for the specified fill format. Read/write.
GradientColorType | Returns the gradient color type for the specified fill. Read-only.
GradientDegree | Returns a value that indicates how dark or light a one-color gradient fill is. Read-only.
GradientStops | Returns the GradientStops collection associated with the specified fill format. Read-only.
GradientStyle | Returns the gradient style for the specified fill. Read-only.
GradientVariant | Returns the gradient variant for the specified fill as an integer value from 1 to 4 for most gradient fills. Read-only.
Parent | Returns the parent object for the specified object.
Pattern | Sets or returns a value that represents the pattern applied to the specified fill. Read-only.
PictureEffects | Returns an object that represents the picture or texture fill for the specified fill format. Read-only.
PresetGradientType | Returns the preset gradient type for the specified fill. Read-only.
PresetTexture | Returns the preset texture for the specified fill. Read-only.
RotateWithObject | Returns or sets whether the fill rotates with the specified shape. Read/write.
TextureAlignment | Returns or sets the alignment (the origin of the coordinate grid) for the tiling of the texture fill. Read/write.
TextureHorizontalScale | Returns or sets the horizontal scaling factor for the texture fill. Read/write.
TextureName | Returns the name of the custom texture file for the specified fill. Read-only.
TextureOffsetX | Returns or sets the horizontal offset of the texture from the origin in points. Read/write.
TextureOffsetY | Returns or sets the vertical offset of the texture from the origin in points. Read/write.
TextureTile | Returns or sets whether the texture fill is tiled or centered. Read/write.
TextureType | Returns the texture type for the specified fill. Read-only.
TextureVerticalScale | Returns or sets the vertical scaling factor for the texture fill. Read/write.
Transparency | Returns or sets the degree of transparency of the specified fill, shadow, or line as a value between 0.0 (opaque) and 1.0 (clear). Read/write.
Type | Represent the type of fill. Read-only.
Visible | Returns or sets the visibility of the specified object or the formatting applied to the specified object. Read/write.


Ruler Object (PowerPoint)

 Copy code hover
[image]

Ruler Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the ruler for the text in the specified shape or for all text in the specified text style. Contains tab stops and the indentation settings for text outline levels.

Example

Use the Ruler property of the TextFrame object to return the Ruler object that represents the ruler for the text in the specified shape. Use the TabStops property to return the TabStops object that contains the tab stops on the ruler. Use the Levels property to return the RulerLevels object that contains the indentation settings for text outline levels. The following example sets a left-aligned tab stop at 2 inches (144 Points) and sets a hanging indent for the text in object two on slide one in the active presentation.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(2).TextFrame.Ruler

    .TabStops.Add ppTabStopLeft, 144

    .Levels(1).FirstMargin = 0

    .Levels(1).LeftMargin = 36

End With

Use the Ruler property of the TextStyle object to return the Ruler object that represents the ruler for one of the four defined text styles (title text, body text, notes text, or default text). The following example sets the first-line indent and hanging indent for outline level one in body text on the slide master for the active presentation.

VBA Copy code Copy code
With ActivePresentation.SlideMaster _

        .TextStyles(ppBodyStyle).Ruler.Levels(1)

    .FirstMargin = 9

    .LeftMargin = 54

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

Ruler Object Members


PictureFormat.CropTop Property (PowerPoint)

 Copy code hover
[image]

PictureFormat.CropTop Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the number of points that are cropped off the top of the specified picture or OLE object. Read/write.

Syntax

expression .CropTop

expression A variable that represents a PictureFormat object.

Return Value

Single

Remarks

Cropping is calculated relative to the original size of the picture. For example, if you insert a picture that is originally 100 points high, rescale it so that it is 200 points high, and then set the CropTop property to 50, 100 points (not 50) will be cropped off the top of your picture.

Example

This example crops 20 points off the top of shape three on myDocument. For the example to work, shape three must be either a picture or an OLE object.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes(3).PictureFormat.CropTop = 20

This example crops the percentage specified by the user off the top of the selected shape, regardless of whether the shape has been scaled. For the example to work, the selected shape must be either a picture or an OLE object.

VBA Copy code Copy code
percentToCrop = InputBox("What percentage do you " & _

    "want to crop off the top of this picture?")

Set shapeToCrop = ActiveWindow.Selection.ShapeRange(1)

With shapeToCrop.Duplicate

    .ScaleHeight 1, True

    origHeight = .Height

    .Delete

End With

cropPoints = origHeight * percentToCrop / 100

shapeToCrop.PictureFormat.CropTop = cropPoints

See also

Concepts

PictureFormat Object

Other resources

PictureFormat Object Members


Pane.Application Property (PowerPoint)

 Copy code hover
[image]

Pane.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a Pane object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

Pane Object

Other resources

Pane Object Members


TextStyleLevels Object (PowerPoint)

 Copy code hover
[image]

TextStyleLevels Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

A collection of all the outline text levels. This collection always contains five members, each of which is represented by a TextStyleLevel object.

Example

Use Levels(index), where index is a number from 1 through 5 that corresponds to the outline level, to return a single TextStyleLevel object. The following example sets the font name and font size for level-one body text on all the slides in the active presentation.

VBA Copy code Copy code
With ActivePresentation.SlideMaster _

        .TextStyles(ppBodyStyle).Levels(1)

    With .Font

        .Name = "Arial"

        .Size = 36

    End With

End With

The following example sets the font size for text at each outline level for the notes body area on all the notes pages in the active presentation.

VBA Copy code Copy code
With ActivePresentation.NotesMaster.TextStyles(ppBodyStyle).Levels

    .Item(1).Font.Size = 34

    .Item(2).Font.Size = 30

    .Item(3).Font.Size = 25

    .Item(4).Font.Size = 20

    .Item(5).Font.Size = 15

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

TextStyleLevels Object Members


AnimationPoints.Item Method (PowerPoint)

 Copy code hover
[image]

AnimationPoints.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single AnimationPoint object from the specified AnimationPoints collection.

Syntax

expression .Item(Index)

expression A variable that represents an AnimationPoints object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Long | The index number of the single AnimationPoint object in the collection to be returned.

Return Value

AnimationPoint

See also

Concepts

AnimationPoints Object

Other resources

AnimationPoints Object Members


SlideShowWindow.Left Property (PowerPoint)

 Copy code hover
[image]

SlideShowWindow.Left Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a Single that represents the distance in points from the left edge of the document, application, and slide show windows to the left edge of the application window's client area. Setting this property to a very large positive or negative value may position the window completely off the desktop. Read/write.

Syntax

expression .Left

expression A variable that represents a SlideShowWindow object.

See also

Concepts

SlideShowWindow Object

Other resources

SlideShowWindow Object Members


Comments.Parent Property (PowerPoint)

 Copy code hover
[image]

Comments.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a Comments object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

Comments Object

Other resources

Comments Object Members


FillFormat.GradientStyle Property (PowerPoint)

 Copy code hover
[image]

FillFormat.GradientStyle Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the gradient style for the specified fill. Read-only.

Syntax

expression .GradientStyle

expression A variable that represents a FillFormat object.

Return Value

MsoGradientStyle

Remarks

Use the OneColorGradient, PresetGradient, or TwoColorGradient method to set the gradient style for the fill. Attempting to return this property for a fill that doesn't have a gradient generates an error. Use the Type property to determine whether the fill has a gradient.

The value returned by the GradientStyle property can be one of these MsoGradientStyle constants.

msoGradientDiagonalDown

msoGradientDiagonalUp

msoGradientFromCenter

msoGradientFromCorner

msoGradientFromTitle

msoGradientHorizontal

msoGradientMixed

msoGradientVertical

Example

This example adds a rectangle to myDocument and sets its fill gradient style to match that of the shape named "rect1." For the example to work, rect1 must have a gradient fill.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    gradStyle1 = .Item("rect1").Fill.GradientStyle

    With .AddShape(msoShapeRectangle, 0, 0, 40, 80).Fill

        .ForeColor.RGB = RGB(128, 0, 0)

        .OneColorGradient gradStyle1, 1, 1

    End With

End With

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


Floor Methods (PowerPoint)

 Copy code hover
[image]

Floor Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
ClearFormats | Clears the formatting of the object.
Paste | Pastes a picture from the Clipboard on the floor of the specified chart.
Select | Selects the object.


TabStop Members (PowerPoint)

 Copy code hover
[image]

TabStop Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a single tab stop. The TabStop object is a member of the TabStops collection. The TabStops collection represents all the tab stops on one ruler.

Methods

Name | Description
Clear | Clears the specified tab stop from the ruler and deletes it from the TabStops collection.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Parent | Returns the parent object for the specified object.
Position | Returns or sets the position of the specified tab stop, in points. Read/write.
Type | Represents the formatting of a tab stop. Read/write.


AnimationBehavior.Delete Method (PowerPoint)

 Copy code hover
[image]

AnimationBehavior.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the specified AnimationBehavior object.

Syntax

expression .Delete

expression A variable that represents an AnimationBehavior object.

See also

Concepts

AnimationBehavior Object

Other resources

AnimationBehavior Object Members


Adjustments.Count Property (PowerPoint)

 Copy code hover
[image]

Adjustments.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents an Adjustments object.

Return Value

[INT]

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

Adjustments Object

Other resources

Adjustments Object Members


FillFormat.GradientStops Property (PowerPoint)

 Copy code hover
[image]

FillFormat.GradientStops Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the GradientStops collection associated with the specified fill format. Read-only.

Syntax

expression .GradientStops

expression An expression that returns a FillFormat object.

Return Value

GradientStops

Remarks

You can use the GradientStops.Insert method to add gradient stops to the GradientStops collection for the specified object.

Example

The following example shows how to add a gradient stop at the 50% position to the GradientStops collection of the fill format of the first shape on the first slide of the active presentation. For this example to work, the shape must already have a gradient fill applied.

VBA Copy code Copy code
Public Sub GradientStops_Example()

    Dim pptShape As Shape
    Dim pptFillFormat As FillFormat
    Dim pptGradientStops As GradientStops

    Set pptShape = ActivePresentation.Slides(1).Shapes(1)
    Set pptFillFormat = pptShape.Fill
    Set pptGradientStops = pptFillFormat.GradientStops

    pptGradientStops.Insert RGB(255, 0, 255), 0.5

End Sub

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


Design.Delete Method (PowerPoint)

 Copy code hover
[image]

Design.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the specified Design object.

Syntax

expression .Delete

expression A variable that represents a Design object.

See also

Concepts

Design Object

Other resources

Design Object Members


ChartCharacters Methods (PowerPoint)

 Copy code hover
[image]

ChartCharacters Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Delete | Deletes the object.
Insert | Inserts a string preceding the selected characters.


PpChartUnitEffect Enumeration (PowerPoint)

 Copy code hover
[image]

PpChartUnitEffect Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies whether the graph range is animated by series, category, or element.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppAnimateByCategory | 2 | By category
ppAnimateByCategoryElements | 4 | By category elements
ppAnimateBySeries | 1 | By series
ppAnimateBySeriesElements | 3 | By series elements
ppAnimateChartAllAtOnce | 5 | Chart all at once
ppAnimateChartMixed | -2 | Chart mixed


Font.Size Property (PowerPoint)

 Copy code hover
[image]

Font.Size Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the character size, in points. Read/write.

Syntax

expression .Size

expression A variable that represents a Font object.

Return Value

Single

Example

This example sets the size of the text attached to shape one on slide one to 24 points.

VBA Copy code Copy code
Application.ActivePresentation.Slides(1) _

    .Shapes(1).TextFrame.TextRange.Font _

    .Size = 24

See also

Concepts

Font Object

Other resources

Font Object Members


Series.InvertIfNegative Property (PowerPoint)

 Copy code hover
[image]

Series.InvertIfNegative Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if Microsoft Word inverts the pattern in the object when it corresponds to a negative number. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .InvertIfNegative

expression A variable that represents a Series object.

See also

Concepts

Series Object

Other resources

Series Object Members


Rows Methods (PowerPoint)

 Copy code hover
[image]

Rows Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Add | Returns a Row object that represents a row being added to a table.
Item | Returns a single Row object from the specified Rows collection.


FileConverter.ClassName Property (PowerPoint)

 Copy code hover
[image]

FileConverter.ClassName Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a unique name that identifies the file converter. Read-only String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ClassName

expression A variable that represents a FileConverter object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

This example displays the class name and format name of the first converter in the FileConverters collection.

VBA Copy code Copy code
MsgBox "ClassName= " & FileConverters(1).ClassName & vbCr _

    & "FormatName= " & FileConverters(1).FormatName

If an HTML file converter is available, this example sets the HTML format as the default save format.

VBA Copy code Copy code
Dim fcLoop As FileConverter

For Each fcLoop In FileConverters

    If fcLoop.ClassName = "HTML" Then _

        Application.DefaultSaveFormat = "HTML"

Next fcLoop

See also

Concepts

FileConverter Object

Other resources

FileConverter Object Members


ShapeRange.Copy Method (PowerPoint)

 Copy code hover
[image]

ShapeRange.Copy Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Copies the specified object to the Clipboard.

Syntax

expression .Copy

expression A variable that represents a ShapeRange object.

Remarks

Use the Paste method to paste the contents of the Clipboard.

Example

This example copies shapes one and two on slide one in the active presentation to the Clipboard and then pastes the copies onto slide two.

VBA Copy code Copy code
With ActivePresentation

    .Slides(1).Shapes.Range(Array(1, 2)).Copy

    .Slides(2).Shapes.Paste

End With

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


Trendlines.Item Method (PowerPoint)

 Copy code hover
[image]

Trendlines.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single object from a collection.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Item(Index)

expression A variable that represents a Trendlines object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Optional | Variant | The index number for the object.

Return Value

A Trendline object that the collection contains.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the number of units that the trendline on the first chart in the active document extends forward and backward. The example should be run on a 2-D column chart that contains a single series with a trendline.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.SeriesCollection(1).Trendlines.Item(1)

            .Forward = 5

            .Backward = .5

        End With

    End If

End With

See also

Concepts

Trendlines Object

Other resources

Trendlines Object Members


XlErrorBarDirection Enumeration (PowerPoint)

 Copy code hover
[image]

XlErrorBarDirection Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies which axis values are to receive error bars.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlChartX | -4168 | Bars run parallel to the y-axis for x-axis values.
xlChartY | 1 | Bars run parallel to the x-axis for y-axis values.


Point Members (PowerPoint)

 Copy code hover
[image]

Point Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a single point in a series in a chart.

Methods

Name | Description
ApplyDataLabels | Applies data labels to a point.
ClearFormats | Clears the formatting of the object.
Copy | If the point has a picture fill, copies the picture to the Clipboard.
Delete | Deletes the object.
Paste | Pastes a picture from the Clipboard as the marker on the selected point.
PieSliceLocation | Returns the vertical or horizontal position, in points, of a point on a chart item from the top or left edge of the object to the top or left edge of the chart area.
Select | Selects the object.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
ApplyPictToEnd | True if a picture is applied to the end of the point or all points in the series. Read/write Boolean.
ApplyPictToFront | True if a picture is applied to the front of the point or all points in the series. Read/write Boolean.
ApplyPictToSides | True if a picture is applied to the sides of the point or all points in the series. Read/write Boolean.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
DataLabel | Returns the data label associated with the point. Read-only DataLabel.
Explosion | Returns or sets the explosion value for a pie-chart or doughnut-chart slice. Read/write Long.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Has3DEffect | True if a point has a three-dimensional appearance. Read/write Boolean.
HasDataLabel | True if the point has a data label. Read/write Boolean.
Height | Returns the height, in points, of the object. Read-only.
InvertIfNegative | True if Microsoft Word inverts the pattern in the object when it corresponds to a negative number. Read/write Variant.
Left | Returns a value that represents the distance, in points, from the left edge of the object to the left edge of the chart area. Read-only.
MarkerBackgroundColor | Sets the marker background color as an RGB value or returns the corresponding color index value. Read/write Long.
MarkerBackgroundColorIndex | Returns or sets the marker background color as an index into the current color palette, or as one of the following XlColorIndex constants: xlColorIndexAutomatic or xlColorIndexNone. Read/write Long.
MarkerForegroundColor | Sets the marker foreground color as an RGB value or returns the corresponding color index value. Read/write Long.
MarkerForegroundColorIndex | Returns or sets the marker foreground color as an index into the current color palette, or as one of the following XlColorIndex constants: xlColorIndexAutomatic or xlColorIndexNone. Read/write Long.
MarkerSize | Returns or sets the data-marker size, in points. Read/write Long.
MarkerStyle | Returns or sets the marker style for a point or series in a line chart, scatter chart, or radar chart. Read/write XlMarkerStyle.
Name | Returns the object name. Read-only.
Parent | Returns the parent for the specified object. Read-only Object.
PictureType | Returns or sets a value that specifies how pictures are displayed on a column or bar picture chart. Read/write XlChartPictureType.
PictureUnit2 | Returns or sets the unit for each picture on the chart if the PictureType property is set to xlStackScale (if not, this property is ignored). Read/write Double.
SecondaryPlot | True if the point is in the secondary section of either a pie-of-pie chart or a bar-of-pie chart. Read/write Boolean.
Shadow | Returns or sets a value that indicates whether the object has a shadow. Read/write Boolean.
Top | Returns a value that represents the distance, in points, from the top edge of the object to the top edge of the chart area. Read-only.
Width | Returns the width, in points, of the object. Read-only.


TextFrame2.MarginLeft Property (PowerPoint)

 Copy code hover
[image]

TextFrame2.MarginLeft Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the distance (in points) between the left edge of the text frame and the left edge of the inscribed rectangle of the shape that contains the text. Read/write.

Syntax

expression .MarginLeft

expression An expression that returns a TextFrame2 object.

Return Value

Single

Example

The following example adds a rectangle to a slide, adds text to the rectangle, and then sets the margins for the text frame.

VBA Copy code Copy code
Public Sub MarginLeft_Example()

    Set pptSlide = ActivePresentation.Slides(1)

    With pptSlide.Shapes.AddShape(msoShapeRectangle, 0, 0, 250, 140).TextFrame2

        .TextRange.Text = "Here is some sample text"

        .MarginBottom = 10

        .MarginLeft = 10

        .MarginRight = 10

        .MarginTop = 10

    End With

End Sub

See also

Concepts

TextFrame2 Object

Other resources

TextFrame2 Object Members


Chart Members (PowerPoint)

 Copy code hover
[image]

Chart Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a chart in a presentation.

Methods

Name | Description
ApplyChartTemplate | Applies a standard or custom chart type to a chart.
ApplyDataLabels | Applies data labels to all the series in a chart.
ApplyLayout | Applies the layouts shown in the Ribbon.
Axes | Returns a collection of axes on the chart.
ChartGroups | Returns an object that represents either a single chart group or a collection of all the chart groups in the chart.
ChartWizard | Modifies the properties of the given chart. You can use this method to quickly format a chart without setting all the individual properties. This method is noninteractive, and it changes only the specified properties.
ClearToMatchColorStyle | Clears all colors on the specified chart that do not follow the color style applied to the chart.
ClearToMatchStyle | Clears the chart elements formatting to automatic.
Copy | Not supported for this object.
CopyPicture | Copies the selected object to the Clipboard as a picture.
Delete | Deletes the object.
Export | Exports the chart in a graphic format.
FullSeriesCollection | Returns the collection of all the series in the specified chart, or the specified series.
GetChartElement | Returns information about the chart element at the specified x-coordinate and y-coordinate.
Paste | Pastes chart data from the Clipboard into the chart.
Refresh | Causes the specified chart to be redrawn immediately.
SaveChartTemplate | Saves a custom chart template to the list of available chart templates.
Select | Selects the object.
SeriesCollection | Returns all the series in the chart.
SetBackgroundPicture | Sets the background graphic for a chart.
SetDefaultChart | Specifies the name of the chart template that Microsoft Word uses when it creates new charts.
SetElement | Sets chart elements on a chart. Read/write MsoChartElementType.
SetSourceData | Sets the source data range for the chart.

Properties

Name | Description
AlternativeText | Returns or sets the alternative text associated with a shape in a Web presentation. Read/write.
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
AutoScaling | True if Microsoft Word scales a 3-D chart so that it is closer in size to the equivalent 2-D chart. The RightAngleAxes property must be True. Read/write Boolean.
BackWall | Returns an object that allows the user to individually format the back wall of a 3-D chart. Read-only Walls.
BarShape | Returns or sets the shape used for every series in a 3-D bar or column chart. Read/write XlBarShape.
CategoryLabelLevel | Returns or sets an XlCategoryLabel constant that specifies the source level of the chart category labels. Read-write.
ChartArea | Returns the complete chart area for the chart. Read-only ChartArea.
ChartColor | Returns or sets an integer that represents the color scheme for the chart. Read-write.
ChartData | Returns information about the linked or embedded data associated with a chart. Read-only ChartData.
ChartStyle | Returns or sets the chart style for the chart. Read/write Variant.
ChartTitle | Returns the title of the specified chart. Read-only ChartTitle.
ChartType | Returns or sets the chart type. Read/write XlChartType.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
DataTable | Returns the chart data table. Read-only DataTable.
DepthPercent | Returns or sets the depth of a 3-D chart as a percentage of the chart width (between 20 and 2000 percent). Read/write Long.
DisplayBlanksAs | Returns or sets the way that blank cells are plotted on a chart. Can be one of the XlDisplayBlanksAs constants. Read/write Long.
Elevation | Returns or sets the elevation, in degrees, of the 3-D chart view. Read/write Long.
Floor | Returns the floor of the 3-D chart. Read-only Floor.
Format | Returns the ChartFormat object. Read-only.
GapDepth | Returns or sets the distance, as a percentage of the marker width, between the data series in a 3-D chart. Read/write Long.
HasAxis | Returns or sets which axes exist on the chart. Read/write Variant.
HasDataTable | True if the chart has a data table. Read/write Boolean.
HasLegend | True if the chart has a legend. Read/write Boolean.
HasTitle | True if the axis or chart has a visible title. Read/write Boolean.
HeightPercent | Returns or sets the height of a 3-D chart as a percentage of the chart width (from 5 through 500 percent). Read/write Long.
Legend | Returns the legend for the chart. Read-only Legend.
Name | Read/write
Parent | Returns the parent for the specified object. Read-only Object.
Perspective | Returns or sets the perspective for the 3-D chart view. Read/write Long.
PlotArea | Returns the plot area of a chart. Read-only PlotArea.
PlotBy | Returns or sets the way columns or rows are used as data series on the chart. Read/write Long.
PlotVisibleOnly | True if only visible cells are plotted. False if both visible and hidden cells are plotted. Read/write Boolean.
RightAngleAxes | True if the chart axes are at right angles, independent of chart rotation or elevation. Read/write Boolean.
Rotation | Returns or sets the rotation, in degrees, of the 3-D chart view (the rotation of the plot area around the z-axis). Read/write Variant.
SeriesNameLevel | Returns or sets an XlSeriesNameLevel constant that specifies the source level of the series names. Read-write.
Shapes | Returns a collection that represents all the shapes on the chart sheet. Read-only Shapes.
ShowAllFieldButtons | Returns or sets a value that indicates whether to display all field buttons on a PivotChart. Read/write.
ShowAxisFieldButtons | Returns or sets a value that indicates whether to display axis field buttons on a PivotChart. Read/write
ShowDataLabelsOverMaximum | Returns or sets a value that indicates whether to show the data labels when the value is greater than the maximum value on the value axis. Read/write Boolean.
ShowLegendFieldButtons | Returns or sets a value that indicates whether to display legend field buttons on a PivotChart. Read/write.
ShowReportFilterFieldButtons | Returns or sets a value that indicates whether to display the report filter field buttons on a PivotChart. Read/write.
ShowValueFieldButtons | Returns or sets a value that indicates whether to display the value field buttons on a PivotChart. Read/write.
SideWall | Returns a Walls object that allows the user to individually format the side wall of a 3-D chart. Read-only.
Title | Gets or sets a String that represents the title of the chart. Read/write.
Walls | Returns the walls of the 3-D chart. Read-only Walls.


Point.Explosion Property (PowerPoint)

 Copy code hover
[image]

Point.Explosion Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the explosion value for a pie-chart or doughnut-chart slice. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Explosion

expression A variable that represents a Point object.

Remarks

This property returns 0 (zero) if there is no explosion (the tip of the slice is in the center of the pie).

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the explosion value for point two of the first chart in the active document. You should run the example on a pie chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).Points(2).Explosion = 20

    End If

End With

See also

Concepts

Point Object

Other resources

Point Object Members


Column.Cells Property (PowerPoint)

 Copy code hover
[image]

Column.Cells Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a CellRange collection that represents the cells in a table column or row. Read-only.

Syntax

expression .Cells

expression A variable that represents a Column object.

Return Value

CellRange

Example

This example creates a new presentation, adds a slide, inserts a 3x3 table on the slide, and assigns the column and row number to each cell in the table.

VBA Copy code Copy code
Dim i As Integer

Dim j As Integer

With Presentations.Add

    .Slides.Add(1, ppLayoutBlank).Shapes.AddTable(3, 3).Select

    Set myTable = .Slides(1).Shapes(1).Table

    For i = 1 To myTable.Columns.Count

        For j = 1 To myTable.Columns(i).Cells.Count

            myTable.Columns(i).Cells(j).Shape.TextFrame _

                .TextRange.Text = "col. " & i & "row " & j

        Next j

    Next i

End With

See also

Concepts

Column Object

Other resources

Column Object Members


Timing.Duration Property (PowerPoint)

 Copy code hover
[image]

Timing.Duration Property (PowerPoint)
Send feedback

Returns or sets the length of an animation in seconds. Read/write.

Version information

Version Added: PowerPoint 2013

Syntax

expression .Duration

expression A variable that represents a Timing object.

Property value

FLOAT


Application.SlideShowOnNext Event (PowerPoint)

 Copy code hover
[image]

Application.SlideShowOnNext Event (PowerPoint)
See also Send feedback

Published: July 16, 2012

Occurs when the user clicks Next to move within the current slide.

Syntax

expression .SlideShowOnNext(Wn)

expression An expression that returns an Application object.

Parameters

Name | Required/Optional | Data Type | Description
Wn | Required | SlideShowWindow | The active slideshow window.

Remarks

To access Application object events, declare a variable to represent the Application object in the General Declarations section of your code. Then set the variable equal to the Application object for which you want to access events. For more information about using events with the Microsoft PowerPoint Application object, see How to: Use Events with the Application Object.

The SlideShowOnNext event does not fire when users click Next to move to the next slide, but rather only when they click Next to move within a given slide, for example to run the next animation on the slide.

Example

This example displays a message every time a user clicks Next to move with the current slide. The example assumes that you have already declared an Application object named App in the General Declarations section of your code, using the WithEvents keyword.

VBA Copy code Copy code
Private Sub App_SlideShowOnNext(ByVal Wn As SlideShowWindow)

    Debug.Print "User clicked Next to move within the current slide."

End Sub

See also

Concepts

Application Object

Other resources

Application Object Members


AutoCorrect Properties (PowerPoint)

 Copy code hover
[image]

AutoCorrect Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
DisplayAutoCorrectOptions | Determines whether Microsoft PowerPoint should display the AutoCorrect Options button. Read/write.
DisplayAutoLayoutOptions | Determines whether Microsoft PowerPoint should display the AutoLayout Options button. Read/write.


Columns Members (PowerPoint)

 Copy code hover
[image]

Columns Members (PowerPoint)
Send feedback

Published: July 16, 2012

A collection of Column objects that represent the columns in a table.

Methods

Name | Description
Add | Adds a new column to an existing table. Returns a Column object that represents the new table column.
Item | Returns a single Column object from the specified Columns collection.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


LinkFormat.AutoUpdate Property (PowerPoint)

 Copy code hover
[image]

LinkFormat.AutoUpdate Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets the way the link will be updated. Read/write.

Syntax

expression .AutoUpdate

expression A variable that represents an LinkFormat object.

Return Value

PpUpdateOption

Remarks

The value of the AutoUpdate property can be one of these PpUpdateOption constants.

Constant | Description
ppUpdateOptionAutomatic | The link is updated each time the presentation is opened or the source file changes.
ppUpdateOptionManual | The link is updated only when the user specifically asks to update the presentation.
ppUpdateOptionMixed |

Example

This example loops through all the shapes on all the slides in the active presentation and sets all linked Microsoft Excel worksheets to be updated manually.

VBA Copy code Copy code
For Each sld In ActivePresentation.Slides

    For Each sh In sld.Shapes

        If sh.Type = msoLinkedOLEObject Then

            If sh.OLEFormat.ProgID = "Excel.Sheet" Then

                sh.LinkFormat.AutoUpdate = ppUpdateOptionManual

            End If

        End If

    Next

Next

See also

Concepts

LinkFormat Object

Other resources

LinkFormat Object Members


ThemeVariant Object (PowerPoint)

 Copy code hover
[image]

ThemeVariant Object (PowerPoint)
Send feedback

Represents a variation (set of colors and fonts) in a theme.

Version information

Version Added: PowerPoint 2013

Example

This example opens a theme file, iterates through the variants in the theme, and prints the name and ID of each variation in the theme.

VBA Copy code Copy code
Sub IterateThemeVariants()

    Dim pptTheme As Theme
    Dim pptThemeVariants As ThemeVariants
    Dim pptThemeVariant As ThemeVariant
    Dim path As String

    ' Get a reference to the currently active theme.
    path = "C:\Program Files (x86)\Microsoft Office\Document Themes 15\" & _
        ActivePresentation.TemplateName & ".thmx"
    Set pptTheme = Application.OpenThemeFile(path)

    ' Get a reference to all of the variations in the theme.
    Set pptThemeVariants = pptTheme.ThemeVariants

    ' Iterate over each variation of the theme and print
    ' its name and ID.
    For Each pptThemeVariant In pptThemeVariants

        Debug.Print "Variation " & pptThemeVariant.name & " id: " & pptThemeVariant.Id

    Next pptThemeVariant

End Sub


ProtectedViewWindow.Presentation Property (PowerPoint)

 Copy code hover
[image]

ProtectedViewWindow.Presentation Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Presentation object that represents the presentation in which the specified window was created. Read-only.

Syntax

expression .Presentation

expression A variable that represents a ProtectedViewWindow object.

See also

Concepts

ProtectedViewWindow Object

Other resources

ProtectedViewWindow Object Members


AnimationSettings.EntryEffect Property (PowerPoint)

 Copy code hover
[image]

AnimationSettings.EntryEffect Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

For the AnimationSettings object, this property returns or sets the special effect applied to the animation for the specified shape. Read/write.

Syntax

expression .EntryEffect

expression A variable that represents an AnimationSettings object.

Return Value

PpEntryEffect

Remarks

If the TextLevelEffect property for the specified shape is set to ppAnimateLevelNone (the default value) or the Animate property is set to False, you won't see the special effect you've applied with the EntryEffect property.

Example

This example adds a title slide to the active presentation and sets the title to fly in from the right whenever it is animated during a slide show.

VBA Copy code Copy code
With ActivePresentation.Slides.Add(1, ppLayoutTitleOnly).Shapes(1)

        .TextFrame.TextRange.Text = "Sample title"

    With .AnimationSettings

        .TextLevelEffect = ppAnimateByAllLevels

        .EntryEffect = ppEffectFlyFromRight

        .Animate = True

    End With

End With

See also

Concepts

AnimationSettings Object

Other resources

AnimationSettings Object Members


ChartFormat.Application Property (PowerPoint)

 Copy code hover
[image]

ChartFormat.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents a ChartFormat object.

See also

Concepts

ChartFormat Object

Other resources

ChartFormat Object Members


XlPivotFieldOrientation Enumeration (PowerPoint)

 Copy code hover
[image]

XlPivotFieldOrientation Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the location of the field in a PivotTable report.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlColumnField | 2 | A column field.
xlDataField | 4 | A data field.
xlHidden | 0 | A hidden field.
xlPageField | 3 | A page field.
xlRowField | 1 | A row field.


Row Object (PowerPoint)

 Copy code hover
[image]

Row Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a row in a table. The Row object is a member of the Rows collection. The Rows collection includes all the rows in the specified table.

Example

Use Rows(index), where index is a number that represents the position of the row in the table, to return a single Row object. This example deletes the first row from the table in shape five on slide two of the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(2).Shapes(5).Table.Rows(1).Delete

Use the Select method to select a row in a table. This example selects row one of the specified table.

VBA Copy code Copy code
ActivePresentation.Slides(2).Shapes(5).Table.Rows(1).Select

Use the Cells property to modify the individual cells in a Row object. This example selects the second row in the table and applies a dashed line style to the bottom border.

VBA Copy code Copy code
ActiveWindow.Selection.ShapeRange.Table.Rows(2) _

    .Cells.Borders(ppBorderBottom).DashStyle = msoLineDash

See also

Concepts

PowerPoint Object Model Reference

Other resources

Row Object Members


ColorSchemes Members (PowerPoint)

 Copy code hover
[image]

ColorSchemes Members (PowerPoint)
Send feedback

Published: July 16, 2012

A collection of all the ColorScheme objects in the specified presentation. Each ColorScheme object represents a color scheme, which is a set of colors that are used together on a slide.

Methods

Name | Description
Add | Adds a color scheme to the collection of available schemes. Returns a ColorScheme object that represents the added color scheme.
Item | Returns a single ColorScheme object from the specified ColorSchemes collection.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


TickLabels.NumberFormatLinked Property (PowerPoint)

 Copy code hover
[image]

TickLabels.NumberFormatLinked Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

True if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .NumberFormatLinked

expression A variable that represents a TickLabels object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example links the number format for tick-mark labels to its cells for the value axis of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.Axes(xlValue).TickLabels.NumberFormatLinked = True

    End If

End With

See also

Concepts

TickLabels Object

Other resources

TickLabels Object Members


XlOrientation Enumeration (PowerPoint)

 Copy code hover
[image]

XlOrientation Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the text orientation.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlDownward | -4170 | Text runs downward.
xlHorizontal | -4128 | Text runs horizontally.
xlUpward | -4171 | Text runs upward.
xlVertical | -4166 | Text runs downward and is centered in the cell.


HiLoLines.Delete Method (PowerPoint)

 Copy code hover
[image]

HiLoLines.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Delete

expression A variable that represents a HiLoLines object.

See also

Concepts

HiLoLines Object

Other resources

HiLoLines Object Members


SlideShowWindows.Item Method (PowerPoint)

 Copy code hover
[image]

SlideShowWindows.Item Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a single SlideShowWindow object from the specified SlideShowWindows collection.

Syntax

expression .Item(Index)

expression A variable that represents a SlideShowWindows collection.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Long | The index number of the single SlideShowWindow object in the collection to be returned.

Return Value

SlideShowWindow

See also

Concepts

SlideShowWindows Object

Other resources

SlideShowWindows Object Members


Table.VertBanding Property (PowerPoint)

 Copy code hover
[image]

Table.VertBanding Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether to display banded columns, in which even columns are formatted differently from odd columns. Read/write.

Syntax

expression .VertBanding

expression A variable that represents a Table object.

Return Value

Boolean

See also

Concepts

Table Object

Other resources

Table Object Members


Presentation.FarEastLineBreakLanguage Property (PowerPoint)

 Copy code hover
[image]

Presentation.FarEastLineBreakLanguage Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the language used to determine which line break level is used when the line break control option is turned on. Read/write.

Syntax

expression .FarEastLineBreakLanguage

expression A variable that represents a Presentation object.

Return Value

MsoFarEastLineBreakLanguageID

Remarks

The value of the FarEastLineBreakLanguage property can be one of these MsoFarEastLineBreakLanguageID constants.

MsoFarEastLineBreakLanguageJapanese

MsoFarEastLineBreakLanguageKorean

MsoFarEastLineBreakLanguageSimplifiedChinese

MsoFarEastLineBreakLanguageTraditionalChinese

Example

The following example sets the line break language to Japanese.

VBA Copy code Copy code
ActivePresentation.FarEastLineBreakLanguage =  MsoFarEastLineBreakLanguageJapanese

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


TextFrame2.VerticalAnchor Property (PowerPoint)

 Copy code hover
[image]

TextFrame2.VerticalAnchor Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the vertical alignment of text in a text frame. Read/write.

Syntax

expression .VerticalAnchor

expression An expression that returns a TextFrame2 object.

Remarks

The value of the VerticalAnchor property can be one of these MsoVerticalAnchor constants.

msoAnchorBottom

msoAnchorMiddle

msoAnchorTop

msoVerticalAnchorMixed

Example

The following example shows how to set the alignment for shape one on slide one to top center.

VBA Copy code Copy code
Public Sub VerticalAnchor_Example()

    With ActivePresentation.Slides(1).Shapes(1)

        .TextFrame2.HorizontalAnchor = msoAnchorCenter

        .TextFrame2.VerticalAnchor = msoAnchorTop

    End With

End Sub

See also

Concepts

TextFrame2 Object

Other resources

TextFrame2 Object Members


DataLabels.Separator Property (PowerPoint)

 Copy code hover
[image]

DataLabels.Separator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns the separator for the data labels on a chart. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Separator

expression A variable that represents a DataLabels object.

Remarks

If you use a string, you will get a string as the separator. If you use xlDataLabelSeparatorDefault (= 1), you will get the default data label separator, which is either a comma or a newline character, depending on the data label.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the data label separator for the first series on the first chart in the active document to a semicolon.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1). _

            DataLabels.Separator = ";"

    End If

End With

See also

Concepts

DataLabels Object

Other resources

DataLabels Object Members


DataLabels.ShowValue Property (PowerPoint)

 Copy code hover
[image]

DataLabels.ShowValue Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True to display the data label values for a specified chart. False to hide the values. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ShowValue

expression A variable that represents a DataLabels object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example enables the value to be shown for the data labels of the first series in the first chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).DataLabels. _

            ShowValue = True

    End If

End With

See also

Concepts

DataLabels Object

Other resources

DataLabels Object Members


PlotArea.Parent Property (PowerPoint)

 Copy code hover
[image]

PlotArea.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents a PlotArea object.

See also

Concepts

PlotArea Object

Other resources

PlotArea Object Members


ShapeRange.ThreeD Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.ThreeD Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a ThreeDFormat object that contains 3-D - effect formatting properties for the specified shape. Read-only.

Syntax

expression .ThreeD

expression A variable that represents a ShapeRange object.

Return Value

ThreeDFormat

Example

This example sets the depth, extrusion color, extrusion direction, and lighting direction for the 3-D effects applied to shape one on myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(1).ThreeD

    .Visible = True

    .Depth = 50

    'RGB value for purple

    .ExtrusionColor.RGB = RGB(255, 100, 255)

    .SetExtrusionDirection msoExtrusionTop

    .PresetLightingDirection = msoLightingLeft

End With

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


DisplayUnitLabel.FormulaR1C1 Property (PowerPoint)

 Copy code hover
[image]

DisplayUnitLabel.FormulaR1C1 Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the formula for the object, using R1C1-style notation in the language of the macro. Read/write String.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .FormulaR1C1

expression A variable that represents a DisplayUnitLabel object.

Remarks

If the cell contains a constant, this property returns the constant. If the cell is empty, the property returns an empty string. If the cell contains a formula, the property returns the formula as a string, in the same format in which it would be displayed in the formula bar (including the equal sign).

If you set the value or formula of a cell to a date, Microsoft PowerPoint verifies whether that cell is already formatted with one of the date or time number formats. If not, the number format is changed to the default short date number format.

If the range is a one-dimensional or two-dimensional range, you can set the formula to a Visual Basic array of the same dimensions. Similarly, you can put the formula into a Visual Basic array.

Setting the formula of a multiple-cell range fills all cells in the range with the formula.

See also

Concepts

DisplayUnitLabel Object

Other resources

DisplayUnitLabel Object Members


CalloutFormat.PresetDrop Method (PowerPoint)

 Copy code hover
[image]

CalloutFormat.PresetDrop Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Specifies whether the callout line attaches to the top, bottom, or center of the callout text box or whether it attaches at a point that's a specified distance from the top or bottom of the text box.

Syntax

expression .PresetDrop(DropType)

expression A variable that represents a CalloutFormat object.

Parameters

Name | Required/Optional | Data Type | Description
DropType | Required | MsoCalloutDropType | The starting position of the callout line relative to the text bounding box.

Remarks

The DropType parameter value can be one of the following MsoCalloutDropType constants. Passing msoCalloutDropCustom will cause your code to fail.

msoCalloutDropBottom

msoCalloutDropCenter

msoCalloutDropCustom

msoCalloutDropMixed

msoCalloutDropTop

Example

This example specifies that the callout line attach to the top of the text bounding box for shape one on myDocument. For the example to work, shape one must be a callout.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes(1).Callout.PresetDrop msoCalloutDropTop

This example switches between two preset drops for shape one on myDocument. For the example to work, shape one must be a callout.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(1).Callout

    If .DropType = msoCalloutDropTop Then

        .PresetDrop msoCalloutDropBottom

    ElseIf .DropType = msoCalloutDropBottom Then

        .PresetDrop msoCalloutDropTop

    End If

End With

See also

Concepts

CalloutFormat Object

Other resources

CalloutFormat Object Members


DataLabel.FormulaR1C1 Property (PowerPoint)

 Copy code hover
[image]

DataLabel.FormulaR1C1 Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the formula for the object, using R1C1-style notation in the language of the macro. Read/write String.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .FormulaR1C1

expression A variable that represents a DataLabel object.

Remarks

If the cell contains a constant, this property returns the constant. If the cell is empty, the property returns an empty string. If the cell contains a formula, the property returns the formula as a string, in the same format in which it would be displayed in the formula bar (including the equal sign).

If you set the value or formula of a cell to a date, Microsoft PowerPoint verifies whether that cell is already formatted with one of the date or time number formats. If not, the number format is changed to the default short date number format.

If the range is a one-dimensional or two-dimensional range, you can set the formula to a Visual Basic array of the same dimensions. Similarly, you can put the formula into a Visual Basic array.

Setting the formula of a multiple-cell range fills all cells in the range with the formula.

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


Series.XValues Property (PowerPoint)

 Copy code hover
[image]

Series.XValues Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets an array of x values for a chart series. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .XValues

expression A variable that represents a Series object.

Remarks

You can set the XValues property to a range on a worksheet or to an array of values, but not to a combination of both.

For PivotChart reports, this property is read-only.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the values from a range address.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).XValues = "=Sheet1!B1:B5"

    End If

End With

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

To assign a constant value to each individual data point, you must use an array, as shown in the following example.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).XValues = _

            Array(5.0, 6.3, 12.6, 28, 50)

    End If

End With

See also

Concepts

Series Object

Other resources

Series Object Members


Series.DataLabels Method (PowerPoint)

 Copy code hover
[image]

Series.DataLabels Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an object that represents either a single data label (a DataLabel object) or a collection of all the data labels for the series (a DataLabels collection).

Version Information

Version Added: PowerPoint 2007

Syntax

expression .DataLabels(Index)

expression A variable that represents a Series object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Optional | Variant | The number of the data label.

Return Value

An object that represents either a single data label (a DataLabel object) or a collection of all the data labels for the series (a DataLabels collection).

Remarks

If the series has the Show Value option turned on for the data labels, the returned collection can contain up to one label for each point. Data labels can be turned on or off for individual points in the series.

If the series is on an area chart and has the Show Label option turned on for the data labels, the returned collection contains only a single label, which is the label for the area series.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the data labels for series one for the first chart in the active document to show their key, assuming that their values are visible when the example runs.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.SeriesCollection(1)

            .HasDataLabels = True

            With .DataLabels

                .ShowLegendKey = True

                .Type = xlValue

            End With

        End With

    End If

End With

See also

Concepts

Series Object

Other resources

Series Object Members


LineFormat.Application Property (PowerPoint)

 Copy code hover
[image]

LineFormat.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a LineFormat object.

Return Value

Object

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

LineFormat Object

Other resources

LineFormat Object Members


Sequence.FindFirstAnimationForClick Method (PowerPoint)

 Copy code hover
[image]

Sequence.FindFirstAnimationForClick Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Effect object that represents the first animation started by the specified click number.

Syntax

expression .FindFirstAnimationForClick(click)

expression A variable that represents a Sequence object.

Parameters

Name | Required/Optional | Data Type | Description
click | Required | Long | The specified click number.

Return Value

Effect

Example

The following example finds the first animation for the first click of the first slide and changes the effect to a bounce.

VBA Copy code Copy code
Sub FindFirstAnimationClick()

    Dim sldFirst As Slide

    Dim effClick As Effect

    Set sldFirst = ActivePresentation.Slides(1)

    Set effClick = sldFirst.TimeLine.MainSequence _

        .FindFirstAnimationForClick(Click:=1)

    effClick.EffectType = msoAnimEffectBounce

End Sub

See also

Concepts

Sequence Object

Other resources

Sequence Object Members


Presentation.EnvelopeVisible Property (PowerPoint)

 Copy code hover
[image]

Presentation.EnvelopeVisible Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the e-mail message header is visible in the document window. Read/write.

Syntax

expression .EnvelopeVisible

expression A variable that represents an Presentation object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The e-mail message header is not visible in the document window. The default.
msoTrue | The e-mail message header is visible in the document window.

Example

This example displays the e-mail message header.

VBA Copy code Copy code
ActivePresentation.EnvelopeVisible = msoTrue

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


Series.InvertColor Property (PowerPoint)

 Copy code hover
[image]

Series.InvertColor Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the fill color for negative data points in a series. Read/write.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .InvertColor

expression A variable that represents a Series object.

Return Value

Integer

Remarks

The InvertColor property enables you to set the fill color for negative data points as a specific numeric, hexadecimal, octal, or RGB color value. To set the value as an RBG value, use the Visual Basic RGB function. Instead of using the InvertColor property, you can use the InvertColorIndex property, which uses a simplier set of integer values from the current color palette.

For the InvertColor property to have an effect, the InvertIfNegative property of the Series object must also be set to True.

Example

The following code example sets the fill color of negative data points in the first series of chart 2 to magenta.

VBA Copy code Copy code
ActiveSheet.ChartObjects("Chart 2").Activate

ActiveChart.SeriesCollection(1).InvertIfNegative = True

ActiveChart.SeriesCollection(1).InvertColor = RGB(255, 0, 255)

See also

Concepts

Series Object

Other resources

Series Object Members


Presentation.Research Property (PowerPoint)

 Copy code hover
[image]

Presentation.Research Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Research object that provides access to the research service feature of Microsoft PowerPoint. Read-only.

Syntax

expression .Research

expression An expression that returns a Presentation object.

Return Value

Research

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


Interior.Application Property (PowerPoint)

 Copy code hover
[image]

Interior.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents an Interior object.

See also

Concepts

Interior Object

Other resources

Interior Object Members


Shape.ApplyAnimation Method (PowerPoint)

 Copy code hover
[image]

Shape.ApplyAnimation Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Applies the last picked up animation to the Shape object.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .ApplyAnimation

expression A variable that represents a Shape object.

See also

Concepts

Shape Object

Other resources

Shape Object Members


SoundEffect Members (PowerPoint)

 Copy code hover
[image]

SoundEffect Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents the sound effect that accompanies an animation or slide transition in a slide show.

Methods

Name | Description
ImportFromFile | Specifies the sound that will be played whenever the specified shape is clicked or animated or whenever the specified slide transition occurs.
Play | Plays the specified sound effect.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Name | Returns or sets the name of the specified object. Read/write.
Parent | Returns the parent object for the specified object.
Type | Represents the type of sound effect. Read/write.


NamedSlideShows.Count Property (PowerPoint)

 Copy code hover
[image]

NamedSlideShows.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a NamedSlideShows object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

NamedSlideShows Object

Other resources

NamedSlideShows Object Members


Shapes.AddCallout Method (PowerPoint)

 Copy code hover
[image]

Shapes.AddCallout Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Creates a borderless line callout. Returns a Shape object that represents the new callout.

Syntax

expression .AddCallout(Type, Left, Top, Width, Height)

expression A variable that represents a Shapes object.

Parameters

Name | Required/Optional | Data Type | Description
Type | Required | MsoCalloutType | The type of callout line.
Left | Required | Single | The position, measured in points, of the left edge of the callout's bounding box relative to the left edge of the slide.
Top | Required | Single | The position, measured in points, of the top edge of the callout's bounding box relative to the top edge of the slide.
Width | Required | Single | The width of the callout's bounding box, measured in points.
Height | Required | Single | The height of the callout's bounding box, measured in points.

Return Value

Shape

Remarks

You can insert a greater variety of callouts by using the AddShape method.

Example

This example adds a borderless callout with a freely-rotating one-segment callout line to myDocument and then sets the callout angle to 30 degrees.

VBA Copy code Copy code
Sub NewCallout()
    Dim sldOne As Slide
    Set sldOne = ActivePresentation.Slides(1)
    sldOne.Shapes.AddCallout(Type:=msoCalloutTwo, Left:=50, Top:=50, _
        Width:=200, Height:=100).Callout.Angle = msoCalloutAngle30
End Sub

See also

Concepts

Shapes Object

Other resources

Shapes Object Members


Chart.Walls Property (PowerPoint)

 Copy code hover
[image]

Chart.Walls Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the walls of the 3-D chart. Read-only Walls.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Walls

expression A variable that represents a Chart object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the color of the wall border of the first chart in the active document to red. You should run the example on a 3-D chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.Walls.Border. _

            ColorIndex = 3

    End If

End With

See also

Concepts

Chart Object

Other resources

Chart Object Members


NamedSlideShow.Parent Property (PowerPoint)

 Copy code hover
[image]

NamedSlideShow.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a NamedSlideShow object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

NamedSlideShow Object

Other resources

NamedSlideShow Object Members


Trendlines.Count Property (PowerPoint)

 Copy code hover
[image]

Trendlines.Count Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the number of objects in the collection. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Count

expression A variable that represents a Trendlines object.

See also

Concepts

Trendlines Object

Other resources

Trendlines Object Members


Shape.Application Property (PowerPoint)

 Copy code hover
[image]

Shape.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a Shape object.

Return Value

Object

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

Shape Object

Other resources

Shape Object Members


TextEffectFormat.PresetShape Property (PowerPoint)

 Copy code hover
[image]

TextEffectFormat.PresetShape Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the shape of the specified WordArt. Read/write.

Syntax

expression .PresetShape

expression A variable that represents a TextEffectFormat object.

Return Value

MsoPresetTextEffectShape

Remarks

Setting the PresetTextEffect property automatically sets the PresetShape property.

The value of the PresetShape property can be one of these MsoPresetTextEffectShape constants.

msoTextEffectShapeArchDownCurve

msoTextEffectShapeArchDownPour

msoTextEffectShapeArchUpCurve

msoTextEffectShapeArchUpPour

msoTextEffectShapeButtonCurve

msoTextEffectShapeButtonPour

msoTextEffectShapeCanDown

msoTextEffectShapeCanUp

msoTextEffectShapeCascadeDown

msoTextEffectShapeCascadeUp

msoTextEffectShapeChevronDown

msoTextEffectShapeChevronUp

msoTextEffectShapeCircleCurve

msoTextEffectShapeCirclePour

msoTextEffectShapeCurveDown

msoTextEffectShapeCurveUp

msoTextEffectShapeDeflate

msoTextEffectShapeDeflateBottom

msoTextEffectShapeDeflateInflate

msoTextEffectShapeDeflateInflateDeflate

msoTextEffectShapeDeflateTop

msoTextEffectShapeDoubleWave2

msoTextEffectShapeFadeDown

msoTextEffectShapeFadeLeft

msoTextEffectShapeFadeRight

msoTextEffectShapeFadeUp

msoTextEffectShapeInflate

msoTextEffectShapeInflateBottom

msoTextEffectShapeInflateTop

msoTextEffectShapeMixed

msoTextEffectShapePlainText

msoTextEffectShapeRingInside

msoTextEffectShapeRingOutside

msoTextEffectShapeSlantDown

msoTextEffectShapeSlantUp

msoTextEffectShapeStop

msoTextEffectShapeTriangleDown

msoTextEffectShapeTriangleUp

msoTextEffectShapeWave1

msoTextEffectShapeWave2

msoTextEffectShapeDoubleWave1

Example

This example sets the shape of all WordArt on myDocument to a chevron whose center points down.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

For Each s In myDocument.Shapes

    If s.Type = msoTextEffect Then

        s.TextEffect.PresetShape = msoTextEffectShapeChevronDown

    End If

Next

See also

Concepts

TextEffectFormat Object

Other resources

TextEffectFormat Object Members


Sequences Properties (PowerPoint)

 Copy code hover
[image]

Sequences Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


HiLoLines.Creator Property (PowerPoint)

 Copy code hover
[image]

HiLoLines.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents a HiLoLines object.

See also

Concepts

HiLoLines Object

Other resources

HiLoLines Object Members


PrintRanges.Add Method (PowerPoint)

 Copy code hover
[image]

PrintRanges.Add Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a PrintRange object that represents a new print range to be added to the PrintRanges collection.

Syntax

expression .Add(Start, End)

expression A variable that represents a PrintRanges object.

Parameters

Name | Required/Optional | Data Type | Description
Start | Required | Long | The number of the slide that is the starting slide in the range.
End | Required | Long | The number of the slide that is the ending slide in the range.

Return Value

PrintRange

See also

Concepts

PrintRanges Object

Other resources

PrintRanges Object Members


PpGuideOrientation Enumeration (PowerPoint)

 Copy code hover
[image]

PpGuideOrientation Enumeration (PowerPoint)
Send feedback

Specifies the orientation of a drawing guide, either horizontal or vertical.

Version information

Version Added: PowerPoint 2013

Members

Name | Value | Description
ppHorizontalGuide | 1 | Represents a horizontal guide, spanning from the left to right of the slide editing window.
ppVerticalGuide | 2 | Represents a vertical guide, spanning from top edge to bottom of the slide editing window.
ppHorizontalGuide | 1 |
ppVerticalGuide | 2 |


Floor.Creator Property (PowerPoint)

 Copy code hover
[image]

Floor.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents a Floor object.

See also

Concepts

Floor Object

Other resources

Floor Object Members


Series.Application Property (PowerPoint)

 Copy code hover
[image]

Series.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents a Series object.

See also

Concepts

Series Object

Other resources

Series Object Members


PpTextUnitEffect Enumeration (PowerPoint)

 Copy code hover
[image]

PpTextUnitEffect Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Constants that specify how text-unit effects are animated, passed to and returned by the TextUnitEffect property of the AnimationSettings object.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppAnimateByCharacter | 2 | Text-unit effects are animated by character.
ppAnimateByParagraph | 0 | Text-unit effects are animated by paragraph.
ppAnimateByWord | 1 | Text-unit effects are animated by word.
ppAnimateUnitMixed | -2 | Text-unit effects are animated in a mixed manner.


TabStops.Count Property (PowerPoint)

 Copy code hover
[image]

TabStops.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a TabStops object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

TabStops Object

Other resources

TabStops Object Members


MotionEffect.ToY Property (PowerPoint)

 Copy code hover
[image]

MotionEffect.ToY Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a Single that represents the vertical position of a MotionEffect object, specified as a percentage of the screen width. Read/write.

Syntax

expression .ToY

expression A variable that represents a MotionEffect object.

Return Value

Single

Remarks

The default value of this property is Empty, in which case the current position of the object is used.

Use this property in conjunction with the FromY property to resize or jump from one position to another.

Do not confuse this property with the To property of the ColorEffect , RotationEffect , or PropertyEffect objects, which is used to set or change colors, rotations, or other properties of an animation behavior, respectively.

Example

The following example adds an animation path and sets the starting and ending horizontal and vertical positions.

VBA Copy code Copy code
Sub AddMotionPath()

    Dim effCustom As Effect

    Dim animMotion As AnimationBehavior

    Dim shpRectangle As Shape

    'Adds shape and sets effect and animation properties

    Set shpRectangle = ActivePresentation.Slides(1).Shapes _

        .AddShape(Type:=msoShapeRectangle, Left:=100, _

        Top:=100, Width:=50, Height:=50)

    Set effCustom = ActivePresentation.Slides(1).TimeLine.MainSequence _

        .AddEffect(Shape:=shpRectangle, effectId:=msoAnimEffectCustom)

    Set animMotion = effCustom.Behaviors.Add(msoAnimTypeMotion)

    'Sets starting and ending horizontal and vertical positions

    With animMotion.MotionEffect

        .FromX = 0

        .FromY = 0

        .ToX = 50

        .ToY = 50

    End With

End Sub

See also

Concepts

MotionEffect Object

Other resources

MotionEffect Object Members


SlideShowSettings.StartingSlide Property (PowerPoint)

 Copy code hover
[image]

SlideShowSettings.StartingSlide Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the first slide to be displayed in the specified slide show. Read/write.

Syntax

expression .StartingSlide

expression A variable that represents a SlideShowSettings object.

Return Value

Long

Example

This example runs a slide show of the active presentation, starting with slide two and ending with slide four.

VBA Copy code Copy code
With ActivePresentation.SlideShowSettings

    .RangeType = ppShowSlideRange

    .StartingSlide = 2

    .EndingSlide = 4

    .Run

End With

See also

Concepts

SlideShowSettings Object

Other resources

SlideShowSettings Object Members


LegendEntries.Parent Property (PowerPoint)

 Copy code hover
[image]

LegendEntries.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents a LegendEntries object.

See also

Concepts

LegendEntries Object

Other resources

LegendEntries Object Members


ParagraphFormat.HangingPunctuation Property (PowerPoint)

 Copy code hover
[image]

ParagraphFormat.HangingPunctuation Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the hanging punctuation option if you have an Asian language setting specified. Read/write.

Syntax

expression .HangingPunctuation

expression A variable that represents a ParagraphFormat object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The hanging punctuation option is not selected.
msoTrue | The hanging punctuation option is selected.

Example

This example selects hanging punctuation for the first paragraph of the active presentation.

VBA Copy code Copy code
ActivePresentation.Paragraphs(1).HangingPunctuation = msoTrue

See also

Concepts

ParagraphFormat Object

Other resources

ParagraphFormat Object Members


Point.Format Property (PowerPoint)

 Copy code hover
[image]

Point.Format Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Format

expression A variable that represents a Point object.

See also

Concepts

Series Object
Point Object

Other resources

Point Object Members
Series Object Members


LineFormat.EndArrowheadLength Property (PowerPoint)

 Copy code hover
[image]

LineFormat.EndArrowheadLength Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the length of the arrowhead at the end of the specified line. Read/write.

Syntax

expression .EndArrowheadLength

expression A variable that represents an LineFormat object.

Return Value

MsoArrowheadLength

Remarks

The EndArrowheadLength property value can be one of these MsoArrowheadLength constants.

msoArrowheadLengthMedium

msoArrowheadLengthMixed

msoArrowheadLong

msoArrowheadShort

Example

This example adds a line to myDocument. There's a short, narrow oval on the line's starting point and a long, wide triangle on its endpoint.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddLine(100, 100, 200, 300).Line

    .BeginArrowheadLength = msoArrowheadShort

    .BeginArrowheadStyle = msoArrowheadOval

    .BeginArrowheadWidth = msoArrowheadNarrow

    .EndArrowheadLength = msoArrowheadLong

    .EndArrowheadStyle = msoArrowheadTriangle

    .EndArrowheadWidth = msoArrowheadWide

End With

See also

Concepts

LineFormat Object

Other resources

LineFormat Object Members


UpBars.Creator Property (PowerPoint)

 Copy code hover
[image]

UpBars.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents an UpBars object.

See also

Concepts

UpBars Object

Other resources

UpBars Object Members


TickLabels.Application Property (PowerPoint)

 Copy code hover
[image]

TickLabels.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents a TickLabels object.

See also

Concepts

TickLabels Object

Other resources

TickLabels Object Members


CustomLayout.HeadersFooters Property (PowerPoint)

 Copy code hover
[image]

CustomLayout.HeadersFooters Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a HeadersFooters collection that represents the header, footer, date and time, and slide number associated with the specified custom layout.

Syntax

expression .HeadersFooters

expression A variable that represents a CustomLayout object.

Return Value

HeadersFooters

See also

Concepts

CustomLayout Object

Other resources

CustomLayout Object Members


SlideRange.ApplyTemplate2 Method (PowerPoint)

 Copy code hover
[image]

SlideRange.ApplyTemplate2 Method (PowerPoint)
Send feedback

Applies a design template and theme variant to the slide range.

Version information

Version Added: PowerPoint 2013

Syntax

expression .ApplyTemplate2(FileName,Variant)

expression A variable that represents a SlideRange object.

Parameters

Name | Required/Optional | Data type | Description
FileName | Required | String | Specifies the name of the design template.
Variant | Required | String | Specifies the name of the variant to apply.
FileName | Required | STRING |
Variant | Required | STRING |

Return value

VOID

Example

This example opens a theme file, gets the ID of the second variant in the theme, and applies it to the slides in the presentation.

VBA Copy code Copy code
Sub ChangeThemeVariant()

    Dim name As String
    Dim path As String
    Dim variantID As String
    Dim pptSlideRange As SlideRange

    ' Get the name of the active theme family.
    name = ActivePresentation.TemplateName

    ' You need access to the Theme Family in order to access the variants.
    path = "C:\Program Files (x86)\Microsoft Office\Document Themes 15\" & _
        ActivePresentation.TemplateName & ".thmx"

    ' Get the variant ID of the second Variant
    variantID = PowerPoint.Application.OpenThemeFile(path).ThemeVariants(2).Id

    ' Apply that variant to the range of slides.
    Set pptSlideRange = ActivePresentation.Slides.Range
    pptSlideRange.ApplyTemplate2 path, variantID

End Sub


Point.MarkerSize Property (PowerPoint)

 Copy code hover
[image]

Point.MarkerSize Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the data-marker size, in points. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .MarkerSize

expression A variable that represents a Point object.

Remarks

This property can have a value from 2 through 72.

See also

Concepts

Point Object

Other resources

Point Object Members


SlideShowWindow.Width Property (PowerPoint)

 Copy code hover
[image]

SlideShowWindow.Width Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the width of the specified object, in points. Read/write.

Syntax

expression .Width

expression A variable that represents a SlideShowWindow object.

Return Value

Single

Example

This example arranges windows one and two horizontally; in other words, each window occupies half the available vertical space and all the available horizontal space in the application window's client area. For this example to work, there must be only two document windows open.

VBA Copy code Copy code
Windows.Arrange ppArrangeTiled

ah = Windows(1).Height                      ' available height

aw = Windows(1).Width + Windows(2).Width    ' available width

With Windows(1)

    .Width = aw

    .Height = ah / 2

    .Left = 0

End With

With Windows(2)

    .Width = aw

    .Height = ah / 2

    .Top = ah / 2

    .Left = 0

End With

This example sets the width for column one in the specified table to 80 points (72 points per inch).

VBA Copy code Copy code
ActivePresentation.Slides(2).Shapes(5).Table.Columns(1).Width = 80

See also

Concepts

SlideShowWindow Object

Other resources

SlideShowWindow Object Members


Legend Properties (PowerPoint)

 Copy code hover
[image]

Legend Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Height | Returns or sets the height, in points, of the object. Read/write Double.
IncludeInLayout | True if a legend will occupy the chart layout space when a chart layout is being determined. The default is True. Read/write Boolean.
Left | Returns the distance, in points, from the left edge of the object to the left edge of the chart area. Read-only Double.
Name | Returns the name of the object. Read-only String.
Parent | Returns the parent for the specified object. Read-only Object.
Position | Returns or sets the position of the legend on the chart. Read/write XlLegendPosition.
Shadow | Returns or sets a value that indicates whether the object has a shadow. Read/write Boolean.
Top | Returns or sets the distance, in points, from the top edge of the object to the top of the first row (on a worksheet) or the top of the chart area (on a chart). Read/write Double.
Width | Returns or sets the width, in points, of the object. Read/write Double.


XlColorIndex Enumeration (PowerPoint)

 Copy code hover
[image]

XlColorIndex Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the color of a selected feature, such as a border, font, or fill.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlColorIndexAutomatic | -4105 | Automatic color.
xlColorIndexNone | -4142 | No color.


Presentations.Count Property (PowerPoint)

 Copy code hover
[image]

Presentations.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a Presentations object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

Presentations Object

Other resources

Presentations Object Members


ShapeRange.Flip Method (PowerPoint)

 Copy code hover
[image]

ShapeRange.Flip Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Flips the specified shape range around its horizontal or vertical axis.

Syntax

expression .Flip(FlipCmd)

expression A variable that represents a ShapeRange object.

Parameters

Name | Required/Optional | Data Type | Description
FlipCmd | Required | MsoFlipCmd | Specifies whether the shape is to be flipped horizontally or vertically.

Remarks

The FlipCmd parameter value can be one of these MsoFlipCmd constants.

msoFlipHorizontal

msoFlipVertical

Example

This example adds a triangle to myDocument, duplicates the triangle, and then flips the duplicate triangle vertically and makes it red.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes _

        .AddShape(msoShapeRightTriangle, 10, 10, 50, 50).Duplicate

    .Fill.ForeColor.RGB = RGB(255, 0, 0)

    .Flip msoFlipVertical

End With

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


Application.ProtectedViewWindowBeforeClose Event (PowerPoint)

 Copy code hover
[image]

Application.ProtectedViewWindowBeforeClose Event (PowerPoint)
See also Send feedback

Published: July 16, 2012

Occurs immediately before a protected view window or a document in a protected view window closes.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .ProtectedViewWindowBeforeClose(ProtViewWindow, ProtectedViewCloseReason, Cancel)

expression A variable that represents an Application object.

Parameters

Name | Required/Optional | Data Type | Description
ProtViewWindow | Required | ProtectedViewWindow | The protected view window that is closed.
ProtectedViewCloseReason | Required | PpProtectedViewCloseReason | A constant that specifies the reason the protected view window is closed.
Cancel | Required | Boolean | False when the event occurs. If the event procedure sets this argument to True, the window does not close when the procedure is finished.

Return Value

nothing

Remarks

If the ProtectedViewWindowsBeforeClose event is called as part of the ProtectedViewWindow.Edit method, setting Cancel to True produces no action.

See also

Concepts

Application Object

Other resources

Application Object Members


PpFixedFormatIntent Enumeration (PowerPoint)

 Copy code hover
[image]

PpFixedFormatIntent Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Constants that specify the intent of the fixed-format file export, passed to the ExportAsFixedFormat method of the Presentation object.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppFixedFormatIntentPrint | 2 | Intent is to print exported file.
ppFixedFormatIntentScreen | 1 | Intent is to view exported file on screen.


Application.DisplayAlerts Property (PowerPoint)

 Copy code hover
[image]

Application.DisplayAlerts Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns whether Microsoft PowerPoint displays alerts while running a macro. Read/write.

Syntax

expression .DisplayAlerts

expression A variable that represents an Application object.

Return Value

PpAlertLevel

Remarks

The value of the DisplayAlerts property is not reset once a macro stops running; it is maintained throughout a session. It is not stored across sessions, so when PowerPoint begins, it is reset to ppAlertsNone.

The value of the DisplayAlerts property can be one of these PpAlertLevel constants.

Constant | Description
ppAlertsAll | All message boxes and alerts are displayed; errors are returned to the macro.
ppAlertsNone | The default. No alerts or message boxes are displayed. If a macro encounters a message box, the default value is chosen and the macro continues.

Example

The following line of code instructs PowerPoint to display all message boxes and alerts, returning errors to the macro.

VBA Copy code Copy code
Sub SetAlert

    Application.DisplayAlerts = ppAlertsAll

End Sub

See also

Concepts

Application Object

Other resources

Application Object Members


Guide Properties (PowerPoint)

 Copy code hover
[image]

Guide Properties (PowerPoint)
Send feedback

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Color | Returns a ColorFormat object that represents the color of the drawing guide. Read-only.
Orientation | Returns the orientation of the drawing guide (horizontal or vertical) as a constant from the PpGuideOrientation enumeration. Read-only.
Parent | Returns the parent for the specified object. Read-only Object.
Position | Returns or sets a Single that represents the position of the drawing guide along the x- or y-axis. Read/write.


Comment.Parent Property (PowerPoint)

 Copy code hover
[image]

Comment.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a Comment object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

Comment Object

Other resources

Comment Object Members


TabStops Object (PowerPoint)

 Copy code hover
[image]

TabStops Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

A collection of all the TabStop objects on one ruler.

Example

Use the TabStops property to return the TabStops collection. The following example clears all the tab stops for the text in shape two on slide one in the active presentation.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(2) _

        .TextFrame.Ruler.TabStops

    For t = .Count To 1 Step -1

        .Item(t).Clear

    Next

End With

Use the Add method to create a tab stop and add it to the TabStops collection. The following example adds a tab stop to the body-text style on the slide master for the active presentation. The new tab stop will be positioned 2 inches (144 points) from the left edge of the ruler and will be left aligned.

VBA Copy code Copy code
ActivePresentation.SlideMaster _

    .TextStyles(ppBodyStyle).Ruler.TabStops.Add ppTabStopLeft, 144

See also

Concepts

PowerPoint Object Model Reference

Other resources

TabStops Object Members


Chart.GapDepth Property (PowerPoint)

 Copy code hover
[image]

Chart.GapDepth Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the distance, as a percentage of the marker width, between the data series in a 3-D chart. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .GapDepth

expression A variable that represents a Chart object.

Remarks

The value of this property must be between 0 and 500.

Note Note

This property applies only to 3-D charts.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the distance between the data series for the first chart in the active document to 200 percent of the marker width. You should run the example on a 3-D chart (the GapDepth property fails on 2-D charts).

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.GapDepth = 200

    End If

End With

See also

Concepts

Chart Object

Other resources

Chart Object Members


FillFormat.TextureAlignment Property (PowerPoint)

 Copy code hover
[image]

FillFormat.TextureAlignment Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the alignment (the origin of the coordinate grid) for the tiling of the texture fill. Read/write.

Syntax

expression .TextureAlignment

expression An expression that returns a FillFormat object.

Return Value

MsoTextureAlignment

Remarks

The value returned by the TextureAlignment property can be one of these MsoTextureAlignment constants.

msoTextureTopLeft

msoTextureTop

msoTextureTopRight

msoTextureLeft

msoTextureCenter

msoTextureRight

msoTextureBottomLeft

msoTextureBottom

msoTextureBottomRight

The setting of the TextureAlignment property corresponds to the setting of the Alignment box under Tiling Options on the Fill pane of the Format Picture dialog box in the Microsoft PowerPoint user interface (under Drawing Tools, on the Format Tab, in the Shape Styles group, click Format Shape.)

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


CustomLayout.Cut Method (PowerPoint)

 Copy code hover
[image]

CustomLayout.Cut Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the specified object and places it on the Clipboard.

Syntax

expression .Cut

expression A variable that represents a CustomLayout object.

See also

Concepts

CustomLayout Object

Other resources

CustomLayout Object Members


ShapeRange.LockAspectRatio Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.LockAspectRatio Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the specified shape retains its original proportions when you resize it. Read/write.

Syntax

expression .LockAspectRatio

expression A variable that represents a ShapeRange object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | You can change the height and width of the shape independently of one another when you resize it.
msoTrue | The specified shape retains its original proportions when you resize it.

Example

This example adds a cube to myDocument. The cube can be moved and resized, but not reproportioned.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes.AddShape(msoShapeCube, 50, 50, 100, 200) _

    .LockAspectRatio = msoTrue

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


Placeholders Properties (PowerPoint)

 Copy code hover
[image]

Placeholders Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


ConnectorFormat Methods (PowerPoint)

 Copy code hover
[image]

ConnectorFormat Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
BeginConnect | Attaches the beginning of the specified connector to a specified shape.
BeginDisconnect | Detaches the beginning of the specified connector from the shape it is attached to.
EndConnect | Attaches the end of the specified connector to a specified shape.
EndDisconnect | Detaches the end of the specified connector from the shape it is attached to. This method doesn't alter the size or position of the connector: the end of the connector remains positioned at a connection site but is no longer connected. Use the BeginDisconnect method to detach the beginning of the connector from a shape.


ChartTitle.FormulaR1C1 Property (PowerPoint)

 Copy code hover
[image]

ChartTitle.FormulaR1C1 Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the formula for the object, using R1C1-style notation in the language of the macro. Read/write String.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .FormulaR1C1

expression A variable that represents a ChartTitle object.

Remarks

If the cell contains a constant, this property returns the constant. If the cell is empty, the property returns an empty string. If the cell contains a formula, the property returns the formula as a string, in the same format in which it would be displayed in the formula bar (including the equal sign).

If you set the value or formula of a cell to a date, Microsoft PowerPoint verifies whether that cell is already formatted with one of the date or time number formats. If not, the number format is changed to the default short date number format.

If the range is a one-dimensional or two-dimensional range, you can set the formula to a Visual Basic array of the same dimensions. Similarly, you can put the formula into a Visual Basic array.

Setting the formula of a multiple-cell range fills all cells in the range with the formula.

See also

Concepts

ChartTitle Object

Other resources

ChartTitle Object Members


Broadcast.Pause Method (PowerPoint)

 Copy code hover
[image]

Broadcast.Pause Method (PowerPoint)
Send feedback

Pauses the specified broadcast.

Version information

Version Added: PowerPoint 2013

Syntax

expression .Pause

expression A variable that represents a Broadcast object.

Return value

VOID

Remarks

If the specified broadcast is not in progress, Pause returns runtime error 4702.


Shapes.AddPolyline Method (PowerPoint)

 Copy code hover
[image]

Shapes.AddPolyline Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Creates an open polyline or a closed polygon drawing. Returns a Shape object that represents the new polyline or polygon.

Syntax

expression .AddPolyline(SafeArrayOfPoints)

expression A variable that represents a Shapes object.

Parameters

Name | Required/Optional | Data Type | Description
SafeArrayOfPoints | Required | Variant | An array of coordinate pairs that specifies the polyline drawing's vertices.

Return Value

Shape

Remarks

To form a closed polygon, assign the same coordinates to the first and last vertices in the polyline drawing.

Example

This example adds a triangle to myDocument. Because the first and last points have the same coordinates, the polygon is closed and filled. The color of the triangle's interior will be the same as the default shape's fill color.

VBA Copy code Copy code
Dim triArray(1 To 4, 1 To 2) As Single

triArray(1, 1) = 25

triArray(1, 2) = 100

triArray(2, 1) = 100

triArray(2, 2) = 150

triArray(3, 1) = 150

triArray(3, 2) = 50

triArray(4, 1) = 25     ' Last point has same coordinates as first

triArray(4, 2) = 100

Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes.AddPolyline SafeArrayOfPoints:=triArray

See also

Concepts

Shapes Object

Other resources

Shapes Object Members


PublishObject Properties (PowerPoint)

 Copy code hover
[image]

PublishObject Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
FileName | Returns or sets the path and file name of the Web presentation created when all or part of the active presentation is published. Read/write.
HTMLVersion | Returns or sets the version of HTML for a published presentation. Read/write.
Parent | Returns the parent object for the specified object.
RangeEnd | Returns or sets the number of the last slide in a range of slides you are publishing as a Web presentation. Read/write.
RangeStart | Returns or sets the number of the first slide in a range of slides you are publishing as a Web presentation. Read/write.
SlideShowName | Returns or sets the name of the custom slide show to be published as a Web presentation. Read/write.
SourceType | Returns or sets the source type of the presentation to be published to HTML. Read/write.
SpeakerNotes | Determines whether speaker notes are to be published with the presentation. Read/write.


Shape.MediaFormat Property (PowerPoint)

 Copy code hover
[image]

Shape.MediaFormat Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Allows access to the new audio or video object. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .MediaFormat

expression A variable that represents a Shape object.

Remarks

All shapes of type msoMedia will have a MediaFormat.

See also

Concepts

Shape Object

Other resources

Shape Object Members


AddIn.Application Property (PowerPoint)

 Copy code hover
[image]

AddIn.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents an AddIn object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

AddIn Object

Other resources

AddIn Object Members


Application.SlideShowEnd Event (PowerPoint)

 Copy code hover
[image]

Application.SlideShowEnd Event (PowerPoint)
See also Send feedback

Published: July 16, 2012

Occurs after a slide show ends, immediately after the last SlideShowNextSlide event occurs.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .SlideShowEnd(Pres)

expression An expression that returns a Application object.

Parameters

Name | Required/Optional | Data Type | Description
Pres | Required | Presentation | The presentation closed when this event occurs.

Remarks

The SlideShowEnd event always occurs before a slide show ends if the SlideShowBegin event has occurred. You can use the SlideShowEnd event to return any property settings and variable initializations that occur in the SlideShowBegin event to their original settings.

For information about using events with the Application object, see How to: Use Events with the Application Object.

Example

This example turns off the entry effect and automatic advance timing slide show transition effects for slides one through four at the end of the slide show. It also sets the slides to advance manually.

VBA Copy code Copy code
Private Sub App_SlideShowEnd(ByVal Pres As Presentation)

    With Pres.Slides.Range(Array(1, 4)) _

            .SlideShowTransition

        .EntryEffect = ppEffectNone

        .AdvanceOnTime = msoFalse

    End With

    With Pres.SlideShowSettings

        .AdvanceMode = ppSlideShowManualAdvance

    End With

End Sub

See also

Concepts

Application Object

Other resources

Application Object Members


Points Methods (PowerPoint)

 Copy code hover
[image]

Points Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Item | Returns a single object from a collection.


FreeformBuilder.Parent Property (PowerPoint)

 Copy code hover
[image]

FreeformBuilder.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a FreeformBuilder object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

FreeformBuilder Object

Other resources

FreeformBuilder Object Members


ChartFormat.SoftEdge Property (PowerPoint)

 Copy code hover
[image]

ChartFormat.SoftEdge Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the soft edge formatting for a shape. Read-only SoftEdgeFormat.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .SoftEdge

expression A variable that represents a ChartFormat object.

See also

Concepts

ChartFormat Object

Other resources

ChartFormat Object Members


RulerLevel.Application Property (PowerPoint)

 Copy code hover
[image]

RulerLevel.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a RulerLevel object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

RulerLevel Object

Other resources

RulerLevel Object Members


AxisTitle.Height Property (PowerPoint)

 Copy code hover
[image]

AxisTitle.Height Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns the height, in points, of the object. Read-only

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Height

expression A variable that represents an AxisTitle object.

Return Value

Double

See also

Concepts

AxisTitle Object

Other resources

AxisTitle Object Members


Points.Creator Property (PowerPoint)

 Copy code hover
[image]

Points.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents a Points object.

See also

Concepts

Points Object

Other resources

Points Object Members


ChartFormat.TextFrame2 Property (PowerPoint)

 Copy code hover
[image]

ChartFormat.TextFrame2 Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the text formatting for the specified chart element. Read-only TextFrame2.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .TextFrame2

expression A variable that represents a ChartFormat object.

See also

Concepts

ChartFormat Object

Other resources

ChartFormat Object Members


ShapeRange.Adjustments Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.Adjustments Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Adjustments object that contains adjustment values for all the adjustments in the specified shape. Applies to any ShapeRange object that represents an AutoShape, WordArt, or a connector. Read-only.

Syntax

expression .Adjustments

expression A variable that represents a ShapeRange object.

Return Value

Adjustments

Example

This example sets to 0.25 the value of adjustment one for shape three on myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes(3).Adjustments(1) = 0.25

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


ChartBorder Members (PowerPoint)

 Copy code hover
[image]

ChartBorder Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents the border of an object.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Color | Returns or sets the primary color of the object. Read/write Variant.
ColorIndex | Returns or sets the color of the border. Read/write Variant.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
LineStyle | Returns or sets the line style for the border. Read/write XlLineStyle, xlGray25, xlGray50, xlGray75, or xlAutomatic.
Parent | Returns the parent for the specified object. Read-only Object.
Weight | Returns or sets the weight of the border. Read/write XlBorderWeight.


How do I... (PowerPoint 2013 developer reference)

 Copy code hover
[image]

How do I... (PowerPoint 2013 developer reference)
See also Send feedback

This section contains programming tasks (how-to and walkthrough topics) for common Microsoft PowerPoint scenarios.

The following list provides links to important procedure-based Help topics:

  • How to: Add Controls to Documents

  • How to: Add Controls to UserForms

  • How to: Control One Microsoft Office Application from Another

  • How to: Create Custom Dialog Boxes

  • How to: Create UserForms

  • How to: Display Custom Dialog Boxes

  • How to: Initialize Control Properties

  • How to: Publish Web Presentations

  • How to: Return Objects from Collections

  • How to: Set Control Properties

  • How to: Use ActiveX Controls on Documents

  • How to: Use ActiveX Controls on Slides

  • How to: Use Control Values While Code Is Running

  • How to: Use Events with the Application Object

  • How to: Work with Panes and Views

  • How to: Work with Shapes (Drawing Objects)

  • How to: Work with Tables

See also

Concepts

Welcome to the PowerPoint 2013 developer reference


Placeholders Methods (PowerPoint)

 Copy code hover
[image]

Placeholders Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
FindByName | Finds the placeholder in the Placeholders collection at the specified index location or with the specified name.
Item | Returns a single Shape object from the specified Placeholders collection.


Cell Object (PowerPoint)

 Copy code hover
[image]

Cell Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a table cell. The Cell object is a member of the CellRange collection. The CellRange collection represents all the cells in the specified column or row. To use the CellRange collection, use the Cells keyword.

Remarks

You cannot programmatically add cells to or delete cells from a PowerPoint table. Use the Add method of the Columns or Rows collections to add a column or row to a table. Use the Delete method of the Columns or Rows collections to delete a column or row from a table.

Example

Use Cell(row, column), where row is the row number and column is the column number, or Cells(index), where index is the number of the cell in the specified row or column, to return a single Cell object. Cells are numbered from left to right in rows and from top to bottom in columns. With right-to-left language settings, this scheme is reversed. The following example merges the first two cells in row one of the table in shape five on slide two.

VBA Copy code Copy code
With ActivePresentation.Slides(2).Shapes(5).Table

    .Cell(1, 1).Merge MergeTo:=.Cell(1, 2)

End With

This example sets the bottom border for cell one in the first column of the table to a dashed line style.

VBA Copy code Copy code
With ActivePresentation.Slides(2).Shapes(5).Table.Columns(1) _

        .Cells(1)

    .Borders(ppBorderBottom).DashStyle = msoLineDash

End With

Use the Shape property to access the Shape object and to manipulate the contents of each cell. This example deletes the text in the first cell (row 1, column 1), inserts new text, and then sets the width of the entire column to 110 points.

VBA Copy code Copy code
With ActivePresentation.Slides(2).Shapes(5).Table.Cell(1, 1)

    .Shape.TextFrame.TextRange.Delete

    .Shape.TextFrame.TextRange.Text = "Rooster"

    .Parent.Columns(1).Width = 110

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

Cell Object Members


LinkFormat Object (PowerPoint)

 Copy code hover
[image]

LinkFormat Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Contains properties and methods that apply to linked OLE objects, linked pictures, and IIRC media objects.

Example

Use the LinkFormat property to return a LinkFormat object. The following example loops through all the shapes on all the slides in the active presentation and sets all linked Microsoft Excel worksheets to be updated manually.

VBA Copy code Copy code
For Each sld In ActivePresentation.Slides

    For Each sh In sld.Shapes

        If sh.Type = msoLinkedOLEObject Then

            If sh.OLEFormat.ProgID = "Excel.Sheet" Then

                sh.LinkFormat.AutoUpdate = ppUpdateOptionManual

            End If

        End If

    Next

Next

See also

Concepts

PowerPoint Object Model Reference

Other resources

LinkFormat Object Members


Hyperlink Properties (PowerPoint)

 Copy code hover
[image]

Hyperlink Properties (PowerPoint)
Send feedback

Published: July 12, 2012

This object has the following properties:

Properties

Name | Description
Address | Returns or sets the Internet address (URL) to the target document. Read/write.
Application | Returns an Application object that represents the creator of the specified object.
EmailSubject | Returns or sets the text string of the hyperlink subject line. The subject line is appended to the Internet address (URL) of the hyperlink. Read/write.
Parent | Returns the parent object for the specified object.
ScreenTip | Returns or sets the ScreenTip text of a hyperlink. Read/write.
ShowAndReturn | Determines if and under what circumstances Microsoft PowerPoint returns to the initiating slide show. Read/write.
SubAddress | Returns or sets the location within a document — such as a bookmark in a word document, a range in a Microsoft Office Excel worksheet, or a slide in a Microsoft PowerPoint presentation — associated with the specified hyperlink. Read/write.
TextToDisplay | Returns or sets the display text for a hyperlink not associated with a graphic. Read/write.
Type | Represents the type of hyperlink. Read-only.


PpNumberedBulletStyle Enumeration (PowerPoint)

 Copy code hover
[image]

PpNumberedBulletStyle Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the bullet style.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppBulletAlphaLCParenBoth | 8 | Lowercase alphabetical characters with both parentheses.
ppBulletAlphaLCParenRight | 9 | Lowercase alphabetical characters with closing parenthesis.
ppBulletAlphaLCPeriod | 0 | Lowercase alphabetical characters with a period.
ppBulletAlphaUCParenBoth | 10 | Uppercase alphabetical characters with both parentheses.
ppBulletAlphaUCParenRight | 11 | Uppercase alphabetical characters with closing parenthesis.
ppBulletAlphaUCPeriod | 1 | Uppercase alphabetical characters with a period.
ppBulletArabicAbjadDash | 24 | Arabic Abjad alphabets with a dash.
ppBulletArabicAlphaDash | 23 | Arabic language alphabetical characters with a dash.
ppBulletArabicDBPeriod | 29 | Double-byte Arabic numbering scheme with double-byte period.
ppBulletArabicDBPlain | 28 | Double-byte Arabic numbering scheme (no punctuation).
ppBulletArabicParenBoth | 12 | Arabic numerals with both parentheses.
ppBulletArabicParenRight | 2 | Arabic numerals with closing parenthesis.
ppBulletArabicPeriod | 3 | Arabic numerals with a period.
ppBulletArabicPlain | 13 | Arabic numerals.
ppBulletCircleNumDBPlain | 18 | Double-byte circled number for values up to 10.
ppBulletCircleNumWDBlackPlain | 20 | Shadow color number with circular background of normal text color.
ppBulletCircleNumWDWhitePlain | 19 | Text colored number with same color circle drawn around it.
ppBulletHebrewAlphaDash | 25 | Hebrew language alphabetical characters with a dash.
ppBulletHindiAlpha1Period | 40 | Hindi Alpha1 period.
ppBulletHindiAlphaPeriod | 36 | Hindi Alpha period.
ppBulletHindiNumParenRight | 39 | Hindi Num Paren right.
ppBulletHindiNumPeriod | 37 | Hindi Num period.
ppBulletKanjiKoreanPeriod | 27 | Japanese/Korean numbers with a period.
ppBulletKanjiKoreanPlain | 26 | Japanese/Korean numbers without a period.
ppBulletKanjiSimpChinDBPeriod | 38 | Kanji Simple Chinese DBPeriod
ppBulletRomanLCParenBoth | 4 | Lowercase Roman numerals with both parentheses.
ppBulletRomanLCParenRight | 5 | Lowercase Roman numerals with closing parenthesis.
ppBulletRomanLCPeriod | 6 | Lowercase Roman numerals with period.
ppBulletRomanUCParenBoth | 14 | Uppercase Roman numerals with both parentheses.
ppBulletRomanUCParenRight | 15 | Uppercase Roman numerals with closing parenthesis.
ppBulletRomanUCPeriod | 7 | Uppercase Roman numerals with period.
ppBulletSimpChinPeriod | 17 | Simplified Chinese with a period.
ppBulletSimpChinPlain | 16 | Simplified Chinese without a period.
ppBulletStyleMixed | -2 | Any undefined style.
ppBulletThaiAlphaParenBoth | 32 | Thai Alpha Paren both.
ppBulletThaiAlphaParenRight | 31 | Thai Alpha Paren right.
ppBulletThaiAlphaPeriod | 30 | Thai Alpha period.
ppBulletThaiNumParenBoth | 35 | Thai Num Paren both.
ppBulletThaiNumParenRight | 34 | Thai Num Paren right.
ppBulletThaiNumPeriod | 33 | Thai Num period.
ppBulletTradChinPeriod | 22 | Traditional Chinese with a period.
ppBulletTradChinPlain | 21 | Traditional Chinese without a period.


ExtraColors Members (PowerPoint)

 Copy code hover
[image]

ExtraColors Members (PowerPoint)
Send feedback

Published: July 12, 2012

Represents the extra colors in a presentation. The object can contain up to eight colors, each of which is represented by an red-green-blue (RGB) value.

Methods

Name | Description
Add | Adds a color to the extra colors available to a presentation, if the color hasn't already been added.
Clear | Clears the extra colors in a presentation.
Item | Returns a single color from the specified ExtraColors collection.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


AddIn Object (PowerPoint)

 Copy code hover
[image]

AddIn Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a single add-in, either loaded or not loaded.

Remarks

The AddIn object is a member of the AddIns collection. The AddIns collection contains all of the Microsoft PowerPoint-specific add-ins available, regardless of whether or not they are loaded. The collection does not include Component Object Model (COM) add-ins.

Example

Use AddIns(index), where index is the add-in's title or index number, to return a single AddIn object. The following example loads the My Ppt Tools add-in.

VBA Copy code Copy code
AddIns("my ppt tools").Loaded = True

The add-in title, shown above, should not be confused with the add-in name, which is the file name of the add-in. You must spell the add-in title exactly as it is spelled in the Add-Ins tab, but the capitalization does not have to match.

The index number represents the position of the add-in in the Add-Ins tab. The following example displays the names of all the add-ins that are currently loaded in PowerPoint.

VBA Copy code Copy code
For i = 1 To AddIns.Count

    If AddIns(i).Loaded Then MsgBox AddIns(i).Name

Next

Use the Add method to add a PowerPoint-specific add-in to the list of those available. Note, however, that using this method does not load the add-in. To load the add-in, set the Loaded property of the add-in to True after you use the Add method. You can perform both of these actions in a single step, as shown in the following example (note that you use the name of the add-in, not its title, with the Add method).

VBA Copy code Copy code
AddIns.Add("generic.ppa").Loaded = True

Use AddIns(index), where index is the add-in's title, to return a reference to the loaded add-in. The following example sets the presAddin variable to the add-in titled "my ppt tools" and sets the myName variable to the name of the add-in.

VBA Copy code Copy code
Set presAddin = AddIns("my ppt tools")

With presAddin

    myName = .Name

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

AddIn Object Members


Presentation.Export Method (PowerPoint)

 Copy code hover
[image]

Presentation.Export Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Exports each slide in the presentation, using the specified graphics filter, and saves the exported files in the specified folder.

Syntax

expression .Export(Path, FilterName, ScaleWidth, ScaleHeight)

expression A variable that represents a Presentation object.

Parameters

Name | Required/Optional | Data Type | Description
Path | Required | String | The path of the folder where you want to save the exported slides. You can include a full path; if you don't do this, Microsoft PowerPoint creates a subfolder in the current folder for the exported slides.
FilterName | Required | String | The graphics format in which you want to export slides. The specified graphics format must have an export filter registered in the Windows registry. You can specify either the registered extension or the registered filter name. PowerPoint will first search for a matching extension in the registry. If no extension that matches the specified string is found, PowerPoint will look for a filter name that matches.
ScaleWidth | Optional | Long | The width in pixels of an exported slide.
ScaleHeight | Optional | Long | The height in pixels of an exported slide.

Remarks

Exporting a presentation doesn't set the Saved property of a presentation to True.

PowerPoint uses the specified graphics filter to save each individual slide in the presentation. The names of the slides exported and saved to disk are determined by PowerPoint. They're typically saved by using names such as Slide1.wmf, Slide2.wmf. The path of the saved files is specified in the Path argument.

Example

This example saves the active presentation as a Microsoft PowerPoint presentation and then exports each slide in the presentation as a Portable Network Graphics (PNG) file that will be saved in the Current Work folder. The example also exports each slide with a height of 100 pixels and a width of 100 pixels.

VBA Copy code Copy code
With ActivePresentation

    .SaveAs FileName:="c:\Current Work\Annual Sales", _

        FileFormat:=ppSaveAsPresentation

    .Export Path:="c:\Current Work", FilterName:="png", _

        ScaleWidth:=100, ScaleHeight:=100

End With

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


Point Object (PowerPoint)

 Copy code hover
[image]

Point Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a single point in a series in a chart.

Version Information

Version Added: PowerPoint 2007

Remarks

The Point object is a member of the Points collection. The Points collection contains all the points in one series.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

Use Points(Index), where Index is the point index number, to return a single Point object. Points are numbered from left to right on the series. Points(1) is the leftmost point, and Points(Points.Count) is the rightmost point. The following example sets the marker style for the third point in series one for the first chart in the active document. The specified series must be a 2-D line, scatter, or radar series.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).Points(3).MarkerStyle = xlDiamond

    End If

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

Point Object Members


Rows.Application Property (PowerPoint)

 Copy code hover
[image]

Rows.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a Rows object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

Rows Object

Other resources

Rows Object Members


MediaFormat.MediaBookmarks Property (PowerPoint)

 Copy code hover
[image]

MediaFormat.MediaBookmarks Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a MediaBookmarks collection that represents the media bookmarks associated with the specified object. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .MediaBookmarks

expression An expression that returns a MediaFormat object.

Return Value

MediaBookmarks

See also

Concepts

MediaFormat Object

Other resources

MediaFormat Object Members


ChartCategory.IsFiltered Property (PowerPoint)

 Copy code hover
[image]

ChartCategory.IsFiltered Property (PowerPoint)
Send feedback

Returns or sets a Boolean that determines whether the specified chart category is filtered out from the chart. Read-write.

Version information

Version Added: PowerPoint 2013

Syntax

expression .IsFiltered

expression A variable that represents a ChartCategory object.

Property value

BOOL


Shape Members (PowerPoint)

 Copy code hover
[image]

Shape Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents an object in the drawing layer, such as an AutoShape, freeform, OLE object, or picture.

Methods

Name | Description
Apply | Applies to the specified shape formatting that's been copied by using the PickUp method.
ApplyAnimation | Applies the last picked up animation to the Shape object.
ConvertTextToSmartArt | Converts text in a Shape object to a SmartArt diagram.
Copy | Copies the specified object to the Clipboard.
Cut | Deletes the specified object and places it on the Clipboard.
Delete | Deletes the specified Shape object.
Duplicate | Creates a duplicate of the specified Shape object, adds the new shape to the Shapes collection, and then returns a new ShapeRange object. The duplicated objects are placed at the end of the Shapes collection.
Flip | Flips the specified shape around its horizontal or vertical axis.
IncrementLeft | Moves the specified shape horizontally by the specified number of points.
IncrementRotation | Changes the rotation of the specified shape around the z-axis by the specified number of degrees. Use the Rotation property to set the absolute rotation of the shape.
IncrementTop | Moves the specified shape vertically by the specified number of points.
PickUp | Copies the formatting of the specified shape. Use the Apply method to apply the copied formatting to another shape.
PickupAnimation | Picks up all animation from the Shape object.
RerouteConnections | Reroutes connectors so that they take the shortest possible path between the shapes they connect. To do this, the RerouteConnections method may detach the ends of a connector and reattach them to different connecting sites on the connected shapes.
ScaleHeight | Scales the height of the shape by a specified factor.
ScaleWidth | Scales the width of the shape by a specified factor. For pictures and OLE objects, you can indicate whether you want to scale the shape relative to the original size or relative to the current size. Shapes other than pictures and OLE objects are always scaled relative to their current width.
Select | Selects the specified object.
SetShapesDefaultProperties | Applies the formatting for the specified shape to the default shape. Shapes created after this method has been used will have this formatting applied to them by default.
Ungroup | Ungroups any grouped shapes in the specified shape or range of shapes. Disassembles pictures and OLE objects within the specified shape or range of shapes. Returns the ungrouped shapes as a single ShapeRange object.
UpgradeMedia | Converts a legacy media object to an updated media object.
ZOrder | Moves the specified shape in front of or behind other shapes in the collection (that is, changes the shape's position in the z-order).

Properties

Name | Description
ActionSettings | Returns an ActionSettings object that contains information about what action occurs when the user clicks or moves the mouse over the specified shape or text range during a slide show. Read-only.
Adjustments | Returns an Adjustments object that contains adjustment values for all the adjustments in the specified shape. Applies to any Shape object that represents an AutoShape, WordArt, or a connector. Read-only.
AlternativeText | Returns or sets the alternative text associated with a shape in a Web presentation. Read/write.
AnimationSettings | Returns an AnimationSettings object that represents all the special effects you can apply to the animation of the specified shape. Read-only.
Application | Returns an Application object that represents the creator of the specified object.
AutoShapeType | Returns or sets the shape type for the specified Shape object, which must represent an AutoShape other than a line, freeform drawing, or connector. Read/write.
BackgroundStyle | Sets or returns the background style of the specified object. Read/write.
BlackWhiteMode | Returns or sets a value that indicates how the specified shape appears when the presentation is viewed in black-and-white mode. Read/write.
Callout | Returns a CalloutFormat object that contains callout formatting properties for the specified shape. Applies to Shape or ShapeRange objects that represent line callouts. Read-only.
Chart | Returns a Chart object of the current Shape object. Read-only.
Child | MsoTrue if the shape is a child shape or if all shapes in a shape range are child shapes of the same parent. Read-only.
ConnectionSiteCount | Returns the number of connection sites on the specified shape. Read-only.
Connector | Determines whether the specified shape is a connector. Read-only.
ConnectorFormat | Returns a ConnectorFormat object that contains connector formatting properties. Applies to Shape or ShapeRange objects that represent connectors. Read-only.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
CustomerData | Returns a CustomerData object. Read-only.
Fill | Returns a FillFormat object that contains fill formatting properties for the specified shape. Read-only.
Glow | Returns the glow format for the specified shape. Read-only.
GroupItems | Returns a GroupShapes object that represents the individual shapes in the specified group. Use the Item method of the GroupShapes object to return a single shape from the group. Read-only.
HasChart | Returns whether the shape represented by the specified object contains a chart. Read-only.
HasSmartArt | Returns True if the current Shape object contains a SmartArt diagram. Read-only.
HasTable | Returns whether the specified shape is a table. Read-only.
HasTextFrame | Returns whether the specified shape has a text frame. Read-only.
Height | Returns or sets the height of the specified object, in points. Read/write.
HorizontalFlip | Returns whether the specified shape is flipped around the horizontal axis. Read-only.
Id | Returns a Long that identifies the shape or range of shapes. Read-only.
Left | Returns or sets a Single that represents the distance in points from the left edge of the shape's bounding box to the left edge of the slide. Read/write.
Line | Returns a LineFormat object that contains line formatting properties for the specified shape. (For a line, the LineFormat object represents the line itself; for a shape with a border, the LineFormat object represents the border.) Read-only.
LinkFormat | Returns a LinkFormat object that contains the properties that are unique to linked OLE objects. Read-only.
LockAspectRatio | Determines whether the specified shape retains its original proportions when you resize it. Read/write.
MediaFormat | Allows access to the new audio or video object. Read-only.
MediaType | Returns the OLE media type. Read-only.
Name | When a shape is created, Microsoft PowerPoint automatically assigns it a name in the form ShapeType Number, where ShapeType identifies the type of shape or AutoShape, and Number is an integer that's unique within the collection of shapes on the slide. For example, the automatically generated names of the shapes on a slide could be Placeholder 1, Oval 2, and Rectangle 3. To avoid conflict with automatically assigned names, don't use the form ShapeType Number for user-defined names, where ShapeType is a value that is used for automatically generated names, and Number is any positive integer. A shape range must contain exactly one shape. Read/write.
Nodes | Returns a ShapeNodes collection that represents the geometric description of the specified shape. Applies to Shape objects that represent freeform drawings.
OLEFormat | Returns an OLEFormat object that contains OLE formatting properties for the specified shape. Applies to Shape or ShapeRange objects that represent OLE objects. Read-only.
Parent | Returns the parent object for the specified object.
ParentGroup | Returns a Shape object that represents the common parent shape of a child shape or a range of child shapes.
PictureFormat | Returns a PictureFormat object that contains picture formatting properties for the specified shape. Read-only.
PlaceholderFormat | Returns a PlaceholderFormat object that contains the properties that are unique to placeholders. Read-only.
Reflection | Returns the reflection format for the specified shape. Read-only.
Rotation | Returns or sets the number of degrees the specified shape is rotated around the z-axis. Read/write.
Shadow | Returns a ShadowFormat object that contains shadow formatting properties for the specified shape. Read-only.
ShapeStyle | Sets or returns the shape style index for the specified object. Read/write.
SmartArt | Returns a Microsoft Office SmartArt object that represents the SmartArt diagram of the Shape object. Read-only.
SoftEdge | Returns the soft edge format for the specified shape. Read-only.
Table | Returns a Table object that represents a table in a shape or in a shape range. Read-only.
Tags | Returns a Tags object that represents the tags for the specified object. Read-only.
TextEffect | Returns a TextEffectFormat object that contains text-effect formatting properties for the specified shape. Read-only.
TextFrame | Returns a TextFrame object that contains the alignment and anchoring properties for the specified shape or master text style.
TextFrame2 | Returns the TextFrame2 object associated with the specified Shape object that contains the alignment and anchoring properties for the specified shape. Read-only.
ThreeD | Returns a ThreeDFormat object that contains 3-D - effect formatting properties for the specified shape. Read-only.
Title | Returns a Shape object that represents the slide title. Read-only.
Top | Returns or sets a Single that represents the distance from the top edge of the shape's bounding box to the top edge of the document. Read/write.
Type | Represents the type of shape or shapes in a range of shapes. Read-only.
VerticalFlip | Determines whether the specified shape is flipped around the vertical axis. Read-only.
Vertices | Returns the coordinates of the specified freeform drawing's vertices (and control points for Bézier curves) as a series of coordinate pairs. Read-only.
Visible | Returns or sets the visibility of the specified object or the formatting applied to the specified object. Read/write.
Width | Returns or sets the width of the specified object, in points. Read/write.
ZOrderPosition | Returns the position of the specified shape in the z-order. Read-only.


AnimationPoints.Parent Property (PowerPoint)

 Copy code hover
[image]

AnimationPoints.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents an AnimationPoints object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

AnimationPoints Object

Other resources

AnimationPoints Object Members


TextEffectFormat Members (PowerPoint)

 Copy code hover
[image]

TextEffectFormat Members (PowerPoint)
Send feedback

Published: July 16, 2012

Contains properties and methods that apply to WordArt objects.

Methods

Name | Description
ToggleVerticalText | Switches the text flow in the specified WordArt from horizontal to vertical, or vice versa.

Properties

Name | Description
Alignment | Returns or sets the alignment for the specified WordArt. Read/write.
Application | Returns an Application object that represents the creator of the specified object.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
FontBold | Determines whether the font in the specified WordArt is bold. Read/write.
FontItalic | Determines whether the font in the specified WordArt is italic. Read/write.
FontName | Returns or sets the name of the font in the specified WordArt. Read/write.
FontSize | Returns or sets the font size for the specified WordArt in points. Read/write.
KernedPairs | Determines whether the character pairs in the specified WordArt are kerned. Read/write.
NormalizedHeight | Determines whether the characters (both uppercase and lowercase) in the specified WordArt are the same height. Read/write.
Parent | Returns the parent object for the specified object.
PresetShape | Returns or sets the shape of the specified WordArt. Read/write.
PresetTextEffect | Returns or sets the style of the specified WordArt. Read/write.
RotatedChars | Determines whether characters in the specified WordArt are rotated 90 degrees relative to the WordArt's bounding shape. Read/write.
Text | Returns or sets a String that represents the text contained in the specified object. Read/write.
Tracking | Returns or sets the ratio of the horizontal space allotted to each character in the specified text to the width of the character. Read/write.


Chart.HasTitle Property (PowerPoint)

 Copy code hover
[image]

Chart.HasTitle Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if the axis or chart has a visible title. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .HasTitle

expression A variable that represents a Chart object.

Remarks

A chart title is represented by a ChartTitle object.

See also

Concepts

Chart Object

Other resources

Chart Object Members


AddIns.Add Method (PowerPoint)

 Copy code hover
[image]

AddIns.Add Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an AddIn object that represents an add-in file added to the list of add-ins.

Syntax

expression .Add(Filename)

expression A variable that represents an AddIns object.

Parameters

Name | Required/Optional | Data Type | Description
FileName | Required | String | The full name of the file (including the path and file name extension) that contains the add-in you want to add to the list of add-ins.

Return Value

AddIn

Remarks

This method doesn't load the new add-in. You must set the Loaded property to load the add-in.

See also

Concepts

AddIns Object

Other resources

AddIns Object Members


Application.Build Property (PowerPoint)

 Copy code hover
[image]

Application.Build Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the build number for the current instance of Microsoft PowerPoint. Read-only.

Syntax

expression .Build

expression A variable that represents a Application object.

Return Value

String

Example

This example displays the PowerPoint build number.

VBA Copy code Copy code
MsgBox Prompt:=Application.Build, Title:="PowerPoint Build"

See also

Concepts

Application Object

Other resources

Application Object Members


SlideShowView.MediaControlsTop Property (PowerPoint)

 Copy code hover
[image]

SlideShowView.MediaControlsTop Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the distance, in points, from the top edge of the media control bounding box to the top edge of the Slide object. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .MediaControlsTop

expression A variable that represents a SlideShowView object.

Return Value

Single

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


TextFrame2.Creator Property (PowerPoint)

 Copy code hover
[image]

TextFrame2.Creator Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a Long that represents the four-character creator code for the application in which the specified object was created. Read-only.

Syntax

expression .Creator

expression An expression that returns a TextFrame2 object.

Return Value

Long

Remarks

For example, if a TextFrame2 object was created in PowerPoint, this property returns the hexadecimal number 50575054.

The Creator property is designed to be used in Microsoft Office applications for the Macintosh.

Example

This example displays a message about the creator of the TextFrame2 object.

VBA Copy code Copy code
Public Sub Creator_Example()

    Set pptTextFrame2 = Application.ActivePresentation.Slides(1).Shapes(1).TextFrame2

    If pptTextFrame2.Creator = &H50575054 Then

        MsgBox "This is a PowerPoint object"

    Else

        MsgBox "This is not a PowerPoint object"

    End If

End Sub

See also

Concepts

TextFrame2 Object

Other resources

TextFrame2 Object Members


Point.Height Property (PowerPoint)

 Copy code hover
[image]

Point.Height Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the height, in points, of the object. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Height

expression A variable that represents a Point object.

Return Value

Double

See also

Concepts

Point Object

Other resources

Point Object Members


SlideRange.SlideID Property (PowerPoint)

 Copy code hover
[image]

SlideRange.SlideID Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a unique ID number for the specified slide. Read-only.

Syntax

expression .SlideID

expression A variable that represents a SlideRange object.

Return Value

Long

Remarks

Unlike the SlideIndex property, the SlideID property of a Slide object won't change when you add slides to the presentation or rearrange the slides in the presentation. Therefore, using the FindBySlideID method with the slide's ID number can be a more reliable way to return a specific Slide object from a Slides collection than using the Item method with the slide's index number.

Example

This example demonstrates how to retrieve the unique ID number for a Slide object and then use this number to return that Slide object from the Slides collection.

VBA Copy code Copy code
Set gslides = ActivePresentation.Slides

'Get slide ID

graphSlideID = gslides.Add(2, ppLayoutChart).SlideID

gslides.FindBySlideID(graphSlideID) _

    .SlideShowTransition.EntryEffect = _

    ppEffectCoverLeft      'Use ID to return specific slide

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


AnimationBehavior.FilterEffect Property (PowerPoint)

 Copy code hover
[image]

AnimationBehavior.FilterEffect Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a FilterEffect object that represents a filter effect for an animation behavior. Read-only.

Syntax

expression .FilterEffect

expression A variable that represents a AnimationBehavior object.

Return Value

FilterEffect

Example

The following example adds a shape to the first slide of the active presentation and sets a filter effect animation behavior.

VBA Copy code Copy code
Sub ChangeFilterEffect()

    Dim sldFirst As Slide

    Dim shpHeart As Shape

    Dim effNew As Effect

    Dim bhvEffect As AnimationBehavior

    Set sldFirst = ActivePresentation.Slides(1)

    Set shpHeart = sldFirst.Shapes.AddShape(Type:=msoShapeHeart, _

        Left:=100, Top:=100, Width:=100, Height:=100)

    Set effNew = sldFirst.TimeLine.MainSequence.AddEffect _

        (Shape:=shpHeart, EffectID:=msoAnimEffectChangeFillColor, _

        Trigger:=msoAnimTriggerAfterPrevious)

    Set bhvEffect = effNew.Behaviors.Add(msoAnimTypeFilter)

    With bhvEffect.FilterEffect

         .Type = msoAnimFilterEffectTypeWipe

         .Subtype = msoAnimFilterEffectSubtypeUp

         .Reveal = msoTrue

    End With

End Sub

See also

Concepts

AnimationBehavior Object

Other resources

AnimationBehavior Object Members


PlotArea.Select Method (PowerPoint)

 Copy code hover
[image]

PlotArea.Select Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Selects the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Select

expression A variable that represents a PlotArea object.

See also

Concepts

PlotArea Object

Other resources

PlotArea Object Members


AnimationPoint.Parent Property (PowerPoint)

 Copy code hover
[image]

AnimationPoint.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents an AnimationPoint object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

AnimationPoint Object

Other resources

AnimationPoint Object Members


AnimationBehavior.Type Property (PowerPoint)

 Copy code hover
[image]

AnimationBehavior.Type Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the type of animation. Read/write.

Syntax

expression .Type

expression A variable that represents an AnimationBehavior object.

Return Value

MsoAnimType

Remarks

The value of the Type property can be one of these MsoAnimType constants.

MsoAnimTypeColor

MsoAnimTypeMixed

MsoAnimTypeMotion

MsoAnimTypeNone

MsoAnimTypeProperty

MsoAnimTypeRoatation

MsoAnimTypeScale

MsoAnimTypeTransition

See also

Concepts

AnimationBehavior Object

Other resources

AnimationBehavior Object Members


Trendline.DisplayRSquared Property (PowerPoint)

 Copy code hover
[image]

Trendline.DisplayRSquared Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if the R-squared value of the trendline is displayed on the chart (in the same data label as the equation). Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .DisplayRSquared

expression A variable that represents a Trendline object.

Remarks

Setting this property to True automatically turns on data labels.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example displays the R-squared value and equation for trendline one of the first chart in the active document. You should run the example on a 2-D column chart that has a trendline for the first series.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.SeriesCollection(1).Trendlines(1)

            .DisplayRSquared = True

            .DisplayEquation = True

        End With

    End If

End With

See also

Concepts

Trendline Object

Other resources

Trendline Object Members


LineFormat.Creator Property (PowerPoint)

 Copy code hover
[image]

LineFormat.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.

Syntax

expression .Creator

expression A variable that represents a LineFormat object.

Return Value

Long

Remarks

The Creator property is designed to be used in Microsoft Office applications for the Macintosh.

Example

This example displays a message about the creator of myObject.

VBA Copy code Copy code
Set myObject = Application.ActivePresentation.Slides(1).Shapes(1)

If myObject.Creator = &h50575054 Then

    MsgBox "This is a PowerPoint object"

Else

    MsgBox "This is not a PowerPoint object"

End If

See also

Concepts

LineFormat Object

Other resources

LineFormat Object Members


Cell.Merge Method (PowerPoint)

 Copy code hover
[image]

Cell.Merge Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Merges one table cell with another. The result is a single table cell.

Syntax

expression .Merge(MergeTo)

expression A variable that represents a Cell object.

Parameters

Name | Required/Optional | Data Type | Description
MergeTo | Required | Cell | The Cell object to be merged with.

Remarks

For the MergeTo parameter, use the syntax .Cell(row, column).

This method returns an error if the file name cannot be opened, or the presentation has a baseline.

Example

This example merges the first two cells of row one in the specified table.

VBA Copy code Copy code
With ActivePresentation.Slides(2).Shapes(5).Table

    .Cell(1, 1).Merge MergeTo:=.Cell(1, 2)

End With

See also

Concepts

Presentation Object
Cell Object

Other resources

Presentation Object Members
Cell Object Members


Slide.ApplyTemplate2 Method (PowerPoint)

 Copy code hover
[image]

Slide.ApplyTemplate2 Method (PowerPoint)
Send feedback

Applies a design template and theme variant to the slide.

Version information

Version Added: PowerPoint 2013

Syntax

expression .ApplyTemplate2(FileName,Variant)

expression A variable that represents a Slide object.

Parameters

Name | Required/Optional | Data type | Description
FileName | Required | String | Specifies the name of the design template.
Variant | Required | String | Specifies the name of the variant to apply.
FileName | Required | STRING |
Variant | Required | STRING |

Return value

VOID

Example

This example opens a theme file, gets the ID of the third variant in the theme, and applies it to the first slide in the presentation.

VBA Copy code Copy code
Sub ChangeThemeVariant()

    Dim name As String
    Dim path As String
    Dim variantID As String

    ' Get the name of the active theme family.
    name = ActivePresentation.TemplateName

    ' You need access to the Theme Family in order to access the variants.
    path = "C:\Program Files (x86)\Microsoft Office\Document Themes 15\" & _
        ActivePresentation.TemplateName & ".thmx"

    ' Get the variant ID of the third Variant
    ' and apply that variant to the presentation.
    variantID = PowerPoint.Application.OpenThemeFile(path).ThemeVariants(3).Id
    ActivePresentation.Slides(1).ApplyTemplate2 path, variantID

End Sub


View.Paste Method (PowerPoint)

 Copy code hover
[image]

View.Paste Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Pastes the contents of the Clipboard into the active view. Attempting to paste an object into a view that won't accept it causes an error.

Syntax

expression .Paste

expression A variable that represents a View object.

Remarks

Attempting to paste an object into a view that won't accept it causes an error.

Use the ViewType property to set the view for a window before pasting the Clipboard contents into it. The following table shows what you can paste into each view.

Into this view | You can paste the following from the Clipboard
Slide view or notes page view | Shapes, text, or entire slides. If you paste a slide from the Clipboard, an image of the slide will be inserted onto the slide, master, or notes page as an embedded object. If one shape is selected, the pasted text will be appended to the shape's text; if text is selected, the pasted text will replace the selection; if anything else is selected, the pasted text will be placed in it is own text frame. Pasted shapes will be added to the top of the z-order and won't replace selected shapes.
Outline view | Text or entire slides. You cannot paste shapes into outline view. A pasted slide will be inserted before the slide that contains the cursor.
Slide sorter view | Entire slides. You cannot paste shapes or text into slide sorter view. A pasted slide will be inserted at the cursor or after the last slide selected in the presentation.

Example

This example copies the selection in window one to the Clipboard and copies it into the view in window two. If the Clipboard contents cannot be pasted into the view in window two — for example, if you try to paste a shape into slide sorter view — this example fails.

VBA Copy code Copy code
Windows(1).Selection.Copy

Windows(2).View.Paste

This example copies the selection in window one to the Clipboard, makes sure that window one is in slide view, and then copies the Clipboard contents into the view in window two.

VBA Copy code Copy code
Windows(1).Selection.Copy

With Windows(2)

    .ViewType = ppViewSlide

    .View.Paste

End With

See also

Concepts

View Object

Other resources

View Object Members


SlideShowView.SlideElapsedTime Property (PowerPoint)

 Copy code hover
[image]

SlideShowView.SlideElapsedTime Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of seconds that the current slide has been displayed. Read/write.

Syntax

expression .SlideElapsedTime

expression A variable that represents a SlideShowView object.

Return Value

Long

Remarks

Use the ResetSlideTime method to reset the elapsed time for the slide that's currently displayed.

Example

This example sets a variable to the elapsed time for the slide that's currently displayed in slide show window one and then displays the value of the variable.

VBA Copy code Copy code
currTime = SlideShowWindows(1).View.SlideElapsedTime

MsgBox currTime

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


TickLabels.NumberFormatLocal Property (PowerPoint)

 Copy code hover
[image]

TickLabels.NumberFormatLocal Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the format code for the object as a string in the language of the user. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .NumberFormatLocal

expression A variable that represents a TickLabels object.

Remarks

The Format function uses different format code strings than do the NumberFormat and NumberFormatLocal properties.

See also

Concepts

TickLabels Object

Other resources

TickLabels Object Members


Application.PresentationNewSlide Event (PowerPoint)

 Copy code hover
[image]

Application.PresentationNewSlide Event (PowerPoint)
See also Send feedback

Published: July 12, 2012

Occurs when a new slide is created in any open presentation, as the slide is added to the Slides collection.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .PresentationNewSlide(Sld)

expression An expression that returns a Application object.

Parameters

Name | Required/Optional | Data Type | Description
Sld | Required | Slide | The new slide.

Example

This example modifies the background color for color scheme three and then applies the modified color scheme to the new slide. Next, it adds default text to shape one if it has a text frame.

VBA Copy code Copy code
Private Sub App_PresentationNewSlide(ByVal Sld As Slide)

    With ActivePresentation

        Set CS3 = .ColorSchemes(3)

        CS3.Colors(ppBackground).RGB = RGB(240, 115, 100)

        Windows(1).Selection.SlideRange.ColorScheme = CS3

    End With

    If Sld.Layout <> ppLayoutBlank Then

        With Sld.Shapes(1)

            If .HasTextFrame = msoTrue Then

               .TextFrame.TextRange.Text = "King Salmon"

            End If

        End With

    End If

End Sub

See also

Concepts

Application Object

Other resources

Application Object Members


ConnectorFormat.EndDisconnect Method (PowerPoint)

 Copy code hover
[image]

ConnectorFormat.EndDisconnect Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Detaches the end of the specified connector from the shape it is attached to. This method doesn't alter the size or position of the connector: the end of the connector remains positioned at a connection site but is no longer connected. Use the BeginDisconnect method to detach the beginning of the connector from a shape.

Syntax

expression .EndDisconnect

expression A variable that represents a ConnectorFormat object.

Example

This example adds two rectangles to the first slide in the active presentation, attaches them with a connector, automatically reroutes the connector along the shortest path, and then detaches the connector from the rectangles.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

Set s = myDocument.Shapes

Set firstRect = s.AddShape(msoShapeRectangle, 100, 50, 200, 100)

Set secondRect = s.AddShape(msoShapeRectangle, 300, 300, 200, 100)

With s.AddConnector(msoConnectorCurve, 0, 0, 0, 0).ConnectorFormat

    .BeginConnect firstRect, 1

    .EndConnect secondRect, 1

    .Parent.RerouteConnections

    .BeginDisconnect

    .EndDisconnect

End With

See also

Concepts

ConnectorFormat Object

Other resources

ConnectorFormat Object Members


Axis.LogBase Property (PowerPoint)

 Copy code hover
[image]

Axis.LogBase Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the base of the logarithm when you are using log scales. Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .LogBase

expression A variable that represents an Axis object.

Remarks

Attempting to set this property to a value less than or equal to zero (0) raises an error. The default value is 10.

See also

Concepts

Axis Object

Other resources

Axis Object Members


DisplayUnitLabel.ReadingOrder Property (PowerPoint)

 Copy code hover
[image]

DisplayUnitLabel.ReadingOrder Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets an XlReadingOrder constant that represents the reading order for the specified object. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ReadingOrder

expression A variable that represents a DisplayUnitLabel object.

See also

Concepts

DisplayUnitLabel Object

Other resources

DisplayUnitLabel Object Members


ShapeRange.SmartArt Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.SmartArt Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the SmartArt diagram of the ShapeRange object. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .SmartArt

expression A variable that represents a ShapeRange object.

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


Pane Properties (PowerPoint)

 Copy code hover
[image]

Pane Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Active | Returns whether the specified pane or window is active. Read-only.
Application | Returns an Application object that represents the creator of the specified object.
Parent | Returns the parent object for the specified object.
ViewType | Returns the type of view for the specified pane. Read-only.


PpSaveAsFileType Enumeration (PowerPoint)

 Copy code hover
[image]

PpSaveAsFileType Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Constants that specify type of file to save as, passed to the SaveAs method of the Presentation object.

Version Information

Version Added: PowerPoint 2007

ppSaveAsAddIn | 8
ppSaveAsBMP | 19
ppSaveAsDefault | 11
ppSaveAsEMF | 23
ppSaveAsExternalConverter | 64000
ppSaveAsGIF | 16
ppSaveAsJPG | 17
ppSaveAsMetaFile | 15
ppSaveAsMP4 | 39
ppSaveAsOpenDocumentPresentation | 35
ppSaveAsOpenXMLAddin | 30
ppSaveAsOpenXMLPicturePresentation | 36
ppSaveAsOpenXMLPresentation | 24
ppSaveAsOpenXMLPresentationMacroEnabled | 25
ppSaveAsOpenXMLShow | 28
ppSaveAsOpenXMLShowMacroEnabled | 29
ppSaveAsOpenXMLTemplate | 26
ppSaveAsOpenXMLTemplateMacroEnabled | 27
ppSaveAsOpenXMLTheme | 31
ppSaveAsPDF | 32
ppSaveAsPNG | 18
ppSaveAsPresentation | 1
ppSaveAsRTF | 6
ppSaveAsShow | 7
ppSaveAsStrictOpenXMLPresentation | 38
ppSaveAsTemplate | 5
ppSaveAsTIF | 21
ppSaveAsWMV | 37
ppSaveAsXMLPresentation | 34
ppSaveAsXPS | 33


Walls.Application Property (PowerPoint)

 Copy code hover
[image]

Walls.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents a Walls object.

See also

Concepts

Walls Object

Other resources

Walls Object Members


Presentation.ApplyTheme Method (PowerPoint)

 Copy code hover
[image]

Presentation.ApplyTheme Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Applies a theme or design template to the specified presentation.

Syntax

expression .ApplyTheme(themeName)

expression A variable that represents a Presentation object.

Parameters

Name | Required/Optional | Data Type | Description
themeName | Required | String | The path and name of the theme file (.thmx) or design template file (.pot) to apply to the Presentation object.

Example

This example applies a saved theme to the active presentation:

VBA Copy code Copy code
ActivePresentation.ApplyTheme "C:\Program Files\Microsoft Office\Templates\MyTheme.thmx"

This example applies a saved design template to the active presentation:

VBA Copy code Copy code
ActivePresentation.ApplyTheme "C:\Program Files\Microsoft Office\Templates\MyTheme.pot"

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


AnimationBehavior.CommandEffect Property (PowerPoint)

 Copy code hover
[image]

AnimationBehavior.CommandEffect Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a CommandEffect object for the specified animation behavior. Read-only.

Syntax

expression .CommandEffect

expression A variable that represents a AnimationBehavior object.

Return Value

CommandEffect

Remarks

You can send events, call functions, and send OLE verbs to embedded objects using this property.

Example

The following example shows how to set a command effect animation behavior.

VBA Copy code Copy code
    Set bhvEffect = effectNew.Behaviors.Add(msoAnimTypeCommand)

    With bhvEffect.CommandEffect

         .Type = msoAnimCommandTypeVerb

         .Command = Play

    End With

See also

Concepts

AnimationBehavior Object

Other resources

AnimationBehavior Object Members


Application Methods (PowerPoint)

 Copy code hover
[image]

Application Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Activate | Activates the specified object.
Help | Displays a Help topic.
OpenThemeFile | Opens the specified theme file (*thmx).
Quit | Quits Microsoft PowerPoint. This is equivalent to clicking the Office button and then clicking Exit PowerPoint.
Run | Runs a Visual Basic procedure.
StartNewUndoEntry | Starts a new undo entry in the Application object.


Series.MarkerStyle Property (PowerPoint)

 Copy code hover
[image]

Series.MarkerStyle Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the marker style for a point or series in a line chart, scatter chart, or radar chart. Read/write XlMarkerStyle.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .MarkerStyle

expression A variable that represents a Series object.

Remarks

MarkerStyle can be one of the following XlMarkerStyle constants:

  • xlMarkerStyleAutomatic—Automatic markers.

  • xlMarkerStyleCircle—Circular markers.

  • xlMarkerStyleDash—Long bar markers.

  • xlMarkerStyleDiamond—Diamond-shaped markers.

  • xlMarkerStyleDot—Short bar markers.

  • xlMarkerStyleNone—No markers.

  • xlMarkerStylePicture—Picture markers.

  • xlMarkerStylePlus—Square markers with a plus sign.

  • xlMarkerStyleSquare—Square markers.

  • xlMarkerStyleStar—Square markers with an asterisk.

  • xlMarkerStyleTriangle—Triangular markers.

  • xlMarkerStyleX—Square markers with an X.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the marker style for series one for the first chart in the active document. You should run the example on a 2-D line chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).MarkerStyle = xlMarkerStyleCircle

    End If

End With

See also

Concepts

Series Object

Other resources

Series Object Members


PlaceholderFormat.Name Property (PowerPoint)

 Copy code hover
[image]

PlaceholderFormat.Name Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the name of the specified object. Read/write.

Syntax

expression .Name

expression A variable that represents a PlaceholderFormat object.

Return Value

String

See also

Concepts

PlaceholderFormat Object

Other resources

PlaceholderFormat Object Members


ThreeDFormat.BevelTopDepth Property (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.BevelTopDepth Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the top bevel height for the specified ThreeDFormat object, in points. Read/write.

Syntax

expression .BevelTopDepth

expression A variable that represents a ThreeDFormat object.

Return Value

Single

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


Trendline.ClearFormats Method (PowerPoint)

 Copy code hover
[image]

Trendline.ClearFormats Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Clears the formatting of the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ClearFormats

expression A variable that represents a Trendline object.

See also

Concepts

Trendline Object

Other resources

Trendline Object Members


Application.WindowBeforeRightClick Event (PowerPoint)

 Copy code hover
[image]

Application.WindowBeforeRightClick Event (PowerPoint)
See also Send feedback

Published: July 16, 2012

Occurs when you right-click a shape, a slide, a notes page, or some text. This event is triggered by the MouseUp event.

Syntax

expression .WindowBeforeRightClick(Sel, Cancel)

expression A variable that represents an Application object.

Parameters

Name | Required/Optional | Data Type | Description
Sel | Required | Selection | The selection below the mouse pointer when the right-click occurred.
Cancel | Required | Boolean | False when the event occurs. If the event procedure sets this argument to True, the default context menu does not appear when the procedure is finished.

Example

This example creates a duplicate of the selected shape. If the shape has a text frame, it adds the text "Duplicate Shape" to the new shape. Setting the Cancel argument to True then prevents the default context menu from appearing.

VBA Copy code Copy code
Private Sub App_WindowBeforeRightClick(ByVal Sel As Selection, ByVal Cancel As Boolean)

    With ActivePresentation.Selection.ShapeRange

        If .HasTextFrame Then

            .Duplicate.TextFrame.TextRange.Text = "Duplicate Shape"

        Else

            .Duplicate

        End If

        Cancel = True

    End With

End Sub

See also

Concepts

Application Object

Other resources

Application Object Members


DisplayUnitLabel.Orientation Property (PowerPoint)

 Copy code hover
[image]

DisplayUnitLabel.Orientation Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the text orientation. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Orientation

expression A variable that represents a DisplayUnitLabel object.

Remarks

The value of this property can be an integer value from -90 through 90 degrees or one of the XlOrientation constants.

See also

Concepts

DisplayUnitLabel Object

Other resources

DisplayUnitLabel Object Members


FillFormat.Type Property (PowerPoint)

 Copy code hover
[image]

FillFormat.Type Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represent the type of fill. Read-only.

Syntax

expression .Type

expression A variable that represents a FillFormat object.

Return Value

MsoFillType

Remarks

The value of the Type property can be one of these MsoFillType constants.

msoFillBackground

msoFillGradient

msoFillMixed

msoFillPatterned

msoFillPicture

msoFillSolid

msoFillTextured

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


Slides.AddSlide Method (PowerPoint)

 Copy code hover
[image]

Slides.AddSlide Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Creates a new slide, adds it to the Slides collection, and returns the slide.

Syntax

expression .AddSlide(Index, pCustomLayout)

expression An expression that returns a Slides object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Int | The index of the slide to be added.
pCustomLayout | Required | CustomLayout | The layout of the slide.

Return Value

Slide

Example

The following example shows how to use the Add method to add a new slide to the Slides collection. It adds a new slide in index position 2 that has the same layout as the first slide in the active presentation.

VBA Copy code Copy code
Public Sub Add_Example()

    Dim pptSlide As Slide
    Dim pptLayout As CustomLayout

    Set pptLayout = ActivePresentation.Slides(1).CustomLayout
    Set pptSlide = ActivePresentation.Slides.AddSlide(2, pptLayout)

End Sub

Remarks

If your Visual Studio solution includes the Microsoft.Office.Interop.PowerPoint reference, this method maps to the following types:

  • Microsoft.Office.Interop.PowerPoint.Slides.Add(int, Microsoft.Office.Interop.PowerPoint.PpSlideLayout)

  • Microsoft.Office.Interop.PowerPoint.Slides.AddSlide(int, Microsoft.Office.Interop.PowerPoint.CustomLayout)

See also

Concepts

Slides Object

Other resources

Slides Object Members


MotionEffect.FromY Property (PowerPoint)

 Copy code hover
[image]

MotionEffect.FromY Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a Single that represents the vertical position of a MotionEffect object, specified as a percentage of the screen width. Read/write.

Syntax

expression .FromY

expression A variable that represents a MotionEffect object.

Return Value

Single

Remarks

The default value of this property is Empty, in which case the current position of the object is used.

Use this property in conjunction with the ToY property to resize or jump from one position to another.

Do not confuse this property with the From property of the ColorEffect , RotationEffect , or PropertyEffect objects, which is used to set or change colors, rotations, or other properties of an animation behavior, respectively.

Example

The following example adds an animation path and sets the starting and ending horizontal and vertical positions.

VBA Copy code Copy code
Sub AddMotionPath()

    Dim effCustom As Effect

    Dim animMotion As AnimationBehavior

    Dim shpRectangle As Shape

    'Adds shape and sets effect and animation properties

    Set shpRectangle = ActivePresentation.Slides(1).Shapes _

        .AddShape(Type:=msoShapeRectangle, Left:=100, _

        Top:=100, Width:=50, Height:=50)

    Set effCustom = ActivePresentation.Slides(1).TimeLine.MainSequence _

        .AddEffect(Shape:=shpRectangle, effectId:=msoAnimEffectCustom)

    Set animMotion = effCustom.Behaviors.Add(msoAnimTypeMotion)

    'Sets starting and ending horizontal and vertical positions

    With animMotion.MotionEffect

        .FromX = 0

        .FromY = 0

        .ToX = 50

        .ToY = 50

    End With

End Sub

See also

Concepts

MotionEffect Object

Other resources

MotionEffect Object Members


Shape.HasTextFrame Property (PowerPoint)

 Copy code hover
[image]

Shape.HasTextFrame Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns whether the specified shape has a text frame. Read-only.

Syntax

expression .HasTextFrame

expression A variable that represents a Shape object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified shape does not have a text frame and therefore cannot contain text.
msoTrue | The specified shape has a text frame and can therefore contain text.

Example

This example extracts text from all shapes on the first slide that contain text frames, and then it stores the names of these shapes and the text they contain in an array.

VBA Copy code Copy code
Dim shpTextArray() As Variant

Dim numShapes, numAutoShapes, i As Long

Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    numShapes = .Count

    If numShapes > 1 Then

    numTextShapes = 0

        ReDim shpTextArray(1 To 2, 1 To numShapes)

        For i = 1 To numShapes

            If .Item(i).HasTextFrame Then

                numTextShapes = numTextShapes + 1

                shpTextArray(numTextShapes, 1) = .Item(i).Name

                shpTextArray(numTextShapes, 2) = .Item(i) _

                    .TextFrame.TextRange.Text

            End If

        Next

        ReDim Preserve shpTextArray(1 To 2, 1 To numTextShapes)

    End If

End With

See also

Concepts

Shape Object

Other resources

Shape Object Members


Shape.CustomerData Property (PowerPoint)

 Copy code hover
[image]

Shape.CustomerData Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a CustomerData object. Read-only.

Syntax

expression .CustomerData

expression An expression that returns a Shape object.

Return Value

CustomerData

See also

Concepts

Shape Object

Other resources

Shape Object Members


RulerLevel.LeftMargin Property (PowerPoint)

 Copy code hover
[image]

RulerLevel.LeftMargin Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the left indent for the specified outline level, in points. Read/write.

Syntax

expression .LeftMargin

expression A variable that represents a RulerLevel object.

Return Value

Single

Remarks

If a paragraph begins with a bullet, the bullet position is determined by the FirstMargin property, and the position of the first text character in the paragraph is determined by the LeftMargin property.

Note Note

The RulerLevels collection contains five RulerLevel objects, each of which corresponds to one of the possible outline levels. The LeftMargin property value for the RulerLevel object that corresponds to the first outline level has a valid range of (-9.0 to 4095.875). The valid range for the LeftMargin property values for the RulerLevel objects that correspond to the second through the fifth outline levels are determined as follows:

  • The maximum value is always 4095.875.

  • The minimum value is the maximum assigned value between the FirstMargin property and LeftMargin property of the previous level plus 9.

You can use the following equations to determine the minimum value for the LeftMargin property. Index, the index number of the RulerLevel object, indicates the object's corresponding outline level. To determine the minimum LeftMargin property values for the RulerLevel objects that correspond to the second through the fifth outline levels, substitute 2, 3, 4, or 5 for the index placeholder.

Minimum(RulerLevel(index).FirstMargin) = Maximum(RulerLevel(index -1).FirstMargin, RulerLevel(index -1).LeftMargin) + 9

Minimum (RulerLevel(index).LeftMargin) = Maximum(RulerLevel(index -1).FirstMargin, RulerLevel(index -1).LeftMargin) + 9

Example

This example sets the first-line indent and hanging indent for outline level one in body text on the slide master for the active presentation.

VBA Copy code Copy code
With Application.ActivePresentation _

        .SlideMaster.TextStyles(ppBodyStyle)

    With .Ruler.Levels(1)

        .FirstMargin = 9

        .LeftMargin = 54

    End With

End With

See also

Concepts

RulerLevel Object

Other resources

RulerLevel Object Members


PpPlayerState Enumeration (PowerPoint)

 Copy code hover
[image]

PpPlayerState Enumeration (PowerPoint)
Send feedback

Indicates the current state of the player.

Version information

Version Added: PowerPoint 2013

Members

Name | Value | Description
ppPlaying | 0 | Playing
ppPaused | 1 | Paused
ppStopped | 2 | Stopped
ppNotReady | 3 | Not ready
ppNotReady | 3 |
ppPaused | 1 |
ppPlaying | 0 |
ppStopped | 2 |


ActionSetting.SoundEffect Property (PowerPoint)

 Copy code hover
[image]

ActionSetting.SoundEffect Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a SoundEffect object that represents the sound to be played during the transition to the specified slide. Read-only.

Syntax

expression .SoundEffect

expression A variable that represents an ActionSetting object.

Return Value

SoundEffect

Example

This example sets the file Bass.wav to be played whenever shape one on slide one in the active presentation is animated.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(1).AnimationSettings

    .Animate = True

    .TextLevelEffect = ppAnimateByAllLevels

    .SoundEffect.ImportFromFile "c:\bass.wav"

End With

See also

Concepts

ActionSetting Object

Other resources

ActionSetting Object Members


XlErrorBarType Enumeration (PowerPoint)

 Copy code hover
[image]

XlErrorBarType Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the range marked by error bars.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlErrorBarTypeCustom | -4114 | The range is set by fixed values or cell values.
xlErrorBarTypeFixedValue | 1 | Fixed-length error bars.
xlErrorBarTypePercent | 2 | The percentage of the range to be covered by the error bars.
xlErrorBarTypeStDev | -4155 | Shows the range for a specified number of standard deviations.
xlErrorBarTypeStError | 4 | Shows the standard error range.


CustomerData.Application Property (PowerPoint)

 Copy code hover
[image]

CustomerData.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified CustomerData object. Read-only.

Syntax

expression .Application

expression An expression that returns a CustomerData object.

Return Value

Application

See also

Concepts

CustomerData Collection

Other resources

CustomerData Object Members


DataTable Object (PowerPoint)

 Copy code hover
[image]

DataTable Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a chart data table.

Version Information

Version Added: PowerPoint 2007

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

Use the DataTable property to return a DataTable object. The following example adds a data table with an outline border to embedded chart one.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.HasDataTable = True

        .Chart.DataTable.HasBorderOutline = True

    End If

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

DataTable Object Members


RotationEffect Members (PowerPoint)

 Copy code hover
[image]

RotationEffect Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a rotation effect for an AnimationBehavior object.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
By | Sets or returns a Single that represents the rotation of an object by the specified number of degrees; for example, a value of 180 means to rotate the object by 180 degrees. Read/write.
From | Sets or returns a Single that represents the starting angle in degrees, specified relative to the screen (for example, 90 degrees is completely horizontal). Read/write.
Parent | Returns the parent object for the specified object.
To | Sets or returns a Single that represents the ending rotation of an object in degrees, specified relative to the screen (for example, 90 degrees is completely horizontal). Read/write.


ChartGroup.AxisGroup Property (PowerPoint)

 Copy code hover
[image]

ChartGroup.AxisGroup Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the type of axis group. Read/write XlAxisGroup.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .AxisGroup

expression A variable that represents a ChartGroup object.

See also

Concepts

ChartGroup Object

Other resources

ChartGroup Object Members


LegendEntry.Height Property (PowerPoint)

 Copy code hover
[image]

LegendEntry.Height Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the height, in points, of the object. Read-only Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Height

expression A variable that represents a LegendEntry object.

See also

Concepts

LegendEntry Object

Other resources

LegendEntry Object Members


RulerLevels Methods (PowerPoint)

 Copy code hover
[image]

RulerLevels Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Item | Returns a single RulerLevel object from the specified RulerLevels collection.


Point.InvertIfNegative Property (PowerPoint)

 Copy code hover
[image]

Point.InvertIfNegative Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if Microsoft Word inverts the pattern in the object when it corresponds to a negative number. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .InvertIfNegative

expression A variable that represents a Point object.

See also

Concepts

Point Object

Other resources

Point Object Members


BulletFormat.Type Property (PowerPoint)

 Copy code hover
[image]

BulletFormat.Type Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the type of bullet. Read/write.

Syntax

expression .Type

expression A variable that represents a BulletFormat object.

Return Value

PpBulletType

Remarks

The value of the Type property can be one of these PpBulletType constants.

ppBulletMixed

ppBulletNone

ppBulletNumbered

ppBulletPicture

ppBulletUnnumbered

See also

Concepts

BulletFormat Object

Other resources

BulletFormat Object Members


TextStyles Properties (PowerPoint)

 Copy code hover
[image]

TextStyles Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


CustomLayouts Properties (PowerPoint)

 Copy code hover
[image]

CustomLayouts Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object. Read-only.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object. Read-only.


Interior.PatternColor Property (PowerPoint)

 Copy code hover
[image]

Interior.PatternColor Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the color of the interior pattern as an RGB value. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .PatternColor

expression A variable that represents an Interior object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example enables up and down bars, then adds a criss-cross pattern to the down bars and sets the pattern color to blue, for the first chart group of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.ChartGroups(1)

            .HasUpDownBars = True

            .DownBars.Interior.Pattern = xlPatternCrissCross

            .DownBars.Interior.PatternColor = RGB(0, 0, 255)

        End With

    End If

End With

See also

Concepts

Interior Object

Other resources

Interior Object Members


ShapeRange.Left Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.Left Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a Single that represents the distance in points from the left edge of the leftmost shape in the shape range to the left edge of the slide. Read/write.

Syntax

expression .Left

expression A variable that represents a ShapeRange object.

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


XlVAlign Enumeration (PowerPoint)

 Copy code hover
[image]

XlVAlign Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the vertical alignment for the object.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlVAlignBottom | -4107 | Bottom alignment.
xlVAlignCenter | -4108 | Center alignment.
xlVAlignDistributed | -4117 | Distributed alignment.
xlVAlignJustify | -4130 | Justified alignment.
xlVAlignTop | -4160 | Top alignment.


TextRange.RtlRun Method (PowerPoint)

 Copy code hover
[image]

TextRange.RtlRun Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Sets the direction of text in a text range to read from right to left.

Syntax

expression .RtlRun

expression A variable that represents a TextRange object.

Remarks

This method makes it possible to use text from both left-to-right and right-to-left languages in the same presentation.

Example

The following example finds all of the shapes on slide one that contain text and changes the text to read from right to left.

VBA Copy code Copy code
ActiveWindow.ViewType = ppViewSlide

For Each sh In ActivePresentation.Slides(1).Shapes

    If sh.HasTextFrame Then

         sh.TextFrame.TextRange.RtlRun

    End If

Next

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


ChartFormat.Glow Property (PowerPoint)

 Copy code hover
[image]

ChartFormat.Glow Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the glow formatting properties for the chart element. Read-only GlowFormat.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Glow

expression A variable that represents a ChartFormat object.

Remarks

The glow effect adds a vibrant colored edge to graphics.

See also

Concepts

ChartFormat Object

Other resources

ChartFormat Object Members


Selection.Application Property (PowerPoint)

 Copy code hover
[image]

Selection.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a Selection object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

Selection Object

Other resources

Selection Object Members


Player.Pause Method (PowerPoint)

 Copy code hover
[image]

Player.Pause Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Pauses the media.

Syntax

expression .Pause

expression A variable that represents a Player object.

See also

Concepts

Player Object

Other resources

Player Object Members


FillFormat.GradientAngle Property (PowerPoint)

 Copy code hover
[image]

FillFormat.GradientAngle Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets the angle of the gradient fill for the specified fill format. Read/write.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .GradientAngle

expression A variable that represents a FillFormat object.

Return Value

Single

Remarks

A gradient fill can be specified in the formatting for various elements (shapes) in a chart. For example, you can use the Format Data Series dialog box to format the columns in a Column chart to a gradient fill. In this case, the GradientAngle property corresponds to the setting of the Angle box in the Fill category of the Format Data Series dialog box. The valid range of values for the GradientAngle property is from 0 through 359.9.

Example

The following example sets the angle of the gradient fill for series 1 in chart 1 to 45 degrees.

VBA Copy code Copy code
ActiveSheet.ChartObjects("Chart 1").Activate

ActiveChart.SeriesCollection(1).Format.Fill.GradientAngle = 45

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


AxisTitle.Caption Property (PowerPoint)

 Copy code hover
[image]

AxisTitle.Caption Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a String value that represents the axis title text.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Caption

expression A variable that represents an AxisTitle object.

See also

Concepts

AxisTitle Object

Other resources

AxisTitle Object Members


AnimationBehavior Properties (PowerPoint)

 Copy code hover
[image]

AnimationBehavior Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Accumulate | Determines whether animation behaviors accumulate. Read/write.
Additive | Sets or returns whether the current animation behavior is combined with other running animations. Read/write.
Application | Returns an Application object that represents the creator of the specified object.
ColorEffect | Returns a ColorEffect object that represents the color properties for a specified animation behavior.
CommandEffect | Returns a CommandEffect object for the specified animation behavior. Read-only.
FilterEffect | Returns a FilterEffect object that represents a filter effect for an animation behavior. Read-only.
MotionEffect | Returns a MotionEffect object that represents the properties of a motion animation.
Parent | Returns the parent object for the specified object.
PropertyEffect | Returns a PropertyEffect object for a given animation behavior. Read-only.
RotationEffect | Returns a RotationEffect object for an animation behavior. Read-only.
ScaleEffect | Returns a ScaleEffect object for a given animation behavior. Read-only.
SetEffect | Returns a SetEffect object for the animation behavior. Read-only.
Timing | Returns a Timing object that represents the timing properties for an animation sequence.
Type | Represents the type of animation. Read/write.


Shapes Object (PowerPoint)

 Copy code hover
[image]

Shapes Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

A collection of all the Shape objects on the specified slide.

Remarks

Each Shape object represents an object in the drawing layer, such as an AutoShape, freeform, OLE object, or picture.

Note Note

If you want to work with a subset of the shapes on a document — for example, to do something to only the AutoShapes on the document or to only the selected shapes — you must construct a ShapeRange collection that contains the shapes you want to work with. For an overview of how to work either with a single shape or with more than one shape at a time, see How to: Work with Shapes (Drawing Objects).

Example

Use the Shapes property to return the Shapes collection. The following example selects all the shapes in the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(1).Shapes.SelectAll
Note Note

If you want to do something (like delete or set a property) to all the shapes on a document at the same time, use the Range method with no argument to create a ShapeRange object that contains all the shapes in the Shapes collection, and then apply the appropriate property or method to the ShapeRange object.

Use the AddCallout , AddComment , AddConnector , AddCurve , AddLabel , AddLine , AddMediaObject , AddOLEObject , AddPicture , AddPlaceholder , AddPolyline , AddShape , AddTable , AddTextbox , AddTextEffect , or AddTitle method to create a new shape and add it to the Shapes collection. Use the BuildFreeform method in conjunction with the ConvertToShape method to create a new freeform and add it to the collection. The following example adds a rectangle to the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(1).Shapes.AddShape Type:=msoShapeRectangle, _

    Left:=50, Top:=50, Width:=100, Height:=200

Use Shapes(index), where index is the shape's name or index number, to return a single Shape object. The following example sets the fill to a preset shade for shape one in the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(1).Shapes(1).Fill _

    .PresetGradient Style:=msoGradientHorizontal, Variant:=1, _

    PresetGradientType:=msoGradientBrass

Use Shapes.Range(index), where index is the shape's name or index number or an array of shape names or index numbers, to return a ShapeRange collection that represents a subset of the Shapes collection. The following example sets the fill pattern for shapes one and three in the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(1).Shapes.Range(Array(1, 3)).Fill _

    .Patterned Pattern:=msoPatternHorizontalBrick

Use Shapes.Placeholders(index), where index is the placeholder number, to return a Shape object that represents a placeholder. If the specified slide has a title, use Shapes.Placeholders(1) or Shapes.Title to return the title placeholder. The following example adds a slide to the active presentation and then adds text to both the title and the subtitle (the subtitle is the second placeholder on a slide with this layout).

VBA Copy code Copy code
With ActivePresentation.Slides.Add(Index:=1, Layout:=ppLayoutTitle).Shapes

    .Title.TextFrame.TextRange = "This is the title text"

    .Placeholders(2).TextFrame.TextRange = "This is subtitle text"

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

Shapes Object Members


Table Object (PowerPoint)

 Copy code hover
[image]

Table Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a table shape on a slide. The Table object is a member of the Shapes collection. The Table object contains the Columns collection and the Rows collection.

Example

Use Shapes(index), where index is a number, to return a shape containing a table. Use the HasTable property to see if a shape contains a table. This example walks through the shapes on slide one, checks to see if each shape has a table, and then sets the mouse click action for each table shape to advance to the next slide.

VBA Copy code Copy code
With ActivePresentation.Slides(2).Shapes

    For i = 1 To .Count

        If .Item(i).HasTable Then

            .Item(i).ActionSettings(ppMouseClick) _

                .Action = ppActionNextSlide

        End If

    Next

End With

Use the Cell method of the Table object to access the contents of each cell. This example inserts the text "Cell 1" in the first cell of the table in shape five on slide three.

VBA Copy code Copy code
ActivePresentation.Slides(3).Shapes(5).Table _

    .Cell(1, 1).Shape.TextFrame.TextRange _

    .Text = "Cell 1"

Use the AddTable method to add a table to a slide. This example adds a 3x3 table on slide two in the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(2).Shapes.AddTable(3, 3)

See also

Concepts

PowerPoint Object Model Reference

Other resources

Table Object Members


AnimationSettings Object (PowerPoint)

 Copy code hover
[image]

AnimationSettings Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the special effects applied to the animation for the specified shape during a slide show.

Example

Use the AnimationSettings property of the Shape object to return the AnimationSettings object. The following example adds a slide that contains both a title and a three-item list to the active presentation, and then it sets the list to be animated by first-level paragraphs, to fly in from the left when animated, to dim to the specified color after being animated, and to animate its items in reverse order.

VBA Copy code Copy code
Set sObjs = ActivePresentation.Slides.Add(2, ppLayoutText).Shapes

sObjs.Title.TextFrame.TextRange.Text = "Top Three Reasons"

With sObjs.Placeholders(2)

    .TextFrame.TextRange.Text = _

        "Reason 1" & VBNewLine & "Reason 2" & VBNewLine & "Reason 3"

    With .AnimationSettings

        .TextLevelEffect = ppAnimateByFirstLevel

        .EntryEffect = ppEffectFlyFromLeft

        .AfterEffect = ppAfterEffectDim

        .DimColor.RGB = RGB(100, 120, 100)

        .AnimateTextInReverse = True

    End With

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

AnimationSettings Object Members


ChartCategory Properties (PowerPoint)

 Copy code hover
[image]

ChartCategory Properties (PowerPoint)
Send feedback

This object has the following properties:

Properties

Name | Description
IsFiltered | Returns or sets a Boolean that determines whether the specified chart category is filtered out from the chart. Read-write.
Name | Returns or sets a String that represents the name of a chart category. Read/write.
Parent | Returns the parent for the specified object. Read-only Object.


Master.Application Property (PowerPoint)

 Copy code hover
[image]

Master.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a Master object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

Master Object

Other resources

Master Object Members


SlideShowWindow.View Property (PowerPoint)

 Copy code hover
[image]

SlideShowWindow.View Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a SlideShowView object. Read-only.

Syntax

expression .View

expression A variable that represents a SlideShowWindow object.

Return Value

SlideShowView

Example

This example uses the View property to exit the current slide show, sets the view in the active window to slide view, and then displays slide three.

VBA Copy code Copy code
Application.SlideShowWindows(1).View.Exit

With Application.ActiveWindow

    .ViewType = ppViewSlide

    .View.GotoSlide 3

End With

See also

Concepts

SlideShowWindow Object

Other resources

SlideShowWindow Object Members


Shape.SoftEdge Property (PowerPoint)

 Copy code hover
[image]

Shape.SoftEdge Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the soft edge format for the specified shape. Read-only.

Syntax

expression .SoftEdge

expression A variable that represents a Shape object.

Return Value

MsoSoftEdgeType

See also

Concepts

Shape Object

Other resources

Shape Object Members


TextStyleLevels.Count Property (PowerPoint)

 Copy code hover
[image]

TextStyleLevels.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a TextStyleLevels object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

TextStyleLevels Object

Other resources

TextStyleLevels Object Members


XlChartSplitType Enumeration (PowerPoint)

 Copy code hover
[image]

XlChartSplitType Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the values displayed in the second chart in a pie chart or a bar of pie chart.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlSplitByCustomSplit | 4 | The second chart displays arbitrary slides.
xlSplitByPercentValue | 3 | The second chart displays values less than a percentage of the total value. The percentage is specified by the SplitValue property.
xlSplitByPosition | 1 | The second chart displays the smallest values in the data series. The number of values to display is specified by the SplitValue property.
xlSplitByValue | 2 | The second chart displays values less than the value specified by the SplitValue property.


SeriesLines Members (PowerPoint)

 Copy code hover
[image]

SeriesLines Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents series lines in a chart group.

Methods

Name | Description
Delete | Deletes the object.
Select | Selects the object.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Border | Returns the border of the object. Read-only ChartBorder.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Name | Returns the name of the object. Read-only String.
Parent | Returns the parent for the specified object. Read-only Object.


SlideShowSettings.Application Property (PowerPoint)

 Copy code hover
[image]

SlideShowSettings.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a SlideShowSettings object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

SlideShowSettings Object

Other resources

SlideShowSettings Object Members


Presentation Object (PowerPoint)

 Copy code hover
[image]

Presentation Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a Microsoft PowerPoint presentation.

Remarks

The Presentation object is a member of the Presentations collection. The Presentations collection contains all the Presentation objects that represent open presentations in PowerPoint.

The following examples describe how to:

  • Return a presentation that you specify by name or index number

  • Return the presentation in the active window

  • Return the presentation in any document window or slide show window you specify

Example

Use Presentations(index), where index is the presentation's name or index number, to return a single Presentation object. The name of the presentation is the file name, with or without the file name extension, and without the path. The following example adds a slide to the beginning of Sample Presentation.

VBA Copy code Copy code
Presentations("Sample Presentation").Slides.Add 1, 1

Note that if multiple presentations with the same name are open, the first presentation in the collection with the specified name is returned.

Use the ActivePresentation property to return the presentation in the active window. The following example saves the active presentation.

VBA Copy code Copy code
ActivePresentation.Save

Use the Presentation property to return the presentation that's in the specified document window or slide show window. The following example displays the name of the slide show running in slide show window one.

VBA Copy code Copy code
MsgBox SlideShowWindows(1).Presentation.Name

See also

Concepts

PowerPoint Object Model Reference

Other resources

Presentation Object Members


Points.Application Property (PowerPoint)

 Copy code hover
[image]

Points.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents a Points object.

See also

Concepts

Points Object

Other resources

Points Object Members


ShapeRange.TextFrame Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.TextFrame Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a TextFrame object that contains the alignment and anchoring properties for the specified shape or master text style. Read-only.

Syntax

expression .TextFrame

expression A variable that represents a ShapeRange object.

Return Value

TextFrame

Remarks

Use the TextRange property of the TextFrame object to return the text in the text frame.

Use the HasTextFrame property to determine whether a shape contains a text frame before you apply the TextFrame property.

Example

This example adds a rectangle to myDocument, adds text to the rectangle, and sets the top margin for the text frame.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes _

        .AddShape(msoShapeRectangle, 180, 175, 350, 140).TextFrame

    .TextRange.Text = "Here is some test text"

    .MarginTop = 10

End With

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


XlMarkerStyle Enumeration (PowerPoint)

 Copy code hover
[image]

XlMarkerStyle Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the marker style for a point or series in a line chart, scatter chart, or radar chart.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlMarkerStyleAutomatic | -4105 | Automatic markers.
xlMarkerStyleCircle | 8 | Circular markers.
xlMarkerStyleDash | -4115 | Long bar markers.
xlMarkerStyleDiamond | 2 | Diamond-shaped markers.
xlMarkerStyleDot | -4118 | Short bar markers.
xlMarkerStyleNone | -4142 | No markers.
xlMarkerStylePicture | -4147 | Picture markers.
xlMarkerStylePlus | 9 | Square markers with a plus sign.
xlMarkerStyleSquare | 1 | Square markers.
xlMarkerStyleStar | 5 | Square markers with an asterisk.
xlMarkerStyleTriangle | 3 | Triangular markers.
xlMarkerStyleX | -4168 | Square markers with an X.


Broadcast.SessionID Property (PowerPoint)

 Copy code hover
[image]

Broadcast.SessionID Property (PowerPoint)
Send feedback

If a broadcast is in progress, returns a String that specifies the ID of the session. Read-only.

Version information

Version Added: PowerPoint 2013

Syntax

expression .SessionID

expression A variable that represents a Broadcast object.

Remarks

If a broadcast is not in progress, SessionID returns an empty string.

Property value

STRING


CustomLayout Properties (PowerPoint)

 Copy code hover
[image]

CustomLayout Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object. Read-only.
Background | Returns a ShapeRange object that represents the slide background. Read-only.
CustomerData | Returns a CustomerData object.
Design | Returns a Design object that represents the design template associated with the specified custom layout.
DisplayMasterShapes | Determines whether the specified custom layout displays background objects on the slide master. Read/write.
FollowMasterBackground | Determines whether the specified custom layout follows the slide master background. Read/write.
Guides | Returns the Guides collection associated with a custom layout. Read-only.
HeadersFooters | Returns a HeadersFooters collection that represents the header, footer, date and time, and slide number associated with the specified custom layout.
Height | Returns the height of the specified object, in points. Read-only.
Hyperlinks | Returns a Hyperlinks collection that represents all hyperlinks on the slide associated with the specified custom layout. Read-only.
Index | Returns the index position of the specified custom layout in the CustomLayouts collection. Read-only.
MatchingName | Represents the internal name of the specified custom layout. Read/write.
Name | Represents the display name of the specified custom layout. Read/write.
Parent | Returns a reference to the slide master object that is the parent of the specified CustomLayout object. Read-only.
Preserved | Determines whether the specified custom layout is preserved from changes. Read/write.
Shapes | Returns a Shapes collection representing all the layout elements included in the specified custom layout. Read-only.
SlideShowTransition | Returns a SlideShowTransition object that represents the special effects for the specified custom layout. Read-only.
ThemeColorScheme | Returns a ThemeColorScheme object that represents the color scheme of the theme associated with the specified custom layout. Read-only.
TimeLine | Returns a TimeLine object that represents the animation timeline for the slide associated with the specified custom layout. Read-only.
Width | Returns the width of the specified custom layout, in points. Read-only.


ChartGroup.BubbleScale Property (PowerPoint)

 Copy code hover
[image]

ChartGroup.BubbleScale Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the scale factor for bubbles in the specified chart group. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .BubbleScale

expression A variable that represents a ChartGroup object.

Remarks

You can set this property to an integer from 0 (zero) through 300, corresponding to a percentage of the default size.

Note Note

This property applies only to bubble charts.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the bubble size in the first chart group of the first chart in the active document to 200 percent of the default size.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.ChartGroups(1).BubbleScale = 200

    End If

End With

See also

Concepts

ChartGroup Object

Other resources

ChartGroup Object Members


ChartCategory Object (PowerPoint)

 Copy code hover
[image]

ChartCategory Object (PowerPoint)
Send feedback

Represents all chart categories in the document, whether visible (unfiltered) or not.

Version information

Version Added: PowerPoint 2013

Remarks

You can use the IsFiltered property to determine which categories are visible and which are filtered out.


ShapeNodes.Insert Method (PowerPoint)

 Copy code hover
[image]

ShapeNodes.Insert Method (PowerPoint)
Send feedback

Published: July 16, 2012

Inserts a new segment after the specified node of the freeform.

Syntax

expression .Insert(Index, SegmentType, EditingType, X1, Y1, X2, Y2, X3, Y3)

expression A variable that represents an ShapeNodes object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Long | The node that the new node is to be inserted after.
SegmentType | Required | MsoSegmentType | The type of segment to be added.
EditingType | Required | MsoEditingType | The editing property of the vertex.
X1 | Required | Single | If the EditingType of the new segment is msoEditingAuto, this argument specifies the horizontal distance (in points) from the upper-left corner of the document to the endpoint of the new segment. If the EditingType of the new node is msoEditingCorner, this argument specifies the horizontal distance (in points) from the upper-left corner of the document to the first control point for the new segment.
Y1 | Required | Single | If the EditingType of the new segment is msoEditingAuto, this argument specifies the vertical distance (in points) from the upper-left corner of the document to the endpoint of the new segment. If the EditingType of the new node is msoEditingCorner, this argument specifies the vertical distance (in points) from the upper-left corner of the document to the first control point for the new segment.
X2 | Optional | Single | If the EditingType of the new segment is msoEditingCorner, this argument specifies the horizontal distance (in points) from the upper-left corner of the document to the second control point for the new segment. If the EditingType of the new segment is msoEditingAuto, don't specify a value for this argument.
Y2 | Optional | Single | If the EditingType of the new segment is msoEditingCorner, this argument specifies the vertical distance (in points) from the upper-left corner of the document to the second control point for the new segment. If the EditingType of the new segment is msoEditingAuto, don't specify a value for this argument.
X3 | Optional | Single | If the EditingType of the new segment is msoEditingCorner, this argument specifies the horizontal distance (in points) from the upper-left corner of the document to the endpoint of the new segment. If the EditingType of the new segment is msoEditingAuto, don't specify a value for this argument.
Y3 | Optional | Single | If the EditingType of the new segment is msoEditingCorner, this argument specifies the vertical distance (in points) from the upper-left corner of the document to the endpoint of the new segment. If the EditingType of the new segment is msoEditingAuto, don't specify a value for this argument.

Remarks

The SegmentType parameter value can be one of these MsoSegmentType constants.

msoSegmentCurve

msoSegmentLine

The EditingType parameter value can be one of these MsoEditingType constants.

msoEditingAuto

msoEditingCorner

Example

This example adds a smooth node with a curved segment after node four in shape three on myDocument. Shape three must be a freeform drawing with at least four nodes.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(3).Nodes

    .Insert Index:=4, SegmentType:=msoSegmentCurve, _

        EditingType:=msoEditingSmooth, X1:=210, Y1:=100

End With


Slide.ApplyTemplate Method (PowerPoint)

 Copy code hover
[image]

Slide.ApplyTemplate Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Applies a design template to the specified slide.

Syntax

expression .ApplyTemplate(FileName)

expression A variable that represents a Slide object.

Parameters

Name | Required/Optional | Data Type | Description
FileName | Required | String | Specifies the name of the design template.
Note Note

If you refer to an uninstalled presentation design template in a string, a run-time error is generated. The template is not installed automatically regardless of your FeatureInstall property setting. To use the ApplyTemplate method for a template that is not currently installed, you first must install the additional design templates. To do so, install the Additional Design Templates for PowerPoint by running the Microsoft Office installation program (click Add/Remove Programs or Programs and Features in Windows Control Panel).

See also

Concepts

Slide Object

Other resources

Slide Object Members


XlChartPictureType Enumeration (PowerPoint)

 Copy code hover
[image]

XlChartPictureType Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies how pictures are displayed on a column, bar picture chart, or legend key.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlStack | 2 | The picture is sized to repeat a maximum of 15 times in the longest stacked bar.
xlStackScale | 3 | The picture is sized to a specified number of units and repeated the length of the bar.
xlStretch | 1 | The picture is stretched the full length of the stacked bar.


CustomLayout.Shapes Property (PowerPoint)

 Copy code hover
[image]

CustomLayout.Shapes Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Shapes collection representing all the layout elements included in the specified custom layout. Read-only.

Syntax

expression .Shapes

expression A variable that represents a CustomLayout object.

Return Value

Shapes

Remarks

The Shapes collection of layout elements can include drawings, shapes, OLE objects, pictures, text objects, titles, headers, footers, slide numbers, and date and time objects.

See also

Concepts

CustomLayout Object

Other resources

CustomLayout Object Members


Floor Object (PowerPoint)

 Copy code hover
[image]

Floor Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the floor of a 3-D chart.

Version Information

Version Added: PowerPoint 2007

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

Use the Floor property to return the Floor object. The following example sets the floor color for embedded chart one to cyan. The example will fail if the chart is not a 3-D chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.Floor.Interior.Color = RGB(0, 255, 255)

    End If

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

Floor Object Members


NamedSlideShow Methods (PowerPoint)

 Copy code hover
[image]

NamedSlideShow Methods (PowerPoint)
Send feedback

Published: July 12, 2012

This object has the following methods:

Methods

Name | Description
Delete | Deletes the specified NamedSlideShow object.


DisplayUnitLabel.Position Property (PowerPoint)

 Copy code hover
[image]

DisplayUnitLabel.Position Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the position of the unit label on an axis in the chart. Read/write XlChartElementPosition.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Position

expression A variable that represents a DisplayUnitLabel object.

See also

Concepts

DisplayUnitLabel Object

Other resources

DisplayUnitLabel Object Members


Shape.Line Property (PowerPoint)

 Copy code hover
[image]

Shape.Line Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a LineFormat object that contains line formatting properties for the specified shape. (For a line, the LineFormat object represents the line itself; for a shape with a border, the LineFormat object represents the border.) Read-only.

Syntax

expression .Line

expression A variable that represents a Shape object.

Return Value

LineFormat

Example

This example adds a blue dashed line to myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddLine(10, 10, 250, 250).Line

    .DashStyle = msoLineDashDotDot

    .ForeColor.RGB = RGB(50, 0, 128)

End With

This example adds a cross to the first slide and then sets its border to be 8 points thick and red.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddShape(msoShapeCross, 10, 10, 50, 70).Line

    .Weight = 8

    .ForeColor.RGB = RGB(255, 0, 0)

End With

See also

Concepts

Shape Object

Other resources

Shape Object Members


Chart.HasAxis Property (PowerPoint)

 Copy code hover
[image]

Chart.HasAxis Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets which axes exist on the chart. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .HasAxis(Index1, Index2)

expression A variable that represents a Chart object.

Parameters

Name | Required/Optional | Data Type | Description
Index1 | Optional | Variant | The axis type. Series axes apply only to 3-D charts. Can be one of the XlAxisType constants.
Index2 | Optional | Variant | The axis group. 3-D charts have only one set of axes. Can be one of the XlAxisGroup constants.

Remarks

You must enter a value for at least one of the parameters when you set this property.

Microsoft Word may create or delete axes if you change the chart type or the AxisGroup property.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example enables the primary value axis for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.HasAxis(xlValue, xlPrimary) = True

    End If

End With

See also

Concepts

Chart Object

Other resources

Chart Object Members


LegendKey.ClearFormats Method (PowerPoint)

 Copy code hover
[image]

LegendKey.ClearFormats Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Clears the formatting of the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ClearFormats

expression A variable that represents a LegendKey object.

See also

Concepts

LegendKey Object

Other resources

LegendKey Object Members


DataLabel.Format Property (PowerPoint)

 Copy code hover
[image]

DataLabel.Format Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Format

expression A variable that represents a DataLabel object.

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


Cell.Split Method (PowerPoint)

 Copy code hover
[image]

Cell.Split Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Splits a single table cell into multiple cells.

Syntax

expression .Split(NumRows, NumColumns)

expression A variable that represents a Cell object.

Parameters

Name | Required/Optional | Data Type | Description
NumRows | Required | Long | Number of rows that the cell is being split into.
NumColumns | Required | Long | Number of columns that the cell is being split into.

Example

This example splits the first cell in the referenced table into two cells, one directly above the other.

VBA Copy code Copy code
ActivePresentation.Slides(2).Shapes(5).Table.Cell(1, 1).Split 2, 1

See also

Concepts

Cell Object

Other resources

Cell Object Members


View.PrintOptions Property (PowerPoint)

 Copy code hover
[image]

View.PrintOptions Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a PrintOptions object that represents print options that are saved with the specified presentation. Read-only.

Syntax

expression .PrintOptions

expression A variable that represents a View object.

Return Value

PrintOptions

Example

This example causes hidden slides in the active presentation to be printed, and it scales the printed slides to fit the paper size.

VBA Copy code Copy code
With Application.ActivePresentation

    With .PrintOptions

        .PrintHiddenSlides = True

        .FitToPage = True

    End With

    .PrintOut

End With

See also

Concepts

View Object

Other resources

View Object Members


TextEffectFormat.FontItalic Property (PowerPoint)

 Copy code hover
[image]

TextEffectFormat.FontItalic Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the font in the specified WordArt is italic. Read/write.

Syntax

expression .FontItalic

expression A variable that represents a TextEffectFormat object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The font in the specified WordArt is not italic.
msoTrue | The font in the specified WordArt is italic.

Example

This example sets the font to italic for the shape named "WordArt 4" on myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes("WordArt 4").TextEffect.FontItalic = msoTrue

See also

Concepts

TextEffectFormat Object
Font Object

Other resources

TextEffectFormat Object Members
Font Object Members


Font.Underline Property (PowerPoint)

 Copy code hover
[image]

Font.Underline Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the specified text (for the Font object) or the font style (for the FontInfo object) is underlined. Read/write.

Syntax

expression .Underline

expression A variable that represents an Font object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified text (or font style) isn't underlined.
msoTriStateMixed | Some characters are underlined (for the specified text) and some aren't.
msoTrue | The specified text (or font style) is underlined.

Example

This example sets the formatting for the text in shape two on slide one in the active presentation.

VBA Copy code Copy code
With Application.ActivePresentation.Slides(1).Shapes(2)

    With .TextFrame.TextRange.Font

        .Size = 32

        .Name = "Palatino"

        .Underline = msoTrue

    End With

End With

See also

Concepts

Font Object

Other resources

Font Object Members


ChartArea Members (PowerPoint)

 Copy code hover
[image]

ChartArea Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents the chart area of a chart.

Methods

Name | Description
Clear | Clears the entire object.
ClearContents | Clears the data from a chart but leaves the formatting.
ClearFormats | Clears the formatting of the object.
Copy | Copies the object to the Clipboard.
Select | Selects the object.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Height | Returns or sets the height, in points, of the object. Read/write Double.
Left | Returns or sets the distance, in points, from the left edge of the object to the left edge of the chart area. Read/write Double.
Name | Returns the name of the object. Read-only String.
Parent | Returns the parent for the specified object. Read-only Object.
Shadow | Returns or sets a value that determines whether the object has a shadow. Read/write Boolean.
Top | Returns or sets the distance, in points, from the top edge of the object to the top of row 1 (on a worksheet) or the top of the chart area (on a chart). Read/write Double.
Width | Returns or sets the width, in points, of the object. Read/write Double.


Sequence.ConvertToBuildLevel Method (PowerPoint)

 Copy code hover
[image]

Sequence.ConvertToBuildLevel Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Changes the build level information for a specified animation effect. Returns an Effect object that represents the build level information.

Syntax

expression .ConvertToBuildLevel(Effect, Level)

expression A variable that represents a Sequence object.

Parameters

Name | Required/Optional | Data Type | Description
Effect | Required | Effect | The specified animation effect.
Level | Required | MsoAnimateByLevel | The animation build level.

Return Value

Effect

Remarks

Changing build level information for an effect invalidates any existing effects.

Example

The following example changes the build level information for an animation effect, making the original effect invalid.

VBA Copy code Copy code
Sub ConvertBuildLevel()

    Dim sldFirst As Slide

    Dim shpFirst As Shape

    Dim effFirst As Effect

    Dim effConvert As Effect

    Set sldFirst = ActiveWindow.Selection.SlideRange(1)

    Set shpFirst = sldFirst.Shapes(1)

    Set effFirst = sldFirst.TimeLine.MainSequence _

        .AddEffect(Shape:=shpFirst, EffectID:=msoAnimEffectAscend)

    Set effConvert = sldFirst.TimeLine.MainSequence _

        .ConvertToBuildLevel(Effect:=effFirst, _

        Level:=msoAnimateTextByFirstLevel)

End Sub

See also

Concepts

Sequence Object

Other resources

Sequence Object Members


ChartFormat.PictureFormat Property (PowerPoint)

 Copy code hover
[image]

ChartFormat.PictureFormat Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a PictureFormat object for a specified chart that contains pictures. Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .PictureFormat

expression A variable that represents a ChartFormat object.

See also

Concepts

ChartFormat Object

Other resources

ChartFormat Object Members


SlideShowTransition Properties (PowerPoint)

 Copy code hover
[image]

SlideShowTransition Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
AdvanceOnClick | Determines whether the specified slide advances when it is clicked during a slide show. Read/write.
AdvanceOnTime | Determines whether the specified slide advances automatically after a specified amount of time has elapsed. Read/write.
AdvanceTime | Returns or sets the amount of time, in seconds, after which the specified slide transition will occur. Read/write.
Application | Returns an Application object that represents the creator of the specified object.
Duration | Returns or sets the length of an animation in seconds. Read/write.
EntryEffect | Returns or sets the special effect applied to the specified slide transition. Read/write.
Hidden | Determines whether the specified slide is hidden during a slide show. Read/write.
LoopSoundUntilNext | Specifies whether the sound that's been set for the specified slide transition loops until the next sound starts. Read/write.
Parent | Returns the parent object for the specified object.
SoundEffect | Returns a SoundEffect object that represents the sound to be played during the transition to the specified slide. Read-only.
Speed | Represents the speed of the transition to the specified slide. Read/write.


Presentation.VBASigned Property (PowerPoint)

 Copy code hover
[image]

Presentation.VBASigned Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether the Visual Basic for Applications (VBA) project for the specified document has been digitally signed. Read-only.

Syntax

expression .VBASigned

expression A variable that represents a Presentation object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The VBA project for the specified document has not been digitally signed.
msoTrue | The VBA project for the specified document has been digitally signed.

Example

This example loads a presentation called MyPres.ppt and tests to see whether or not it has a digital signature. If there's no digital signature, the code displays a warning message.

VBA Copy code Copy code
Presentations.Open FileName:="c:\My Documents\MyPres.ppt", _

    ReadOnly:=msoFalse, WithWindow:=msoTrue

With ActivePresentation

    If .VBASigned = msoFalse And _

           .VBProject.VBComponents.Count > 0 Then

       MsgBox "Warning! The Visual Basic project for" _

           & vbCrLf & "this presentation has not" _

           & vbCrLf & " been digitally signed." _

           , vbCritical, "Digital Signature Warning"

    End If

End With

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


LegendKey.Creator Property (PowerPoint)

 Copy code hover
[image]

LegendKey.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents a LegendKey object.

See also

Concepts

LegendKey Object

Other resources

LegendKey Object Members


SectionProperties.SectionID Method (PowerPoint)

 Copy code hover
[image]

SectionProperties.SectionID Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a string that represents the unique identifier of the specified section.

Syntax

expression .SectionID(sectionIndex)

expression A variable that represents a SectionProperties object.

Parameters

Name | Required/Optional | Data Type | Description
sectionIndex | Required | Integer | The index of the section.

Return Value

String

Remarks

The returned string is in the form "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX}", where each "X" is a hexadecimal digid.

See also

Concepts

SectionProperties Object

Other resources

SectionProperties Object Members


AxisTitle.HorizontalAlignment Property (PowerPoint)

 Copy code hover
[image]

AxisTitle.HorizontalAlignment Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the horizontal alignment for the specified object. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .HorizontalAlignment

expression A variable that represents an AxisTitle object.

Remarks

The value of this property can be set to one of the following XlConstants constants:

  • xlCenter

  • xlDistributed

  • xlJustify

  • xlLeft

  • xlRight

Some of these constants may not be available to you, depending on the language support (for example, U.S. English) that you have selected or installed.

See also

Concepts

AxisTitle Object

Other resources

AxisTitle Object Members


Axis.Application Property (PowerPoint)

 Copy code hover
[image]

Axis.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents an Axis object.

See also

Concepts

Axis Object

Other resources

Axis Object Members


Panes Methods (PowerPoint)

 Copy code hover
[image]

Panes Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Item | Returns a single Pane object from the specified Panes collection.


MediaFormat.SetDisplayPictureFromFile Method (PowerPoint)

 Copy code hover
[image]

MediaFormat.SetDisplayPictureFromFile Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets the display picture from a picture file.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .SetDisplayPictureFromFile(FilePath)

expression An expression that returns a MediaFormat object.

Parameters

Name | Required/Optional | Data Type | Description
FilePath | Required | String | The path to the display picture file.

Return Value

Nothing

See also

Concepts

MediaFormat Object

Other resources

MediaFormat Object Members


Font.NameComplexScript Property (PowerPoint)

 Copy code hover
[image]

Font.NameComplexScript Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the complex script font name. Used for mixed language text. Read/write.

Syntax

expression .NameComplexScript

expression A variable that represents a Font object.

Return Value

String

Remarks

When you have a right-to-left language setting specified, this property is equivalent to the Complex scripts font list in the Font dialog box (Font tab). When you have an Asian language setting specified, this property is equivalent to the Asian text font list in the Font dialog box (Font tab).

Example

This example sets the complex script font to Times New Roman.

VBA Copy code Copy code
ActivePresentation.Slides(1).Shapes.Title.TextFrame _

    .TextRange.Font.NameComplexScript = "Times New Roman"

See also

Concepts

Font Object

Other resources

Font Object Members


ThreeDFormat.Depth Property (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.Depth Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the depth of the shape's extrusion. Read/write.

Syntax

expression .Depth

expression A variable that represents a ThreeDFormat object.

Return Value

Single

Remarks

The Depth property value can be from - 600 through 9600 (positive values produce an extrusion whose front face is the original shape; negative values produce an extrusion whose back face is the original shape).

Example

This example adds an oval to myDocument, and then specifies that the oval be extruded to a depth of 50 points and that the extrusion be purple.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

Set myShape = myDocument.Shapes _

    .AddShape(msoShapeOval, 90, 90, 90, 40)

With myShape.ThreeD

    .Visible = True

    .Depth = 50

    'RGB value for purple

    .ExtrusionColor.RGB = RGB(255, 100, 255)

End With

See also

Concepts

TickLabels Object
ThreeDFormat Object

Other resources

TickLabels Object Members
ThreeDFormat Object Members


AddIns.Item Method (PowerPoint)

 Copy code hover
[image]

AddIns.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single Addin object from the specified Addins collection.

Syntax

expression .Item(Index)

expression A variable that represents an AddIns object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Variant | The name or index number of the single Addin object in the collection to be returned.

Return Value

AddIn

See also

Concepts

AddIns Object

Other resources

AddIns Object Members


MsoAnimFilterEffectSubtype Enumeration (PowerPoint)

 Copy code hover
[image]

MsoAnimFilterEffectSubtype Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the subtype of the filter effect.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
msoAnimFilterEffectSubtypeAcross | 9 | Across
msoAnimFilterEffectSubtypeDown | 25 | Down
msoAnimFilterEffectSubtypeDownLeft | 14 | Left
msoAnimFilterEffectSubtypeDownRight | 16 | Right
msoAnimFilterEffectSubtypeFromBottom | 13 | From Bottom
msoAnimFilterEffectSubtypeFromLeft | 10 | From Left
msoAnimFilterEffectSubtypeFromRight | 11 | From Right
msoAnimFilterEffectSubtypeFromTop | 12 | From Top
msoAnimFilterEffectSubtypeHorizontal | 5 | Horizontal
msoAnimFilterEffectSubtypeIn | 7 | In
msoAnimFilterEffectSubtypeInHorizontal | 3 | In Horizontal
msoAnimFilterEffectSubtypeInVertical | 1 | In Vertical
msoAnimFilterEffectSubtypeLeft | 23 | Left
msoAnimFilterEffectSubtypeNone | 0 | None
msoAnimFilterEffectSubtypeOut | 8 | Out
msoAnimFilterEffectSubtypeOutHorizontal | 4 | Out Horizontal
msoAnimFilterEffectSubtypeOutVertical | 2 | Out Vertical
msoAnimFilterEffectSubtypeRight | 24 | Right
msoAnimFilterEffectSubtypeSpokes1 | 18 | Spokes 1
msoAnimFilterEffectSubtypeSpokes2 | 19 | Spokes 2
msoAnimFilterEffectSubtypeSpokes3 | 20 | Spokes 3
msoAnimFilterEffectSubtypeSpokes4 | 21 | Spokes 4
msoAnimFilterEffectSubtypeSpokes8 | 22 | Spokes 8
msoAnimFilterEffectSubtypeUp | 26 | Up
msoAnimFilterEffectSubtypeUpLeft | 15 | Up Left
msoAnimFilterEffectSubtypeUpRight | 17 | Up Right
msoAnimFilterEffectSubtypeVertical | 6 | Vertical


LegendEntry.Font Property (PowerPoint)

 Copy code hover
[image]

LegendEntry.Font Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the font of the specified object. Read-only ChartFont.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Font

expression A variable that represents a LegendEntry object.

See also

Concepts

LegendEntry Object

Other resources

LegendEntry Object Members


AnimationBehavior.MotionEffect Property (PowerPoint)

 Copy code hover
[image]

AnimationBehavior.MotionEffect Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a MotionEffect object that represents the properties of a motion animation.

Syntax

expression .MotionEffect

expression A variable that represents an AnimationBehavior object.

Return Value

MotionEffect

Example

This example adds a new motion behavior to the first slide's main sequence that moves the specified animation sequence from one side of the page to the shape's original position.

VBA Copy code Copy code
Sub NewMotion()

    With ActivePresentation.Slides(1).TimeLine.MainSequence(1) _

            .Behaviors.Add(msoAnimTypeMotion).MotionEffect

        .FromX = 100

        .FromY = 100

        .ToX = 0

        .ToY = 0

    End With

End Sub

See also

Concepts

AnimationBehavior Object

Other resources

AnimationBehavior Object Members


Slide.Application Property (PowerPoint)

 Copy code hover
[image]

Slide.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a Slide object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

Slide Object

Other resources

Slide Object Members


Broadcast.State Property (PowerPoint)

 Copy code hover
[image]

Broadcast.State Property (PowerPoint)
Send feedback

Returns an MSOBroadcastState constant that describes the current broadcast state. Read-only.

Version information

Version Added: PowerPoint 2013

Syntax

expression .State

expression A variable that represents a Broadcast object.

Remarks

The State property can return one of the following three states:

  • No broadcast (0)

  • Broadcast started (1)

  • Broadcast paused (2)

Property value

<unknown type>


TabStop.Type Property (PowerPoint)

 Copy code hover
[image]

TabStop.Type Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the formatting of a tab stop. Read/write.

Syntax

expression .Type

expression A variable that represents a TabStop object.

Return Value

PpTabStopType

Remarks

The value of the Type property can be one of these PpTabStopType constants.

ppTabStopCenter

ppTabStopDecimal

ppTabStopLeft

ppTabStopMixed

ppTabStopRight

See also

Concepts

TabStop Object

Other resources

TabStop Object Members


ColorEffect.By Property (PowerPoint)

 Copy code hover
[image]

ColorEffect.By Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a ColorFormat object that represents a change to the color of the object by the specified number, expressed in RGB format. Read-only.

Syntax

expression .By

expression A variable that represents a ColorEffect object.

Remarks

Do not confuse this property with the ByX or ByY properties of the ScaleEffect and MotionEffect objects, which are only used for scaling or motion effects.

Example

This example adds a color effect and changes its color. This example assumes there is at least one shape on the first slide of the active presentation.

VBA Copy code Copy code
Sub AddAndChangeColorEffect()

    Dim effBlinds As Effect

    Dim tmlnShape As TimeLine

    Dim shpShape As Shape

    Dim animBehavior As AnimationBehavior

    Dim clrEffect As ColorEffect

    'Sets shape, timing, and effect

    Set shpShape = ActivePresentation.Slides(1).Shapes(1)

    Set tmlnShape = ActivePresentation.Slides(1).TimeLine

    Set effBlinds = tmlnShape.MainSequence.AddEffect _

        (Shape:=shpShape, effectId:=msoAnimEffectBlinds)

    'Adds animation behavior and color effect

    Set animBehavior = tmlnShape.MainSequence(1).Behaviors _

        .Add(Type:=msoAnimTypeColor)

    Set clrEffect = animBehavior.ColorEffect

    'Specifies color

    clrEffect.By.RGB = RGB(Red:=255, Green:=0, Blue:=0)

End Sub

See also

Concepts

ColorEffect Object

Other resources

ColorEffect Object Members


AnimationPoints Properties (PowerPoint)

 Copy code hover
[image]

AnimationPoints Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.
Smooth | Determines whether the transition from one animation point to another is smoothed. Read/write.


Axis.Type Property (PowerPoint)

 Copy code hover
[image]

Axis.Type Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the axis type. Read-only XlAxisType.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Type

expression A variable that represents an Axis object.

Remarks

When you use this property for the horizontal axis of scatter charts, xlCategory will be returned as the axis type.

See also

Concepts

Axis Object

Other resources

Axis Object Members


AxisTitle.Name Property (PowerPoint)

 Copy code hover
[image]

AxisTitle.Name Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a String value that represents the name of the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Name

expression A variable that represents an AxisTitle object.

See also

Concepts

AxisTitle Object

Other resources

AxisTitle Object Members


Axis.TickLabelSpacingIsAuto Property (PowerPoint)

 Copy code hover
[image]

Axis.TickLabelSpacingIsAuto Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a value that indicates whether the tick label spacing is automatic. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .TickLabelSpacingIsAuto

expression A variable that represents an Axis object.

Remarks

The TickLabelSpacing property returns the current tick label spacing, whether or not the setting is automatic.

See also

Concepts

Axis Object

Other resources

Axis Object Members


Presentations.Item Method (PowerPoint)

 Copy code hover
[image]

Presentations.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single Presentation object from the specified Presentations collection.

Syntax

expression .Item(Index)

expression A variable that represents a Presentations object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Variant | The name or index number of the single Presentation object in the collection to be returned.

Return Value

Presentation

See also

Concepts

Presentations Object

Other resources

Presentations Object Members


ChartFormat Properties (PowerPoint)

 Copy code hover
[image]

ChartFormat Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Adjustments | Returns an Adjustments object that contains a collection of adjustment values for the specified Chart Format object.
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
AutoShapeType | Returns or sets the auto shape type of the specified object. Read-write MSOAutoShapeType.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Fill | Returns a FillFormat object for the parent chart element that contains fill formatting properties for the chart element. Read-only.
Glow | Returns the glow formatting properties for the chart element. Read-only GlowFormat.
Line | Returns the line formatting properties for the specified chart element. Read-only LineFormat.
Parent | Returns the parent for the specified object. Read-only Object.
PictureFormat | Returns a PictureFormat object for a specified chart that contains pictures. Read-only.
Shadow | Returns shadow formatting properties for the chart element. Read-only ShadowFormat.
SoftEdge | Returns the soft edge formatting for a shape. Read-only SoftEdgeFormat.
TextFrame2 | Returns the text formatting for the specified chart element. Read-only TextFrame2.
ThreeD | Returns the 3-D-effect formatting properties for the specified chart. Read-only ThreeDFormat.


TextFrame2.MarginBottom Property (PowerPoint)

 Copy code hover
[image]

TextFrame2.MarginBottom Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets the distance (in points) between the bottom of the text frame and the bottom of the inscribed rectangle of the shape that contains the text. Read/write.

Syntax

expression .MarginBottom

expression An expression that returns a TextFrame2 object.

Return Value

Single

Example

The following example adds a rectangle to a slide, adds text to the rectangle, and then sets the margins for the text frame.

VBA Copy code Copy code
Public Sub MarginBottom_Example()

    Set pptSlide = ActivePresentation.Slides(1)

    With pptSlide.Shapes.AddShape(msoShapeRectangle, 0, 0, 250, 140).TextFrame2

        .TextRange.Text = "Here is some sample text"

        .MarginBottom = 10

        .MarginLeft = 10

        .MarginRight = 10

        .MarginTop = 10

    End With

End Sub

See also

Concepts

TextFrame2 Object

Other resources

TextFrame2 Object Members


ChartBorder.Color Property (PowerPoint)

 Copy code hover
[image]

ChartBorder.Color Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the primary color of the object. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Color

expression A variable that represents a ChartBorder object.

See also

Concepts

ChartBorder Object

Other resources

ChartBorder Object Members


FillFormat.TextureOffsetY Property (PowerPoint)

 Copy code hover
[image]

FillFormat.TextureOffsetY Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the vertical offset of the texture from the origin in points. Read/write.

Syntax

expression .TextureOffsetY

expression An expression that returns a FillFormat object.

Remarks

The position of the origin is determined by the setting of the TextureAlignment property.

The setting of the TextureHorizontalScale property corresponds to the setting of the Scale X box under Tiling Options on the Fill pane of the Format Picture dialog box in the Microsoft PowerPoint user interface (under Drawing Tools, on the Format Tab, in the Shape Styles group, click Format Shape.)

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


MediaFormat.ResampleFromProfile Method (PowerPoint)

 Copy code hover
[image]

MediaFormat.ResampleFromProfile Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Adds the current media object to the queue and begins resampling base on the specified profile.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .ResampleFromProfile(profile)

expression An expression that returns a MediaFormat object.

Parameters

Name | Required/Optional | Data Type | Description
profile | Optional | PpResampleMediaProfile | The resample media profile to use.

Return Value

Nothing

Remarks

profile must be one of the following PpResampleMediaProfile constants.

Constant | Value | Description
ppResampleMediaProfileCustom | 1 | Custom profile
ppResampleMediaProfileSmall | 2 | Small profile
ppResampleMediaProfileSmaller | 3 | Smaller profile
ppResampleMediaProfileSmallest | 4 | Smallest profile

See also

Concepts

MediaFormat Object

Other resources

MediaFormat Object Members


FillFormat.Creator Property (PowerPoint)

 Copy code hover
[image]

FillFormat.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.

Syntax

expression .Creator

expression A variable that represents a FillFormat object.

Return Value

Long

Remarks

The Creator property is designed to be used in Microsoft Office applications for the Macintosh.

Example

This example displays a message about the creator of myObject.

VBA Copy code Copy code
Set myObject = Application.ActivePresentation.Slides(1).Shapes(1)

If myObject.Creator = &h50575054 Then

    MsgBox "This is a PowerPoint object"

Else

    MsgBox "This is not a PowerPoint object"

End If

See also

Concepts

FillFormat Object

Other resources

FillFormat Object Members


TickLabels.Format Property (PowerPoint)

 Copy code hover
[image]

TickLabels.Format Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Format

expression A variable that represents a TickLabels object.

See also

Concepts

TickLabels Object

Other resources

TickLabels Object Members


Sequence Properties (PowerPoint)

 Copy code hover
[image]

Sequence Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


Guide.Delete Method (PowerPoint)

 Copy code hover
[image]

Guide.Delete Method (PowerPoint)
Send feedback

Removes the drawing guide from the presentation or custom layout.

Version information

Version Added: PowerPoint 2013

Syntax

expression .Delete

expression A variable that represents a Guide object.

Return value

VOID


Broadcast.Application Property (PowerPoint)

 Copy code hover
[image]

Broadcast.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a Broadcast object.

See also

Concepts

Broadcast Object

Other resources

Broadcast Object Members


Points Object (PowerPoint)

 Copy code hover
[image]

Points Object (PowerPoint)
See also Send feedback

Published: July 12, 2012

A collection of all the Point objects in the specified series in a chart.

Version Information

Version Added: PowerPoint 2007

Remarks

Use Points(Index), where Index is the point index number, to return a single Point object. Points are numbered from left to right on the series. Points(1) is the leftmost point, and Points(Points.Count) is the rightmost point.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

Use the Points method to return the Points collection. The following example adds a data label to the last point in series one for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.SeriesCollection(1).Points

            .Item(.Count).ApplyDataLabels Type:=xlShowValue

        End With

    End If

End With

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the marker style for the third point in series one for the first chart in the active document. The specified series must be a 2-D line, scatter, or radar series.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).Points(3).MarkerStyle = xlDiamond

    End If

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

Points Object Members


AnimationSettings.AdvanceTime Property (PowerPoint)

 Copy code hover
[image]

AnimationSettings.AdvanceTime Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the amount of time, in seconds, after which the specified shape will become animated. Read/write.

Syntax

expression .AdvanceTime

expression A variable that represents an AnimationSettings object.

Return Value

Single

Remarks

The specified slide animation won't start automatically after the amount of time you've specified unless the AdvanceMode property of the animation is set to ppAdvanceOnTime.

Example

This example sets shape two on slide one in the active presentation to become animated automatically after five seconds.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(2).AnimationSettings

    .AdvanceMode = ppAdvanceOnTime

    .AdvanceTime = 5

    .TextLevelEffect = ppAnimateByAllLevels

    .Animate = True

End With

See also

Concepts

AnimationSettings Object

Other resources

AnimationSettings Object Members


SeriesCollection.Extend Method (PowerPoint)

 Copy code hover
[image]

SeriesCollection.Extend Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Adds new data points to an existing series collection.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Extend(Source, Rowcol, CategoryLabels)

expression A variable that represents a SeriesCollection object.

Parameters

Name | Required/Optional | Data Type | Description
Source | Required | Variant | The new data to be added to the SeriesCollection object, represented as an A1-style range reference.
Rowcol | Optional | Variant | One of the XlRowCol enumeration values that specifies whether the new values are in the rows or columns of the given range source. If this argument is omitted, Microsoft Word attempts to determine where the values are by the size and orientation of the selected range or by the dimensions of the array.
CategoryLabels | Optional | Variant | True to have the first row or column contain the name of the category labels. False to have the first row or column contain the first data point of the series. If this argument is omitted, Word attempts to determine the location of the category label from the contents of the first row or column.

Remarks

This method is not available for PivotChart reports.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example extends the series on the first chart in the active document by adding the data in cells B1:B6 from the linked workbook.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection.Extend _

            Source:="B1:B6"

    End If

End With

See also

Concepts

SeriesCollection Object

Other resources

SeriesCollection Object Members


DisplayUnitLabel.Left Property (PowerPoint)

 Copy code hover
[image]

DisplayUnitLabel.Left Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the distance, in points, from the left edge of the object to the left edge of the chart area. Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Left

expression A variable that represents a DisplayUnitLabel object.

See also

Concepts

DisplayUnitLabel Object

Other resources

DisplayUnitLabel Object Members


Series.LeaderLines Property (PowerPoint)

 Copy code hover
[image]

Series.LeaderLines Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the leader lines for the series. Read-only LeaderLines.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .LeaderLines

expression A variable that represents a Series object.

Remarks

This property applies only to pie charts.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example adds data labels and blue leader lines to series one on the first pie chart in the active document. If no leader lines are visible, this example code will fail. In this situation, you can manually drag one of the data labels away from the pie chart to make a leader line show up.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.SeriesCollection(1)

            .HasDataLabels = True

            .DataLabels.Position = xlLabelPositionBestFit

            .HasLeaderLines = True

            .LeaderLines.Border.ColorIndex = 5

        End With

    End If

End With

See also

Concepts

Series Object

Other resources

Series Object Members


SeriesCollection.Parent Property (PowerPoint)

 Copy code hover
[image]

SeriesCollection.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents a SeriesCollection object.

See also

Concepts

SeriesCollection Object

Other resources

SeriesCollection Object Members


Shapes.Item Method (PowerPoint)

 Copy code hover
[image]

Shapes.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single Shape object from the specified Shapes collection.

Syntax

expression .Item(Index)

expression A variable that represents a Shapes object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Variant | The name or index number of the single Shape object in the collection to be returned.

Return Value

Shape

Example

This example sets the foreground color to red for the shape named "Rectangle 1" on slide one in the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides.Item(1).Shapes.Item("rectangle 1").Fill _

    .ForeColor.RGB = RGB(128, 0, 0)

See also

Concepts

Shapes Object

Other resources

Shapes Object Members


SlideRange Methods (PowerPoint)

 Copy code hover
[image]

SlideRange Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
ApplyTemplate | Applies a design template to the specified slide range.
ApplyTemplate2 | Applies a design template and theme variant to the slide range.
ApplyTheme | Applies a theme or design template to the specified range of slides.
ApplyThemeColorScheme | Applies a color scheme to the specified range of slides.
Copy | Copies the specified object to the Clipboard.
Cut | Deletes the specified object and places it on the Clipboard.
Delete | Deletes the specified SlideRange object.
Duplicate | Creates a duplicate of the specified SlideRange object, adds the new range of slides to the Slides collection immediately after the slide range specified originally, and then returns a SlideRange object that represents the duplicate slides.
Export | Exports a range of slides, using the specified graphics filter, and saves the exported file under the specified file name.
Item | Returns a single Slide object from the specified SlideRange collection.
MoveTo | Moves the specified object to a specific location within the same collection, renumbering all other items in the collection appropriately.
MoveToSectionStart | Moves the current position to the start of the specified section in the SlideRange object.
PublishSlides | Creates a Web presentation (in HTML format) from any loaded presentation. You can view the published presentation in a Web browser.
Select | Selects the specified object.


Sequence.ConvertToTextUnitEffect Method (PowerPoint)

 Copy code hover
[image]

Sequence.ConvertToTextUnitEffect Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Effect object that represents how text should be animated.

Syntax

expression .ConvertToTextUnitEffect(Effect, unitEffect)

expression A variable that represents a Sequence object.

Parameters

Name | Required/Optional | Data Type | Description
Effect | Required | Effect | The animation effect to which the text unit effect applies.
unitEffect | Required | MsoAnimTextUnitEffect | How the text should be animated.

Return Value

Effect

Example

This example adds an animation to a given shape and animates its accompanying text by character.

VBA Copy code Copy code
Sub NewTextUnitEffect()

    Dim shpFirst As Shape

    Dim tmlMain As TimeLine

    Set shpFirst = ActivePresentation.Slides(1).Shapes(1)

    Set tmlMain = ActivePresentation.Slides(1).TimeLine

    tmlMain.MainSequence.ConvertToTextUnitEffect _

        Effect:=tmlMain.MainSequence.AddEffect(Shape:=shpFirst, _

            EffectID:=msoAnimEffectRandomEffects), _

        unitEffect:=msoAnimTextUnitEffectByCharacter

End Sub

See also

Concepts

Sequence Object

Other resources

Sequence Object Members


SlideShowView Methods (PowerPoint)

 Copy code hover
[image]

SlideShowView Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
DrawLine | Draws a line in the specified slide show view.
EndNamedShow | Switches from running a custom, or named, slide show to running the entire presentation of which the custom show is a subset. When the slide show advances from the current slide, the next slide displayed will be the next one in the entire presentation, not the next one in the custom slide show.
EraseDrawing | Removes lines drawn during a slide show by using either the DrawLine method or the pen tool.
Exit | Ends the specified slide show.
First | Sets the specified slide show view to display the first slide in the presentation.
FirstAnimationIsAutomatic | Returns True if the current slide has an initial animation that runs automically.
GetClickCount | Returns the number of mouse clicks that are defined for a slide.
GetClickIndex | Returns the index number of the current mouse click for an animation that is actively playing on a slide or has just finished.
GotoClick | Plays an animation associated with a specified mouse click and any animations that follow on the slide.
GotoNamedShow | Switches to the specified custom, or named, slide show during another slide show. When the slide show advances from the current slide, the next slide displayed will be the next one in the specified custom slide show, not the next one in current slide show.
GotoSlide | Switches to the specified slide during a slide show. You can specify whether you want the animation effects to be rerun.
Last | Sets the specified slide show view to display the last slide in the presentation.
Next | Displays the slide immediately following the slide that's currently displayed.
Player | Allows access to playback controls for the associated view in the current window.
Previous | Shows the slide immediately preceding the slide that's currently displayed.
ResetSlideTime | Resets the elapsed time (represented by the SlideElapsedTime property) for the slide that's currently displayed to 0 (zero).


Shape.IncrementRotation Method (PowerPoint)

 Copy code hover
[image]

Shape.IncrementRotation Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Changes the rotation of the specified shape around the z-axis by the specified number of degrees. Use the Rotation property to set the absolute rotation of the shape.

Syntax

expression .IncrementRotation(Increment)

expression A variable that represents a Shape object.

Parameters

Name | Required/Optional | Data Type | Description
Increment | Required | Single | Specifies how far the shape is to be rotated horizontally, in degrees. A positive value rotates the shape clockwise; a negative value rotates it counterclockwise.

Remarks

To rotate a three-dimensional shape around the x-axis or the y-axis, use the IncrementRotationX method or the IncrementRotationY method.

Example

This example duplicates shape one on myDocument, sets the fill for the duplicate, moves it 70 points to the right and 50 points up, and rotates it 30 degrees clockwise.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(1).Duplicate

    .Fill.PresetTextured msoTextureGranite

    .IncrementLeft 70

    .IncrementTop -50

    .IncrementRotation 30

End With

See also

Concepts

Shape Object

Other resources

Shape Object Members


Hyperlink.SubAddress Property (PowerPoint)

 Copy code hover
[image]

Hyperlink.SubAddress Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the location within a document — such as a bookmark in a word document, a range in a Microsoft Office Excel worksheet, or a slide in a Microsoft PowerPoint presentation — associated with the specified hyperlink. Read/write.

Syntax

expression .SubAddress

expression A variable that represents a Hyperlink object.

Return Value

String

Example

This example sets shape one on slide one in the active presentation to jump to the slide named "Last Quarter" in Latest Figures.ppt when the shape is clicked during a slide show.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(1) _

        .ActionSettings(ppMouseClick)

    .Action = ppActionHyperlink

    With .Hyperlink

        .Address = "c:\sales\latest figures.ppt"

        .SubAddress = "last quarter"

    End With

End With

This example sets shape one on slide one in the active presentation to jump to range A1:B10 in Latest.xls when the shape is clicked during a slide show.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(1) _

        .ActionSettings(ppMouseClick)

    .Action = ppActionHyperlink

    With .Hyperlink

        .Address = "c:\sales\latest.xls"

        .SubAddress = "A1:B10"

    End With

End With

See also

Concepts

Hyperlink Object

Other resources

Hyperlink Object Members


ActionSetting.ActionVerb Property (PowerPoint)

 Copy code hover
[image]

ActionSetting.ActionVerb Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a string that contains the OLE verb that will be run when the user clicks the specified shape or passes the mouse pointer over it during a slide show. Read/write.

Syntax

expression .ActionVerb

expression A variable that represents an ActionSetting object.

Remarks

The Action property must be set to ppActionOLEVerb first for this property to affect the slide show action.

Example

This example sets shape three on slide one to be played whenever the mouse pointer passes over it during a slide show. Shape three must represent an OLE object that supports the "Play" verb.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(3) _

        .ActionSettings(ppMouseOver)

    .ActionVerb = "Play"

    .Action = ppActionOLEVerb

End With

See also

Concepts

ActionSetting Object

Other resources

ActionSetting Object Members


DataLabel.AutoText Property (PowerPoint)

 Copy code hover
[image]

DataLabel.AutoText Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if the object automatically generates appropriate text based on context. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .AutoText

expression A variable that represents a DataLabel object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the data labels for series one of the first chart in the active document to automatically generate appropriate text.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1). _

            DataLabels.AutoText = True

    End If

End With

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


Series Members (PowerPoint)

 Copy code hover
[image]

Series Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a series in a chart.

Methods

Name | Description
ApplyDataLabels | Applies data labels to a series.
ClearFormats | Clears the formatting of the object.
Copy | If the series has a picture fill, copies the picture to the Clipboard.
DataLabels | Returns an object that represents either a single data label (a DataLabel object) or a collection of all the data labels for the series (a DataLabels collection).
Delete | Deletes the object.
ErrorBar | Applies error bars to the series.
Paste | Pastes a picture from the Clipboard as the marker on the selected series.
Points | Returns a collection of all the points in the series.
Select | Selects the object.
Trendlines | Returns a collection of all the trendlines for the series.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
ApplyPictToEnd | True if a picture is applied to the end of the point or all points in the series. Read/write Boolean.
ApplyPictToFront | True if a picture is applied to the front of the point or all points in the series. Read/write Boolean.
ApplyPictToSides | True if a picture is applied to the sides of the point or all points in the series. Read/write Boolean.
AxisGroup | Returns the type of axis group. Read/write XlAxisGroup.
BarShape | Returns or sets the shape used for a single series in a 3-D bar or column chart. Read/write XlBarShape.
BubbleSizes | Returns or sets a string that refers to the worksheet cells that contain the x-value, y-value, and size data for the bubble chart. Read/write Variant.
ChartType | Returns or sets the chart type. Read/write XlChartType.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
ErrorBars | Returns the error bars for the series. Read-only ErrorBars.
Explosion | Returns or sets the explosion value for a pie-chart or doughnut-chart slice. Read/write Long.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Formula | Returns or sets the object's formula in A1-style notation and in the language of the macro. Read/write String.
FormulaLocal | Returns or sets the formula for the object, using A1-style references in the language of the user. Read/write String.
FormulaR1C1 | Returns or sets the formula for the object, using R1C1-style notation in the language of the macro. Read/write String.
FormulaR1C1Local | Returns or sets the formula for the object, using R1C1-style notation in the language of the user. Read/write String.
Has3DEffect | True if the series has a three-dimensional appearance. Read/write Boolean.
HasDataLabels | True if the series has data labels. Read/write Boolean.
HasErrorBars | True if the series has error bars. Read/write Boolean.
HasLeaderLines | True if the series has leader lines. Read/write Boolean.
InvertColor | Returns or sets the fill color for negative data points in a series. Read/write.
InvertColorIndex | Returns or sets the fill color for negative data points in a series. Read/write.
InvertIfNegative | True if Microsoft Word inverts the pattern in the object when it corresponds to a negative number. Read/write Variant.
IsFiltered | Returns or sets a Boolean that determines whether the specified chart series is filtered out from the chart. Read-write.
LeaderLines | Returns the leader lines for the series. Read-only LeaderLines.
MarkerBackgroundColor | Sets the marker background color as an RGB value or returns the corresponding color index value. Read/write Long.
MarkerBackgroundColorIndex | Returns or sets the marker background color as an index into the current color palette, or as one of the following XlColorIndex constants: xlColorIndexAutomatic or xlColorIndexNone. Read/write Long.
MarkerForegroundColor | Sets the marker foreground color as an RGB value or returns the corresponding color index value. Read/write Long.
MarkerForegroundColorIndex | Returns or sets the marker foreground color as an index into the current color palette, or as one of the following XlColorIndex constants: xlColorIndexAutomatic or xlColorIndexNone. Read/write Long.
MarkerSize | Returns or sets the data-marker size, in points. Read/write Long.
MarkerStyle | Returns or sets the marker style for a point or series in a line chart, scatter chart, or radar chart. Read/write XlMarkerStyle.
Name | Returns or sets the name of the object. Read/write String.
Parent | Returns the parent for the specified object. Read-only Object.
PictureType | Returns or sets a value that specifies how pictures are displayed on a column or bar picture chart. Read/write XlChartPictureType.
PictureUnit2 | Returns or sets the unit for each picture on the chart if the PictureType property is set to xlStackScale; otherwise, this property is ignored. Read/write Double.
PlotColorIndex | Returns an index value that is used internally to associate series formatting with chart elements. Read-only.
PlotOrder | Returns or sets the plot order for the selected series within the chart group. Read/write Long.
Shadow | Returns or sets a value that indicates whether the object has a shadow. Read/write Boolean.
Smooth | True if curve smoothing is enabled for the line chart or scatter chart. Read/write Boolean.
Type | Returns or sets the series type. Read/write Long.
Values | Returns or sets a collection of all the values in the series. Read/write Variant.
XValues | Returns or sets an array of x values for a chart series. Read/write Variant.


CalloutFormat.Gap Property (PowerPoint)

 Copy code hover
[image]

CalloutFormat.Gap Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the horizontal distance (in points) between the end of the callout line and the text bounding box. Read/write.

Syntax

expression .Gap

expression A variable that represents a CalloutFormat object.

Return Value

Single

Example

This example sets the distance between the callout line and the text bounding box to 3 points for shape one on myDocument. For the example to work, shape one must be a callout.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes(1).Callout.Gap = 3

See also

Concepts

CalloutFormat Object

Other resources

CalloutFormat Object Members


PpFixedFormatType Enumeration (PowerPoint)

 Copy code hover
[image]

PpFixedFormatType Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Constants that specify the type of fixed-format file to export, passed to the ExportAsFixedFormat method of the Presentation object.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppFixedFormatTypePDF | 2 | PDF format
ppFixedFormatTypeXPS | 1 | XPS format


SlideShowTransition.Duration Property (PowerPoint)

 Copy code hover
[image]

SlideShowTransition.Duration Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the length of an animation in seconds. Read/write.

Syntax

expression .Duration

expression A variable that represents a Timing object.

Return Value

Single

Example

The following example adds a shape and an animation to that shape, then sets its animation duration.

VBA Copy code Copy code
Sub AddShapeSetTiming()

    Dim effDiamond As Effect

    Dim shpRectangle As Shape

    'Adds shape and sets animation effect

    Set shpRectangle = ActivePresentation.Slides(1).Shapes _

        .AddShape(Type:=msoShapeRectangle, Left:=100, _

        Top:=100, Width:=50, Height:=50)

    Set effDiamond = ActivePresentation.Slides(1).TimeLine.MainSequence _

       .AddEffect(Shape:=sh, effectId:=msoAnimEffectPathDiamond)

    'Sets duration of effect

    effDiamond.Timing.Duration = 5

End Sub

See also

Concepts

Timing Object
SlideShowTransition Object

Other resources

Timing Object Members
SlideShowTransition Object Members


ScaleEffect.Application Property (PowerPoint)

 Copy code hover
[image]

ScaleEffect.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a ScaleEffect object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

ScaleEffect Object

Other resources

ScaleEffect Object Members


TextStyle Properties (PowerPoint)

 Copy code hover
[image]

TextStyle Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Levels | Returns a TextStyleLevels object that represents outline text formatting. Read-only.
Parent | Returns the parent object for the specified object.
Ruler | Returns a Ruler object that represents the ruler for the specified text. Read-only.
TextFrame | Returns a TextFrame object that contains the alignment and anchoring properties for the specified shape or master text style.


Borders Properties (PowerPoint)

 Copy code hover
[image]

Borders Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


ThreeDFormat Methods (PowerPoint)

 Copy code hover
[image]

ThreeDFormat Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
IncrementRotationHorizontal | Rotates the ThreeDFormat object along the horizontal axis by the specified number of degrees.
IncrementRotationVertical | Rotates the ThreeDFormat object along the vertical axis by the specified number of degrees.
IncrementRotationX | Changes the rotation of the specified shape around the x-axis by the specified number of degrees.
IncrementRotationY | Changes the rotation of the specified shape around the y-axis by the specified number of degrees.
IncrementRotationZ | Rotates the ThreeDFormat object around the ground plane by the specified number of degrees.
ResetRotation | Resets the extrusion rotation around the x-axis and the y-axis to 0 (zero) so that the front of the extrusion faces forward. This method doesn't reset the rotation around the z-axis.
SetExtrusionDirection | Sets the direction that the extrusion's sweep path takes away from the extruded shape.
SetPresetCamera | Specifies the effects camera type and rotation to use for the specified ThreeDFormat object.
SetThreeDFormat | Sets the preset extrusion format.


MediaBookmarks.Count Property (PowerPoint)

 Copy code hover
[image]

MediaBookmarks.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of bookmarks. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Count

expression A variable that represents a MediaBookmarks object.

Remarks

Start and end points are implicit bookmarks, but they should not be part of the MediaBookmarks collection.

See also

Concepts

MediaBookmarks Object

Other resources

MediaBookmarks Object Members


TextEffectFormat.ToggleVerticalText Method (PowerPoint)

 Copy code hover
[image]

TextEffectFormat.ToggleVerticalText Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Switches the text flow in the specified WordArt from horizontal to vertical, or vice versa.

Syntax

expression .ToggleVerticalText

expression A variable that represents a TextEffectFormat object.

Remarks

Using the ToggleVerticalText method swaps the values of the Width and Height properties of the Shape object that represents the WordArt and leaves the Left and Top properties unchanged.

The Flip method and Rotation property of the Shape object and the RotatedChars property and ToggleVerticalText method of the TextEffectFormat object all affect the character orientation and the direction of text flow in a Shape object that represents WordArt. You may have to experiment to find out how to combine the effects of these properties and methods to get the result you want.

Example

This example adds WordArt that contains the text "Test" to myDocument, and switches from horizontal text flow (the default for the specified WordArt style, msoTextEffect1) to vertical text flow.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

Set newWordArt = myDocument.Shapes.AddTextEffect _

    (PresetTextEffect:=msoTextEffect1, Text:="Test", _

    FontName:="Arial Black", FontSize:=36, _

    FontBold:=False, FontItalic:=False, Left:=100, Top:=100)

newWordArt.TextEffect.ToggleVerticalText

See also

Concepts

TextEffectFormat Object

Other resources

TextEffectFormat Object Members


MediaFormat.FadeOutDuration Property (PowerPoint)

 Copy code hover
[image]

MediaFormat.FadeOutDuration Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Gets or sets the duration of the fadeout of the media, in milliseconds. Read/write.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .FadeOutDuration

expression An expression that returns a MediaFormat object.

Return Value

Long

See also

Concepts

MediaFormat Object

Other resources

MediaFormat Object Members


HiLoLines.Select Method (PowerPoint)

 Copy code hover
[image]

HiLoLines.Select Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Selects the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Select

expression A variable that represents a HiLoLines object.

See also

Concepts

HiLoLines Object

Other resources

HiLoLines Object Members


PrintRange Members (PowerPoint)

 Copy code hover
[image]

PrintRange Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a single range of consecutive slides or pages to be printed.

Methods

Name | Description
Delete | Deletes the specified PrintRange object.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
End | Returns the number of the last slide in the specified print range. Read-only.
Parent | Returns the parent object for the specified object.
Start | Returns the number of the first slide in the range of slides to be printed. Read-only.


LegendEntries Properties (PowerPoint)

 Copy code hover
[image]

LegendEntries Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Count | Returns the number of objects in the collection. Read-only Long.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Parent | Returns the parent for the specified object. Read-only Object.


Axis.MinorGridlines Property (PowerPoint)

 Copy code hover
[image]

Axis.MinorGridlines Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the minor gridlines for the specified axis. Read-only Gridlines.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .MinorGridlines

expression A variable that represents an Axis object.

Remarks

Only axes in the primary axis group can have gridlines.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the color of the minor gridlines for the value axis of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.Axes(xlValue)

            If .HasMinorGridlines Then

                ' Set the color to blue.

                .MinorGridlines.Border.ColorIndex = 5

            End If

        End With

    End If

End With

See also

Concepts

Axis Object

Other resources

Axis Object Members


TextFrame Properties (PowerPoint)

 Copy code hover
[image]

TextFrame Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
AutoSize | Returns or sets a value that indicates whether the size of the specified shape is changed automatically to fit text within its boundaries. Read/write.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
HasText | Returns whether the specified shape has text associated with it. Read-only.
HorizontalAnchor | Returns or sets the horizontal alignment of text in a text frame. Read/write.
MarginBottom | Returns or sets the distance (in points) between the bottom of the text frame and the bottom of the inscribed rectangle of the shape that contains the text. Read/write.
MarginLeft | Returns or sets the distance (in points) between the left edge of the text frame and the left edge of the inscribed rectangle of the shape that contains the text. Read/write.
MarginRight | Returns or sets the distance (in points) between the right edge of the text frame and the right edge of the inscribed rectangle of the shape that contains the text. Read/write.
MarginTop | Returns or sets the distance (in points) between the top of the text frame and the top of the inscribed rectangle of the shape that contains the text. Read/write.
Orientation | Returns or sets text orientation. Read/write.
Parent | Returns the parent object for the specified object.
Ruler | Returns a Ruler object that represents the ruler for the specified text. Read-only.
TextRange | Returns a TextRange object that represents the text in the specified text frame. Read-only.
VerticalAnchor | Returns or sets the vertical alignment of text in a text frame. Read/write.
WordWrap | Determines whether lines break automatically to fit inside the shape. Read/write.


LegendKey.Height Property (PowerPoint)

 Copy code hover
[image]

LegendKey.Height Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the height, in points, of the object. Read-only Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Height

expression A variable that represents a LegendKey object.

See also

Concepts

LegendKey Object

Other resources

LegendKey Object Members


Slides Methods (PowerPoint)

 Copy code hover
[image]

Slides Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
AddSlide | Creates a new slide, adds it to the Slides collection, and returns the slide.
FindBySlideID | Returns a Slide object that represents the slide with the specified slide ID number. Each slide is automatically assigned a unique slide ID number when it is created. Use the SlideID property to return a slide's ID number.
InsertFromFile | Inserts slides from a file into a presentation, at the specified location. Returns an Integer that represents the number of slides inserted.
Item | Returns a single Slide object from the specified Slides collection.
Paste | Pastes the slides on the Clipboard into the Slides collection for the presentation. Specify where you want to insert the slides with the Index argument. Returns a SlideRange object that represents the pasted objects. Each pasted slide becomes a member of the specified Slides collection.
Range | Returns a SlideRange object that represents a subset of the slides in a Slides collection.


ChartTitle.Parent Property (PowerPoint)

 Copy code hover
[image]

ChartTitle.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent for the specified object. Read-only Object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Parent

expression A variable that represents a ChartTitle object.

See also

Concepts

ChartTitle Object

Other resources

ChartTitle Object Members


Axis.MaximumScaleIsAuto Property (PowerPoint)

 Copy code hover
[image]

Axis.MaximumScaleIsAuto Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if Microsoft Word calculates the maximum value for the value axis. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .MaximumScaleIsAuto

expression A variable that represents an Axis object.

Remarks

Setting the MaximumScale property sets this property to False.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example automatically calculates the minimum scale and the maximum scale for the value axis of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.Axes(xlValue)

            .MinimumScaleIsAuto = True

            .MaximumScaleIsAuto = True

        End With

    End If

End With

See also

Concepts

Axis Object

Other resources

Axis Object Members


CustomerData.Add Method (PowerPoint)

 Copy code hover
[image]

CustomerData.Add Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Adds a CustomXMLPart to the CustomerData collection of a CustomLayout, Master, Presentation, Shape, or Slide object and returns the CustomXMLPart object created.

Syntax

expression .Add

expression An expression that returns a CustomerData object.

Return Value

CustomXMLPart

Remarks

You can add one or more items of customer data (custom XML parts) to any of the objects listed above that can contain customer data.

Example

VBA Copy code Copy code
Public Sub Add_Example()

    Dim pptSlide As Slide
    Set pptSlide = ActivePresentation.Slides(1)

    Dim pptShape As Shape
    For Each pptShape In pptSlide.Shapes

        ' Get the CustomerData collection of the shape
        Dim pptCustomerData As customerData
        Set pptCustomerData = pptShape.customerData

        ' Add a new CustomXMLPart object to the CustomerData collection for this shape
        Dim pptCustomXMLPart As CustomXMLPart
        Set pptCustomXMLPart = pptCustomerData.Add

        ' Add data to the CustomXMLPart
        pptCustomXMLPart.LoadXML ("<ShapeData><DataItem>This has to be valid XML</DataItem></ShapeData>")

        ' Print the ID (a GUID) of the CustomXMLPart
        Debug.Print (pptCustomXMLPart.Id)

    Next

End Sub

See also

Concepts

CustomerData Collection

Other resources

CustomerData Object Members


Presentation.GetWorkflowTemplates Method (PowerPoint)

 Copy code hover
[image]

Presentation.GetWorkflowTemplates Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the Microsoft Office WorkflowTemplates collection.

Syntax

expression .GetWorkflowTemplates

expression An expression that returns a Presentation object.

Return Value

WorkFlowTemplates

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


Coauthoring Methods (PowerPoint)

 Copy code hover
[image]

Coauthoring Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
EndReview | Terminates merge mode and ends the review.


ThemeVariant Members (PowerPoint)

 Copy code hover
[image]

ThemeVariant Members (PowerPoint)
Send feedback

Represents a variation (set of colors and fonts) in a theme.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Height | Returns the height of the theme variation. Read-only.
Id | Returns a string that represents the ID of the theme variation. Read-only.
Name | Returns the name of the theme variation. Read-only.
Parent | Returns the parent for the specified object. Read-only Object.
Width | Returns the height of the theme variation. Read-only.


Application.SlideShowBegin Event (PowerPoint)

 Copy code hover
[image]

Application.SlideShowBegin Event (PowerPoint)
See also Send feedback

Published: July 16, 2012

Occurs when you start a slide show.

Syntax

expression .SlideShowBegin(Wn)

expression A variable that represents an Application object.

Parameters

Name | Required/Optional | Data Type | Description
Wn | Required | SlideShowWindow | The slide show window initialized prior to this event.

Remarks

Microsoft PowerPoint creates the slide show window and passes it to this event. If one slide show branches to another, the SlideShowBegin event does not occur again when the second slide show begins.

For information about using events with the Application object, see How to: Use Events with the Application Object.

Example

This example adjusts the size and position of the slide show window and then reactivates it.

VBA Copy code Copy code
Private Sub App_SlideShowBegin(ByVal Wn As SlideShowWindow)

    With Wn

        .Height = 325

        .Width = 400

        .Left = 100

        .Activate

    End With

End Sub

See also

Concepts

Application Object

Other resources

Application Object Members


ShapeRange.Group Method (PowerPoint)

 Copy code hover
[image]

ShapeRange.Group Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Groups the shapes in the specified range. Returns the grouped shapes as a single Shape object.

Syntax

expression .Group

expression A variable that represents a ShapeRange object.

Return Value

Shape

Remarks

Because a group of shapes is treated as a single shape, grouping and ungrouping shapes changes the number of items in the Shapes collection and changes the index numbers of items that come after the affected items in the collection.

Example

This example adds two shapes to myDocument, groups the two new shapes, sets the fill for the group, rotates the group, and sends the group to the back of the drawing layer.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    .AddShape(msoShapeCan, 50, 10, 100, 200).Name = "shpOne"

    .AddShape(msoShapeCube, 150, 250, 100, 200).Name = "shpTwo"

    With .Range(Array("shpOne", "shpTwo")).Group

        .Fill.PresetTextured msoTextureBlueTissuePaper

        .Rotation = 45

        .ZOrder msoSendToBack

    End With

End With

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


Row Properties (PowerPoint)

 Copy code hover
[image]

Row Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Cells | Returns a CellRange collection that represents the cells in a table column or row. Read-only.
Height | Returns or sets the height of the specified object, in points. Read/write.
Parent | Returns the parent object for the specified object.


PlotArea Properties (PowerPoint)

 Copy code hover
[image]

PlotArea Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Height | Returns or sets the height, in points, of the object. Read/write Double.
InsideHeight | Returns or sets the inside height, in points, of the plot area. Read/write Double.
InsideLeft | Returns or sets the distance, in points, from the chart edge to the inside left edge of the plot area. Read/write Double.
InsideTop | Returns or sets the distance, in points, from the chart edge to the inside top edge of the plot area. Read/write Double.
InsideWidth | Returns or sets the inside width, in points, of the plot area. Read/write Double.
Left | Returns or sets the distance, in points, from the left edge of the object to the left edge of the chart area. Read/write Double.
Name | Returns the name of the object. Read-only String.
Parent | Returns the parent for the specified object. Read-only Object.
Position | Returns or sets the position of the plot area on the chart. Read/write XlChartElementPosition.
Top | Returns or sets the distance, in points, from the top edge of the object to the top of the first row (on a worksheet) or the top of the chart area (on a chart). Read/write Double.
Width | Returns or sets the width, in points, of the object. Read/write Double.


PlaySettings Members (PowerPoint)

 Copy code hover
[image]

PlaySettings Members (PowerPoint)
Send feedback

Published: July 16, 2012

Contains information about how the specified media clip will be played during a slide show.

Properties

Name | Description
ActionVerb | Returns or sets a string that contains the OLE verb that will be run when the specified OLE object is animated during a slide show. Read/write.
Application | Returns an Application object that represents the creator of the specified object.
HideWhileNotPlaying | Determines whether the specified media clip is hidden during a slide show except when it is playing. Read/write.
LoopUntilStopped | Determines whether the specified movie or sound loops continuously until either the next movie or sound starts, the user clicks the slide, or a slide transition occurs. Read/write.
Parent | Returns the parent object for the specified object.
PauseAnimation | Determines whether the slide show pauses until the specified media clip is finished playing. Read/write.
PlayOnEntry | Determines whether the specified movie or sound is played automatically when it is animated. Read/write.
RewindMovie | Determines whether the first frame of the specified movie is automatically redisplayed as soon as the movie has finished playing. Read/write.
StopAfterSlides | Returns or sets the number of slides to be displayed before the media clip stops playing. Read/write.


Axis.CategoryNames Property (PowerPoint)

 Copy code hover
[image]

Axis.CategoryNames Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets all the category names as a text array for the specified axis. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .CategoryNames

expression A variable that represents an Axis object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example uses an array to set individual category names for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.Axes(xlCategory).CategoryNames = _

            Array ("1985", "1986", "1987", "1988", "1989")

    End If

End With

See also

Concepts

Axis Object

Other resources

Axis Object Members


PrintOptions Properties (PowerPoint)

 Copy code hover
[image]

PrintOptions Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
ActivePrinter | Returns the name of the active printer. Read-only.
Application | Returns an Application object that represents the creator of the specified object.
Collate | Determines whether a complete copy of the specified presentation is printed before the first page of the next copy is printed. Read/write.
FitToPage | Determines whether the slides will be scaled to fill the page they're printed on. Read/write.
FrameSlides | Determines whether a thin frame is placed around the border of the printed slides. Read/write.
HandoutOrder | Returns or sets the page layout order in which slides appear on printed handouts that show multiple slides on one page. Read/write.
HighQuality | Indicates whether to print in high quality. Read/write.
NumberOfCopies | Returns or sets the number of copies of a presentation to be printed. Read/write.
OutputType | Returns or sets a value that indicates which component (slides, handouts, notes pages, or an outline) of the presentation is to be printed. Read/write.
Parent | Returns the parent object for the specified object.
PrintColorType | Returns or sets the way the specified document will be printed: in black and white, in pure black and white (also referred to as high contrast), or in color. Read/write.
PrintComments | Sets or returns whether comments will be printed. Read/write.
PrintFontsAsGraphics | Determines whether TrueType fonts are printed as graphics. Read/write.
PrintHiddenSlides | Determines whether hidden slides in the specified presentation will be printed. Read/write.
PrintInBackground | Determines whether the specified presentation is printed in the background. Read/write.
Ranges | Returns the PrintRanges object, which represents the ranges of slides in the presentation to be printed. Read-only.
RangeType | Returns or sets the type of print range for the presentation. Read/write.
sectionIndex | Returns the index of the selected section in the PrintOptions object. Read/write.
SlideShowName | Returns or sets the name of the custom slide show to print. Read/write .


Chart.DepthPercent Property (PowerPoint)

 Copy code hover
[image]

Chart.DepthPercent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the depth of a 3-D chart as a percentage of the chart width (between 20 and 2000 percent). Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .DepthPercent

expression A variable that represents a Chart object.

Remarks

This property applies only to 3-D charts.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the depth of the first chart in the active document to be 50 percent of its width. You should run this example on a 3-D chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        Chart.DepthPercent = 50

    End If

End With

See also

Concepts

Chart Object

Other resources

Chart Object Members


CalloutFormat.AutomaticLength Method (PowerPoint)

 Copy code hover
[image]

CalloutFormat.AutomaticLength Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Specifies that the first segment of the callout line (the segment attached to the text callout box) be scaled automatically when the callout is moved. Use the CustomLength method to specify that the first segment of the callout line retain the fixed length returned by the Length property whenever the callout is moved. Applies only to callouts whose lines consist of more than one segment (types msoCalloutThree and msoCalloutFour).

Syntax

expression .AutomaticLength

expression A variable that represents a CalloutFormat object.

Remarks

Applying this method sets the AutoLength property to True.

Example

This example switches between an automatically scaling first segment and one with a fixed length for the callout line for shape one on myDocument. For the example to work, shape one must be a callout.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(1).Callout

    If .AutoLength Then

        .CustomLength 50

    Else

        .AutomaticLength

    End If

End With

See also

Concepts

CalloutFormat Object

Other resources

CalloutFormat Object Members


Chart.SetSourceData Method (PowerPoint)

 Copy code hover
[image]

Chart.SetSourceData Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets the source data range for the chart.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .SetSourceData(Source, PlotBy)

expression A variable that represents a Chart object.

Parameters

Name | Required/Optional | Data Type | Description
Source | Required | String | The address of the chart data range that contains the source data.
PlotBy | Optional | Variant | Specifies the way the data will be plotted. Can be either of the following XlRowCol constants: xlColumns or xlRows.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the source data range for the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SetSourceData _

            Source:="='Sheet1'!$A$1:$D$5", _

            PlotBy:=xlColumns

    End If

End With

See also

Concepts

Chart Object

Other resources

Chart Object Members


Selection.HasChildShapeRange Property (PowerPoint)

 Copy code hover
[image]

Selection.HasChildShapeRange Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if the selection contains child shapes. Read-only.

Syntax

expression .HasChildShapeRange

expression A variable that represents a ParagraphFormat object.

Return Value

Boolean

Example

This example creates a new slide with a drawing canvas, populates the drawing canvas with shapes, and selects the shapes added to the canvas. Then after checking that the shapes selected are child shapes, it fills the child shapes with a pattern.

VBA Copy code Copy code
Sub ChildShapes()

    Dim sldNew As Slide

    Dim shpCanvas As Shape

    'Create a new slide with a drawing canvas and shapes

    Set sldNew = Presentations(1).Slides _

        .Add(Index:=1, Layout:=ppLayoutBlank)

    Set shpCanvas = sldNew.Shapes.AddCanvas( _

        Left:=100, Top:=100, Width:=200, Height:=200)

    With shpCanvas.CanvasItems

        .AddShape msoShapeRectangle, Left:=0, Top:=0, _

            Width:=100, Height:=100

        .AddShape msoShapeOval, Left:=0, Top:=50, _

            Width:=100, Height:=100

        .AddShape msoShapeDiamond, Left:=0, Top:=100, _

            Width:=100, Height:=100

    End With

    'Select all shapes in the canvas

    shpCanvas.CanvasItems.SelectAll

    'Fill canvas child shapes with a pattern

    With ActiveWindow.Selection

        If .HasChildShapeRange = True Then

            .ChildShapeRange.Fill.Patterned Pattern:=msoPatternDivot

        Else

            MsgBox "This is not a range of child shapes."

        End If

    End With

End Sub

See also

Concepts

Selection Object

Other resources

Selection Object Members


Theme.ThemeVariants Property (PowerPoint)

 Copy code hover
[image]

Theme.ThemeVariants Property (PowerPoint)
Send feedback

Returns a ThemeVariants collection that represents the variations in the theme.

Version information

Version Added: PowerPoint 2013

Syntax

expression .ThemeVariants

expression A variable that represents a Theme object.

Example

The following code example gets a reference to the currently active theme and then iterates over each theme variation in the theme.

VBA Copy code Copy code
Sub IterateThemeVariants()

    Dim pptTheme As Theme
    Dim pptThemeVariants As ThemeVariants
    Dim pptThemeVariant As ThemeVariant
    Dim path As String

    ' Get a reference to the currently active theme.
    path = "C:\Program Files (x86)\Microsoft Office\Document Themes 15\" & _
        ActivePresentation.TemplateName & ".thmx"
    Set pptTheme = Application.OpenThemeFile(path)

    ' Get a reference to all of the variations in the theme.
    Set pptThemeVariants = pptTheme.ThemeVariants

    ' Iterate over each variation of the theme and print
    ' its ID.
    For Each pptThemeVariant In pptThemeVariants

        Debug.Print "Variation id: " & pptThemeVariant.Id

    Next pptThemeVariant

End Sub

Property value

THEMEVARIANTS


Chart.ChartColor Property (PowerPoint)

 Copy code hover
[image]

Chart.ChartColor Property (PowerPoint)
Send feedback

Returns or sets an integer that represents the color scheme for the chart. Read-write.

Version information

Version Added: PowerPoint 2013

Syntax

expression .ChartColor

expression A variable that represents a Chart object.

Remarks

Chart color schemes are numbered from 1 to 17; the setting of this property corresponds to the color schemes shown on the Change Colors gallery on the Chart Tools Design ribbon tab.

Property value

VARIANT


PpArrangeStyle Enumeration (PowerPoint)

 Copy code hover
[image]

PpArrangeStyle Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies whether to cascade or tile the windows.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppArrangeCascade | 2 | Cascade
ppArrangeTiled | 1 | Tiled


ChartFont.Application Property (PowerPoint)

 Copy code hover
[image]

ChartFont.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Application

expression A variable that represents a ChartFont object.

See also

Concepts

ChartFont Object

Other resources

ChartFont Object Members


Gridlines Methods (PowerPoint)

 Copy code hover
[image]

Gridlines Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Delete | Deletes the object.
Select | Selects the object.


NamedSlideShows Methods (PowerPoint)

 Copy code hover
[image]

NamedSlideShows Methods (PowerPoint)
Send feedback

Published: July 12, 2012

This object has the following methods:

Methods

Name | Description
Add | Creates a new named slide show and adds it to the collection of named slide shows in the specified presentation. Returns a NamedSlideShow object that represents the new named slide show.
Item | Returns a single NamedSlideShow object from the specified NamedSlideShows collection.


MsoAnimAfterEffect Enumeration (PowerPoint)

 Copy code hover
[image]

MsoAnimAfterEffect Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Indicates whether an after effect appears dimmed, hidden, or unchanged after it runs.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
msoAnimAfterEffectDim | 1 | Dimmed
msoAnimAfterEffectHide | 2 | Hidden
msoAnimAfterEffectHideOnNextClick | 3 | Hidden on the next mouse click
msoAnimAfterEffectMixed | -1 | Mixed
msoAnimAfterEffectNone | 0 | Unchanged


Interior.Pattern Property (PowerPoint)

 Copy code hover
[image]

Interior.Pattern Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns or sets a Variant value, containing an XlPattern constant, that represents the interior pattern.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Pattern

expression A variable that represents an Interior object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example enables up and down bars, then adds a criss-cross pattern to the down bars and sets the pattern color to red, for the first chart group of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.ChartGroups(1)

            .HasUpDownBars = True

            .DownBars.Interior.Pattern = xlPatternCrissCross

            .DownBars.Interior.PatternColorIndex = 3

        End With

    End If

End With

See also

Concepts

Interior Object

Other resources

Interior Object Members


TabStops.DefaultSpacing Property (PowerPoint)

 Copy code hover
[image]

TabStops.DefaultSpacing Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the default tab-stop spacing for the specified text, in points. Read/write.

Syntax

expression .DefaultSpacing

expression A variable that represents a TabStops object.

Return Value

Single

Example

This example sets the default tab-stop spacing to 0.5 inch (36 points) for the text in shape two on slide one in the active presentation.

VBA Copy code Copy code
Application.ActivePresentation.Slides(1).Shapes(2).TextFrame _

    .Ruler.TabStops.DefaultSpacing = 36

See also

Concepts

TabStops Object

Other resources

TabStops Object Members


SectionProperties.Move Method (PowerPoint)

 Copy code hover
[image]

SectionProperties.Move Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Moves the specified section to the specified index position, moving the slides in the section along with the section break.

Syntax

expression .Move(sectionIndex, toPos)

expression A variable that represents a SectionProperties object.

Parameters

Name | Required/Optional | Data Type | Description
sectionIndex | Required | Integer | The index of the section to move.
toPos | Required | Integer | The index position to which to move the section.

Remarks

The section is moved to the index position immediately before the section whose current index is toPos.

See also

Concepts

SectionProperties Object

Other resources

SectionProperties Object Members


Master.ColorScheme Property (PowerPoint)

 Copy code hover
[image]

Master.ColorScheme Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the ColorScheme object that represents the scheme colors for the specified slide, slide range, or slide master. Read/write.

Syntax

expression .ColorScheme

expression A variable that represents a Master object.

Return Value

ColorScheme

Example

This example sets the title color to green for slides one and three in the active presentation.

VBA Copy code Copy code
Set mySlides = ActivePresentation.Slides.Range(Array(1, 3))

mySlides.ColorScheme.Colors(ppTitle).RGB = RGB(0, 255, 0)

See also

Concepts

Master Object

Other resources

Master Object Members


PrintOptions.PrintColorType Property (PowerPoint)

 Copy code hover
[image]

PrintOptions.PrintColorType Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the way the specified document will be printed: in black and white, in pure black and white (also referred to as high contrast), or in color. Read/write.

Syntax

expression .PrintColorType

expression A variable that represents a PrintOptions object.

Return Value

PpPrintColorType

Remarks

The value of the PrintColorType property can be one of these PpPrintColorType constants. The default value is set by the printer.

ppPrintBlackAndWhite

ppPrintColor

ppPrintPureBlackAndWhite

Example

This example prints the slides in the active presentation in color.

VBA Copy code Copy code
With Application.ActivePresentation

    .PrintOptions.PrintColorType = ppPrintColor

    .PrintOut

End With

See also

Concepts

PrintOptions Object

Other resources

PrintOptions Object Members


ShapeRange.PickUp Method (PowerPoint)

 Copy code hover
[image]

ShapeRange.PickUp Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Copies the formatting of the specified shape. Use the Apply method to apply the copied formatting to another shape.

Syntax

expression .PickUp

expression A variable that represents a ShapeRange object.

Example

This example copies the formatting of shape one on myDocument and then applies the copied formatting to shape two.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument

    .Shapes(1).PickUp

    .Shapes(2).Apply

End With

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


PpPrintColorType Enumeration (PowerPoint)

 Copy code hover
[image]

PpPrintColorType Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the way the specified document will be printed: in black and white, in pure black and white (also referred to as high contrast), or in color.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppPrintBlackAndWhite | 2 | Black and White
ppPrintColor | 1 | Colored
ppPrintPureBlackAndWhite | 3 | Pure Black and White


SlideShowView.GotoSlide Method (PowerPoint)

 Copy code hover
[image]

SlideShowView.GotoSlide Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Switches to the specified slide during a slide show. You can specify whether you want the animation effects to be rerun.

Syntax

expression .GotoSlide(Index, ResetSlide)

expression A variable that represents a SlideShowView object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Integer | The number of the slide to switch to.
ResetSlide | Optional | MsoTriState | Whether animation effects should be rerun when returning to the first slide. See Remarks for more information.

Remarks

The value of the ResetSlide parameter can be one of these MsoTriState constants. The default is msoTrue.

msoFalse

msoTrue

If you switch from one slide to another during a slide show with ResetSlide set to msoFalse, when you return to the first slide, its animation picks up where it left off. If you switch from one slide to another with ResetSlide set to msoTrue, when you return to the first slide, its entire animation starts over.

Example

This example switches from the current slide to the slide three in slide show window one. If you switch back to the current slide during the slide show, its entire animation will start over.

VBA Copy code Copy code
With SlideShowWindows(1).View

    .GotoSlide 3

End With

This example switches from the current slide to the slide three in slide show window one. If you switch back to the current slide during the slide show, its animation will pick up where it left off.

VBA Copy code Copy code
With SlideShowWindows(1).View

    .GotoSlide 3, msoFalse

End With

See also

Concepts

SlideShowView Object

Other resources

SlideShowView Object Members


PrintOptions.PrintFontsAsGraphics Property (PowerPoint)

 Copy code hover
[image]

PrintOptions.PrintFontsAsGraphics Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Determines whether TrueType fonts are printed as graphics. Read/write.

Syntax

expression .PrintFontsAsGraphics

expression A variable that represents a PrintOptions object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | TrueType fonts are not printed as graphics.
msoTrue | TrueType fonts are printed as graphics.

Example

This example specifies that TrueType fonts in the active presentation be printed as graphics.

VBA Copy code Copy code
ActivePresentation.PrintOptions.PrintFontsAsGraphics = msoTrue

See also

Concepts

PrintOptions Object

Other resources

PrintOptions Object Members


SlideRange Members (PowerPoint)

 Copy code hover
[image]

SlideRange Members (PowerPoint)
Send feedback

Published: July 16, 2012

A collection that represents a notes page or a slide range, which is a set of slides that can contain as little as a single slide or as much as all the slides in a presentation.

Methods

Name | Description
ApplyTemplate | Applies a design template to the specified slide range.
ApplyTemplate2 | Applies a design template and theme variant to the slide range.
ApplyTheme | Applies a theme or design template to the specified range of slides.
ApplyThemeColorScheme | Applies a color scheme to the specified range of slides.
Copy | Copies the specified object to the Clipboard.
Cut | Deletes the specified object and places it on the Clipboard.
Delete | Deletes the specified SlideRange object.
Duplicate | Creates a duplicate of the specified SlideRange object, adds the new range of slides to the Slides collection immediately after the slide range specified originally, and then returns a SlideRange object that represents the duplicate slides.
Export | Exports a range of slides, using the specified graphics filter, and saves the exported file under the specified file name.
Item | Returns a single Slide object from the specified SlideRange collection.
MoveTo | Moves the specified object to a specific location within the same collection, renumbering all other items in the collection appropriately.
MoveToSectionStart | Moves the current position to the start of the specified section in the SlideRange object.
PublishSlides | Creates a Web presentation (in HTML format) from any loaded presentation. You can view the published presentation in a Web browser.
Select | Selects the specified object.

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Background | Returns a ShapeRange object that represents the slide background.
BackgroundStyle | Sets or returns the background style of the specified object. Read/write.
ColorScheme | Returns or sets the ColorScheme object that represents the scheme colors for the specified slide, slide range, or slide master. Read/write.
Comments | Returns a Comments object that represents a collection of comments. Read-only.
Count | Returns the number of objects in the specified collection. Read-only.
CustomerData | Returns a CustomerData object. Read-only.
CustomLayout | Returns a CustomLayout object that represents the custom layout associated with the specified range of slides. Read-only.
Design | Returns a Design object representing a design.
DisplayMasterShapes | Determines whether the specified range of slides displays the background objects on the slide master. Read/write.
FollowMasterBackground | Determines whether the range of slides follows the slide master background. Read/write.
HasNotesPage | Indicates whether the selected SlideRange has media that resides on a notes page. Read-only.
HeadersFooters | Returns a HeadersFooters collection that represents the header, footer, date and time, and slide number associated with the slide, slide master, or range of slides. Read-only.
Hyperlinks | Returns a Hyperlinks collection that represents all the hyperlinks on the specified slide. Read-only.
Layout | Returns or sets a PpSlideLayout constant that represents the slide layout. Read/write.
Master | Returns a Master object that represents the slide master. Read-only.
Name | When a slide is inserted into a presentation, Microsoft PowerPoint automatically assigns it a name in the form Sliden, where n is an integer that represents the order in which the slide was created in the presentation. For example, the first slide inserted into a presentation is automatically named Slide1. If you copy a slide from one presentation to another, the slide loses the name it had in the first presentation and is automatically assigned a new name in the second presentation. A slide range must contain exactly one slide. Read/write.
NotesPage | Returns a SlideRange object that represents the notes pages for the specified slide or range of slides. Read-only.
Parent | Returns the parent object for the specified object.
PrintSteps | Returns the number of slides you'd need to print to simulate the builds on the specified slide, slide master, or range of slides. Read-only.
sectionIndex | Returns the index of the selected section in the SlideRange. Read-only.
Shapes | Returns a Shapes collection that represents all the elements that have been placed or inserted on the specified slide, slide master, or range of slides. Read-only.
SlideID | Returns a unique ID number for the specified slide. Read-only.
SlideIndex | Returns the index number of the specified slide within the Slides collection. Read-only.
SlideNumber | Returns the slide number. Read-only.
SlideShowTransition | Returns a SlideShowTransition object that represents the special effects for the specified slide transition. Read-only.
Tags | Returns a Tags object that represents the tags for the specified object. Read-only.
ThemeColorScheme | Returns a ThemeColorScheme object that represents the color scheme associated with the specified range of slides. Read-only.
TimeLine | Returns a TimeLine object that represents the animation timeline for the slide. Read-only.


Chart Methods (PowerPoint)

 Copy code hover
[image]

Chart Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
ApplyChartTemplate | Applies a standard or custom chart type to a chart.
ApplyDataLabels | Applies data labels to all the series in a chart.
ApplyLayout | Applies the layouts shown in the Ribbon.
Axes | Returns a collection of axes on the chart.
ChartGroups | Returns an object that represents either a single chart group or a collection of all the chart groups in the chart.
ChartWizard | Modifies the properties of the given chart. You can use this method to quickly format a chart without setting all the individual properties. This method is noninteractive, and it changes only the specified properties.
ClearToMatchColorStyle | Clears all colors on the specified chart that do not follow the color style applied to the chart.
ClearToMatchStyle | Clears the chart elements formatting to automatic.
Copy | Not supported for this object.
CopyPicture | Copies the selected object to the Clipboard as a picture.
Delete | Deletes the object.
Export | Exports the chart in a graphic format.
FullSeriesCollection | Returns the collection of all the series in the specified chart, or the specified series.
GetChartElement | Returns information about the chart element at the specified x-coordinate and y-coordinate.
Paste | Pastes chart data from the Clipboard into the chart.
Refresh | Causes the specified chart to be redrawn immediately.
SaveChartTemplate | Saves a custom chart template to the list of available chart templates.
Select | Selects the object.
SeriesCollection | Returns all the series in the chart.
SetBackgroundPicture | Sets the background graphic for a chart.
SetDefaultChart | Specifies the name of the chart template that Microsoft Word uses when it creates new charts.
SetElement | Sets chart elements on a chart. Read/write MsoChartElementType.
SetSourceData | Sets the source data range for the chart.


ChartBorder.Creator Property (PowerPoint)

 Copy code hover
[image]

ChartBorder.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents a ChartBorder object.

See also

Concepts

ChartBorder Object

Other resources

ChartBorder Object Members


CellRange Object (PowerPoint)

 Copy code hover
[image]

CellRange Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

A collection of Cell objects in a table column or row. The CellRange collection represents all the cells in the specified column or row. To use the CellRange collection, use the Cells keyword.

Remarks

Although the collection object is named CellRange and is shown in the Object Browser, this keyword is not used in programming the PowerPoint object model. The keyword Cells is used instead.

You cannot programmatically add cells to or delete cells from a PowerPoint table. Use the AddTable method with the Table object to add a new table. Use the Add method of the Columns or Rows collections to add a column or row to a table. Use the Delete method of the Columns or Rows collections to delete a column or row from a table.

Example

Use the Cells property to return the CellRange collection. This example sets the right border for the cells in the first column of the table to a dashed line style.

VBA Copy code Copy code
With ActivePresentation.Slides(2).Shapes(5).Table.Columns(1).Cells

    .Borders(ppBorderRight).DashStyle = msoLineDash

End With

This example returns the number of cells in row one of the selected table.

VBA Copy code Copy code
num = ActiveWindow.Selection.ShapeRange.Table.Rows(1).Cells.Count

Use Cell(row, column), where row is the row number and column is the column number, or Cells(index), where index is the number of the cell in the specified row or column, to return a single Cell object. Cells are numbered from left to right in rows and from top to bottom in columns. With right-to-left language settings, this scheme is reversed. The example below merges the first two cells in row one of the table in shape five on slide two.

VBA Copy code Copy code
With ActivePresentation.Slides(2).Shapes(5).Table

    .Cell(1, 1).Merge MergeTo:=.Cell(1, 2)

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

CellRange Object Members


SetEffect.Application Property (PowerPoint)

 Copy code hover
[image]

SetEffect.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a SetEffect object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

SetEffect Object

Other resources

SetEffect Object Members


Slides.Range Method (PowerPoint)

 Copy code hover
[image]

Slides.Range Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a SlideRange object that represents a subset of the slides in a Slides collection.

Syntax

expression .Range(Index)

expression A variable that represents a Slides object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Optional | Variant | The individual slides that are to be included in the range. Can be an Integer that specifies the index number of the slide, a String that specifies the name of the slide, or an array that contains either integers or strings. If this argument is omitted, the Range method returns all the objects in the specified collection.

Return Value

SlideRange

Remarks

Although you can use the Range method to return any number of shapes or slides, it is simpler to use the Item method if you only want to return a single member of the collection. For example, Shapes(1) is simpler than Shapes.Range(1), and Slides(2) is simpler than Slides.Range(2).

To specify an array of integers or strings for Index, you can use the Array function. For example, the following instruction returns two shapes specified by name.

Dim myArray() As Variant, myRange As Object myArray = Array("Oval 4", "Rectangle 5") Set myRange = ActivePresentation.Slides(1).Shapes.Range(myArray)

Example

This example sets the title color for slides one and three.

VBA Copy code Copy code
Set mySlides = ActivePresentation.Slides.Range(Array(1, 3))

mySlides.ColorScheme.Colors(ppTitle).RGB = RGB(0, 255, 0)

This example sets the title color for the slides named Slide6 and Slide8.

VBA Copy code Copy code
Set mySlides = ActivePresentation.Slides _

    .Range(Array("Slide6", "Slide8"))

mySlides.ColorScheme.Colors(ppTitle).RGB = RGB(0, 255, 0)

This example sets the title color for all the slides in the active presentation.

VBA Copy code Copy code
Set mySlides = ActivePresentation.Slides.Range

mySlides.ColorScheme.Colors(ppTitle).RGB = RGB(255, 0, 0)

This example creates an array that contains all the title slides in the active presentation, uses that array to define a slide range, and then sets the title color for all slides in that range.

VBA Copy code Copy code
Dim MyTitleArray() As Long

Set pSlides = ActivePresentation.Slides

ReDim MyTitleArray(1 To pSlides.Count)

For Each pSlide In pSlides

    If pSlide.Layout = ppLayoutTitle Then

        nCounter = nCounter + 1

        MyTitleArray(nCounter) = pSlide.SlideIndex

    End If

Next pSlide

ReDim Preserve MyTitleArray(1 To nCounter)

Set rngTitleSlides = ActivePresentation.Slides.Range(MyTitleArray)

rngTitleSlides.ColorScheme.Colors(ppTitle).RGB = RGB(255, 123, 99)

See also

Concepts

Slides Object

Other resources

Slides Object Members


Sequence.Item Method (PowerPoint)

 Copy code hover
[image]

Sequence.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a single Effect object from the specified Sequence collection.

Syntax

expression .Item(Index)

expression A variable that represents a Sequence object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Long | The index number of the single Effect object in the collection to be returned.

Return Value

Effect

See also

Concepts

Sequence Object

Other resources

Sequence Object Members


Table.Rows Property (PowerPoint)

 Copy code hover
[image]

Table.Rows Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Rows collection that represents all the rows in a table. Read-only.

Syntax

expression .Rows

expression A variable that represents a Table object.

Return Value

Rows

Remarks

For information about returning a single member of a collection, see Returning an Object from a Collection.

Example

This example deletes the third row from the table in shape five of slide two in the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(2).Shapes(5).Table.Rows(3).Delete

This example applies a dashed line style to the bottom border of the second row of table cells.

VBA Copy code Copy code
ActiveWindow.Selection.ShapeRange.Table.Rows(2) _

    .Cells.Borders(ppBorderBottom).DashStyle = msoLineDash

See also

Concepts

Table Object

Other resources

Table Object Members


TextStyle.TextFrame Property (PowerPoint)

 Copy code hover
[image]

TextStyle.TextFrame Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a TextFrame object that contains the alignment and anchoring properties for the specified shape or master text style.

Syntax

expression .TextFrame

expression A variable that represents a TextStyle object.

Return Value

TextFrame

Remarks

Use the TextRange property of the TextFrame object to return the text in the text frame.

Use the HasTextFrame property to determine whether a shape contains a text frame before you apply the TextFrame property.

Example

This example adds a rectangle to myDocument, adds text to the rectangle, and sets the top margin for the text frame.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes _

        .AddShape(msoShapeRectangle, 180, 175, 350, 140).TextFrame

    .TextRange.Text = "Here is some test text"

    .MarginTop = 10

End With

See also

Concepts

TextStyle Object

Other resources

TextStyle Object Members


Selection.ChildShapeRange Property (PowerPoint)

 Copy code hover
[image]

Selection.ChildShapeRange Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a ShapeRange object that represents the child shapes of a selection.

Syntax

expression .ChildShapeRange

expression A variable that represents a Selection object.

Return Value

ShapeRange

Example

This example creates a new document with a drawing canvas, populates the drawing canvas with shapes, and selects the shapes added to the canvas. Then after checking that the shapes selected are child shapes, it fills the child shapes with a pattern.

VBA Copy code Copy code
Sub ChildShapes()

    Dim sldNew As Slide

    Dim shpCanvas As Shape

    'Create a new slide with a drawing canvas and shapes

    Set sldNew = Presentations(1).Slides _

        .Add(Index:=1, Layout:=ppLayoutBlank)

    Set shpCanvas = sldNew.Shapes.AddCanvas( _

        Left:=100, Top:=100, Width:=200, Height:=200)

    With shpCanvas.CanvasItems

        .AddShape msoShapeRectangle, Left:=0, Top:=0, _

            Width:=100, Height:=100

        .AddShape msoShapeOval, Left:=0, Top:=50, _

            Width:=100, Height:=100

        .AddShape msoShapeDiamond, Left:=0, Top:=100, _

            Width:=100, Height:=100

    End With

    'Select all shapes in the canvas

    shpCanvas.CanvasItems.SelectAll

    'Fill canvas child shapes with a pattern

    With ActiveWindow.Selection

        If .HasChildShapeRange = True Then

            .ChildShapeRange.Fill.Patterned Pattern:=msoPatternDivot

        Else

            MsgBox "This is not a range of child shapes."

        End If

    End With

End Sub

See also

Concepts

Selection Object

Other resources

Selection Object Members


LegendKey Members (PowerPoint)

 Copy code hover
[image]

LegendKey Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents a legend key in a chart legend.

Methods

Name | Description
ClearFormats | Clears the formatting of the object.
Delete | Deletes the object.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Height | Returns the height, in points, of the object. Read-only Double.
InvertIfNegative | True if Microsoft Word inverts the pattern in the object when it corresponds to a negative number. Read/write Variant.
Left | Returns the distance, in points, from the left edge of the object to the left edge of the chart area. Read-only Double.
MarkerBackgroundColor | Sets the marker background color as an RGB value or returns the corresponding color index value. Read/write Long.
MarkerBackgroundColorIndex | Returns or sets the marker background color as an index into the current color palette, or as one of the following XlColorIndex constants: xlColorIndexAutomatic or xlColorIndexNone. Read/write Long.
MarkerForegroundColor | Sets the marker foreground color as an RGB value or returns the corresponding color index value. Read/write Long.
MarkerForegroundColorIndex | Returns or sets the marker foreground color as an index into the current color palette, or as one of the following XlColorIndex constants: xlColorIndexAutomatic or xlColorIndexNone. Read/write Long.
MarkerSize | Returns or sets the data-marker size, in points. Read/write Long.
MarkerStyle | Returns or sets the marker style for a point or series in a line chart, scatter chart, or radar chart. Read/write XlMarkerStyle.
Parent | Returns the parent for the specified object. Read-only Object.
PictureType | Returns or sets the way pictures are displayed on a legend key. Read/write XlChartPictureType.
PictureUnit2 | Returns or sets the unit for each picture on the chart if the PictureType property is set to xlStackScale; otherwise, this property is ignored. Read/write Double.
Shadow | Returns or sets a value that indicates whether the object has a shadow. Read/write Boolean.
Smooth | True if curve smoothing is turned on for the legend key. Read/write Boolean.
Top | Returns the distance, in points, from the top edge of the object to the top of the first row (on a worksheet) or the top of the chart area (on a chart). Read-only Double.
Width | Returns the width, in points, of the object. Read-only Double.


AnimationPoint.Value Property (PowerPoint)

 Copy code hover
[image]

AnimationPoint.Value Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns the value of a property for an animation point. Read/write.

Syntax

expression .Value

expression A variable that represents an AnimationPoint object.

Return Value

Variant

Example

This example inserts three fill color animation points in the main sequence animation timeline on the first slide.

VBA Copy code Copy code
Sub BuildTimeLine()

    Dim shpFirst As Shape

    Dim effMain As Effect

    Dim tmlMain As TimeLine

    Dim aniBhvr As AnimationBehavior

    Dim aniPoint As AnimationPoint

    Set shpFirst = ActivePresentation.Slides(1).Shapes(1)

    Set tmlMain = ActivePresentation.Slides(1).TimeLine

    Set effMain = tmlMain.MainSequence.AddEffect(Shape:=shpFirst, _

        EffectId:=msoAnimEffectBlinds)

    Set aniBhvr = tmlMain.MainSequence(1).Behaviors.Add _

        (Type:=msoAnimTypeProperty)

    With aniBhvr.PropertyEffect

        .Property = msoAnimShapeFillColor

        Set aniPoint = .Points.Add

        aniPoint.Time = 0.2

        aniPoint.Value = RGB(0, 0, 0)

        Set aniPoint = .Points.Add

        aniPoint.Time = 0.5

        aniPoint.Value = RGB(0, 255, 0)

        Set aniPoint = .Points.Add

        aniPoint.Time = 1

        aniPoint.Value = RGB(0, 255, 255)

    End With

End Sub

See also

Concepts

AnimationPoint Object

Other resources

AnimationPoint Object Members


ObjectVerbs.Item Method (PowerPoint)

 Copy code hover
[image]

ObjectVerbs.Item Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a single object from the specified ObjectVerbs collection.

Syntax

expression .Item(Index)

expression A variable that represents an ObjectVerbs object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Required | Long | The index number of the single object in the collection to be returned.

Return Value

String

See also

Concepts

ObjectVerbs Object

Other resources

ObjectVerbs Object Members


Application.COMAddIns Property (PowerPoint)

 Copy code hover
[image]

Application.COMAddIns Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a reference to the Component Object Model (COM) add-ins currently loaded in Microsoft PowerPoint. These add-ins are listed on the Add-Ins tab in the PowerPoint Options dialog box. Read-only.

Syntax

expression .COMAddIns

expression A variable that represents an Application object.

Remarks

For information about returning a single member of a collection, see Returning an Object from a Collection.

See also

Concepts

Application Object

Other resources

Application Object Members


TextEffectFormat Properties (PowerPoint)

 Copy code hover
[image]

TextEffectFormat Properties (PowerPoint)
Send feedback

Published: July 12, 2012

This object has the following properties:

Properties

Name | Description
Alignment | Returns or sets the alignment for the specified WordArt. Read/write.
Application | Returns an Application object that represents the creator of the specified object.
Creator | Returns a Long that represents the four-character creator code for the application in which the specified object was created. For example, if the object was created in Microsoft PowerPoint, this property returns the hexadecimal number 50575054. Read-only.
FontBold | Determines whether the font in the specified WordArt is bold. Read/write.
FontItalic | Determines whether the font in the specified WordArt is italic. Read/write.
FontName | Returns or sets the name of the font in the specified WordArt. Read/write.
FontSize | Returns or sets the font size for the specified WordArt in points. Read/write.
KernedPairs | Determines whether the character pairs in the specified WordArt are kerned. Read/write.
NormalizedHeight | Determines whether the characters (both uppercase and lowercase) in the specified WordArt are the same height. Read/write.
Parent | Returns the parent object for the specified object.
PresetShape | Returns or sets the shape of the specified WordArt. Read/write.
PresetTextEffect | Returns or sets the style of the specified WordArt. Read/write.
RotatedChars | Determines whether characters in the specified WordArt are rotated 90 degrees relative to the WordArt's bounding shape. Read/write.
Text | Returns or sets a String that represents the text contained in the specified object. Read/write.
Tracking | Returns or sets the ratio of the horizontal space allotted to each character in the specified text to the width of the character. Read/write.


Master.TimeLine Property (PowerPoint)

 Copy code hover
[image]

Master.TimeLine Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a TimeLine object that represents the animation timeline for the slide. Read-only.

Syntax

expression .TimeLine

expression A variable that represents a Master object.

Return Value

TimeLine

Example

The following example adds a bouncing animation to the first shape on the first slide.

VBA Copy code Copy code
Sub NewTimeLineEffect()

    Dim sldFirst As Slide

    Dim shpFirst As Shape

    Set sldFirst = ActivePresentation.Slides(1)

    Set shpFirst = sldFirst.Shapes(1)

    sldFirst.TimeLine.MainSequence.AddEffect _

        Shape:=shpFirst, EffectId:=msoAnimEffectBounce

End Sub

See also

Concepts

Master Object

Other resources

Master Object Members


FilterEffect Object (PowerPoint)

 Copy code hover
[image]

FilterEffect Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents a filter effect for an animation behavior.

Remarks

Use the FilterEffect property of the AnimationBehavior object to return a FilterEffect object. Filter effects can be changed using the FilterEffect object's Reveal, SubType, and Type properties.

Example

The following example adds a shape to the first slide of the active presentation and sets a filter effect animation behavior.

VBA Copy code Copy code
Sub ChangeFilterEffect()

    Dim sldFirst As Slide

    Dim shpHeart As Shape

    Dim effNew As Effect

    Dim bhvEffect As AnimationBehavior

    Set sldFirst = ActivePresentation.Slides(1)

    Set shpHeart = sldFirst.Shapes.AddShape(Type:=msoShapeHeart, _

        Left:=100, Top:=100, Width:=100, Height:=100)

    Set effNew = sldFirst.TimeLine.MainSequence.AddEffect _

        (Shape:=shpHeart, EffectID:=msoAnimEffectChangeFillColor, _

        Trigger:=msoAnimTriggerAfterPrevious)

    Set bhvEffect = effNew.Behaviors.Add(msoAnimTypeFilter)

    With bhvEffect.FilterEffect

         .Type = msoAnimFilterEffectTypeWipe

         .Subtype = msoAnimFilterEffectSubtypeUp

         .Reveal = msoTrue

    End With

End Sub

See also

Concepts

PowerPoint Object Model Reference

Other resources

FilterEffect Object Members


ChartArea Methods (PowerPoint)

 Copy code hover
[image]

ChartArea Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Clear | Clears the entire object.
ClearContents | Clears the data from a chart but leaves the formatting.
ClearFormats | Clears the formatting of the object.
Copy | Copies the object to the Clipboard.
Select | Selects the object.


Trendline.Delete Method (PowerPoint)

 Copy code hover
[image]

Trendline.Delete Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Deletes the object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Delete

expression A variable that represents a Trendline object.

See also

Concepts

Trendline Object

Other resources

Trendline Object Members


CustomLayout.SlideShowTransition Property (PowerPoint)

 Copy code hover
[image]

CustomLayout.SlideShowTransition Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns a SlideShowTransition object that represents the special effects for the specified custom layout. Read-only.

Syntax

expression .SlideShowTransition

expression A variable that represents a CustomLayout object.

Return Value

SlideShowTransition

See also

Concepts

CustomLayout Object

Other resources

CustomLayout Object Members


Shape.Flip Method (PowerPoint)

 Copy code hover
[image]

Shape.Flip Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Flips the specified shape around its horizontal or vertical axis.

Syntax

expression .Flip(FlipCmd)

expression A variable that represents a Shape object.

Parameters

Name | Required/Optional | Data Type | Description
FlipCmd | Required | MsoFlipCmd | Specifies whether the shape is to be flipped horizontally or vertically.

Remarks

The FlipCmd parameter value can be one of these MsoFlipCmd constants.

msoFlipHorizontal

msoFlipVertical

Example

This example adds a triangle to myDocument, duplicates the triangle, and then flips the duplicate triangle vertically and makes it red.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes _

        .AddShape(msoShapeRightTriangle, 10, 10, 50, 50).Duplicate

    .Fill.ForeColor.RGB = RGB(255, 0, 0)

    .Flip msoFlipVertical

End With

See also

Concepts

Shape Object

Other resources

Shape Object Members


ActionSettings Properties (PowerPoint)

 Copy code hover
[image]

ActionSettings Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


Theme Object (PowerPoint)

 Copy code hover
[image]

Theme Object (PowerPoint)
Send feedback

Represents a theme (a collection of colors, fonts, and effects).

Version information

Version Added: PowerPoint 2013

Example

The following code example gets a reference to the currently active theme and then iterates over each theme variation in the theme.

VBA Copy code Copy code
Sub IterateThemeVariants()

    Dim pptTheme As Theme
    Dim pptThemeVariants As ThemeVariants
    Dim pptThemeVariant As ThemeVariant
    Dim path As String

    ' Get a reference to the currently active theme.
    path = "C:\Program Files (x86)\Microsoft Office\Document Themes 15\" & _
        ActivePresentation.TemplateName & ".thmx"
    Set pptTheme = Application.OpenThemeFile(path)

    ' Get a reference to all of the variations in the theme.
    Set pptThemeVariants = pptTheme.ThemeVariants

    ' Iterate over each variation of the theme and print
    ' its ID.
    For Each pptThemeVariant In pptThemeVariants

        Debug.Print "Variation id: " & pptThemeVariant.Id

    Next pptThemeVariant

End Sub


SoundEffect.Name Property (PowerPoint)

 Copy code hover
[image]

SoundEffect.Name Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the name of the specified object. Read/write.

Syntax

expression .Name

expression A variable that represents a SoundEffect object.

Return Value

String

Remarks

You can use the object's name in conjunction with the Item method to return a reference to the object if the Item method for the collection that contains the object takes a Variant argument. For example, if the value of the Name property for a shape is Rectangle 2, then .Shapes("Rectangle 2") will return a reference to that shape.

See also

Concepts

SoundEffect Object

Other resources

SoundEffect Object Members


ChartFont.Creator Property (PowerPoint)

 Copy code hover
[image]

ChartFont.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents a ChartFont object.

See also

Concepts

ChartFont Object

Other resources

ChartFont Object Members


ChartTitle Properties (PowerPoint)

 Copy code hover
[image]

ChartTitle Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Caption | Returns or sets the chart title text. Read/write String.
Characters | Returns a ChartCharacters object that represents a range of characters within the object text. You can use the ChartCharacters object to format characters within a text string.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Formula | Returns or sets the object's formula in A1-style notation. Read/write.
FormulaLocal | Returns or sets the formula for the object, using A1-style references in the language of the user. Read/write String.
FormulaR1C1 | Returns or sets the formula for the object, using R1C1-style notation in the language of the macro. Read/write String.
FormulaR1C1Local | Returns or sets the formula for the object, using R1C1-style notation in the language of the user. Read/write String.
Height | Returns or sets a Double value that represents the height, in points, of the object. Read-only.
HorizontalAlignment | Returns or sets the horizontal alignment for the specified object. Read/write Variant.
IncludeInLayout | True if a chart title will occupy the chart layout space when a chart layout is being determined. The default is True. Read/write Boolean.
Left | Returns or sets the distance, in points, from the left edge of the object to the left edge of the chart area. Read/write Double.
Name | Returns the name of the object. Read-only String.
Orientation | Returns or sets the text orientation. Read/write Long.
Parent | Returns the parent for the specified object. Read-only Object.
Position | Returns or sets the position of the chart title on the chart. Read/write XlChartElementPosition.
ReadingOrder | Returns or sets an XlReadingOrder constant that represents the reading order for the specified object. Read/write Long.
Shadow | Returns or sets a value that indicates whether the object has a shadow. Read/write Boolean.
Text | Returns or sets the text for the specified object. Read/write String.
Top | Returns or sets the distance, in points, from the top edge of the object to the top of the first row (on a worksheet) or the top of the chart area (on a chart). Read/write Double.
VerticalAlignment | Returns or sets the vertical alignment of the specified object. Read/write Variant.
Width | Returns or sets a Double value that represents the width, in points, of the object. Read-only.


TextFrame.WordWrap Property (PowerPoint)

 Copy code hover
[image]

TextFrame.WordWrap Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether lines break automatically to fit inside the shape. Read/write.

Syntax

expression .WordWrap

expression A variable that represents a TextFrame object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | Lines do not break automatically to fit inside the shape.
msoTrue | Lines break automatically to fit inside the shape.

Example

This example adds a rectangle that contains text to myDocument and then turns off word wrapping in the new rectangle.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddShape(msoShapeRectangle, _

        0, 0, 100, 300).TextFrame

    .TextRange.Text = _

        "Here is some test text that is too long for this box"

    .WordWrap = False

End With

See also

Concepts

TextFrame Object

Other resources

TextFrame Object Members


Application.Caption Property (PowerPoint)

 Copy code hover
[image]

Application.Caption Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the text that appears in the title bar of the application window. Read/write.

Syntax

expression .Caption

expression A variable that represents an Application object.

Return Value

String

See also

Concepts

Application Object

Other resources

Application Object Members


TextRange.LanguageID Property (PowerPoint)

 Copy code hover
[image]

TextRange.LanguageID Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the language for the specified text range. Read/write.

Syntax

expression .LanguageID

expression A variable that represents a TextRange object.

Return Value

MsoLanguageID

Remarks

The LanguageID property is used for tagging portions of text written in a different language than the DefaultLanguageID property specifies. This allows Microsoft PowerPoint to check spelling and grammar according to the language for each text range. This property is not related to the application interface language.

The value of the LanguageID property can be one of these MsoLanguageID constants.

msoLanguageIDAfrikaans

msoLanguageIDAlbanian

msoLanguageIDAmharic

msoLanguageIDArabic

msoLanguageIDArabicAlgeria

msoLanguageIDArabicBahrain

msoLanguageIDArabicEgypt

msoLanguageIDArabicIraq

msoLanguageIDArabicJordan

msoLanguageIDArabicKuwait

msoLanguageIDArabicLebanon

msoLanguageIDArabicLibya

msoLanguageIDArabicMorocco

msoLanguageIDArabicOman

msoLanguageIDArabicQatar

msoLanguageIDArabicSyria

msoLanguageIDArabicTunisia

msoLanguageIDArabicUAE

msoLanguageIDArabicYemen

msoLanguageIDArmenian

msoLanguageIDAssamese

msoLanguageIDAzeriCyrillic

msoLanguageIDAzeriLatin

msoLanguageIDBasque

msoLanguageIDBelgianDutch

msoLanguageIDBelgianFrench

msoLanguageIDBengali

msoLanguageIDBrazilianPortuguese

msoLanguageIDBulgarian

msoLanguageIDBurmese

msoLanguageIDByelorussian

msoLanguageIDCatalan

msoLanguageIDCherokee

msoLanguageIDChineseHongKong

msoLanguageIDChineseMacao

msoLanguageIDChineseSingapore

msoLanguageIDCroatian

msoLanguageIDCzech

msoLanguageIDDanish

msoLanguageIDDutch

msoLanguageIDEnglishAUS

msoLanguageIDEnglishBelize

msoLanguageIDEnglishCanadian

msoLanguageIDEnglishCaribbean

msoLanguageIDEnglishIreland

msoLanguageIDEnglishJamaica

msoLanguageIDEnglishNewZealand

msoLanguageIDEnglishPhilippines

msoLanguageIDEnglishSouthAfrica

msoLanguageIDEnglishTrinidad

msoLanguageIDEnglishUK

msoLanguageIDEnglishUS

msoLanguageIDEnglishZimbabwe

msoLanguageIDEstonian

msoLanguageIDFaeroese

msoLanguageIDFarsi

msoLanguageIDFinnish

msoLanguageIDFrench

msoLanguageIDFrenchCameroon

msoLanguageIDFrenchCanadian

msoLanguageIDFrenchCotedIvoire

msoLanguageIDFrenchLuxembourg

msoLanguageIDFrenchMali

msoLanguageIDFrenchMonaco

msoLanguageIDFrenchReunion

msoLanguageIDFrenchSenegal

msoLanguageIDFrenchWestIndies

msoLanguageIDFrenchZaire

msoLanguageIDFrisianNetherlands

msoLanguageIDGaelicIreland

msoLanguageIDGaelicScotland

msoLanguageIDGalician

msoLanguageIDGeorgian

msoLanguageIDGerman

msoLanguageIDGermanAustria

msoLanguageIDGermanLiechtenstein

msoLanguageIDGermanLuxembourg

msoLanguageIDGreek

msoLanguageIDGujarati

msoLanguageIDHebrew

msoLanguageIDHindi

msoLanguageIDHungarian

msoLanguageIDIcelandic

msoLanguageIDIndonesian

msoLanguageIDInuktitut

msoLanguageIDItalian

msoLanguageIDJapanese

msoLanguageIDKannada

msoLanguageIDKashmiri

msoLanguageIDKazakh

msoLanguageIDKhmer

msoLanguageIDKirghiz

msoLanguageIDKonkani

msoLanguageIDKorean

msoLanguageIDLao

msoLanguageIDLatvian

msoLanguageIDLithuanian

msoLanguageIDMacedonian

msoLanguageIDMalayalam

msoLanguageIDMalayBruneiDarussalam

msoLanguageIDMalaysian

msoLanguageIDMaltese

msoLanguageIDManipuri

msoLanguageIDMarathi

msoLanguageIDMexicanSpanish

msoLanguageIDMixed

msoLanguageIDMongolian

msoLanguageIDNepali

msoLanguageIDNone

msoLanguageIDNoProofing

msoLanguageIDNorwegianBokmol

msoLanguageIDNorwegianNynorsk

msoLanguageIDOriya

msoLanguageIDPolish

msoLanguageIDPunjabi

msoLanguageIDRhaetoRomanic

msoLanguageIDRomanian

msoLanguageIDRomanianMoldova

msoLanguageIDRussian

msoLanguageIDRussianMoldova

msoLanguageIDSamiLappish

msoLanguageIDSanskrit

msoLanguageIDSerbianCyrillic

msoLanguageIDSerbianLatin

msoLanguageIDSesotho

msoLanguageIDSimplifiedChinese

msoLanguageIDSindhi

msoLanguageIDSlovak

msoLanguageIDSlovenian

msoLanguageIDSorbian

msoLanguageIDSpanish

msoLanguageIDSpanishArgentina

msoLanguageIDSpanishBolivia

msoLanguageIDSpanishChile

msoLanguageIDSpanishColombia

msoLanguageIDSpanishCostaRica

msoLanguageIDSpanishDominicanRepublic

msoLanguageIDSpanishEcuador

msoLanguageIDSpanishElSalvador

msoLanguageIDSpanishGuatemala

msoLanguageIDSpanishHonduras

msoLanguageIDSpanishModernSort

msoLanguageIDSpanishNicaragua

msoLanguageIDSpanishPanama

msoLanguageIDSpanishParaguay

msoLanguageIDSpanishPeru

msoLanguageIDSpanishPuertoRico

msoLanguageIDSpanishUruguay

msoLanguageIDSpanishVenezuela

msoLanguageIDSutu

msoLanguageIDSwahili

msoLanguageIDSwedish

msoLanguageIDSwedishFinland

msoLanguageIDSwissFrench

msoLanguageIDSwissGerman

msoLanguageIDSwissItalian

msoLanguageIDTajik

msoLanguageIDTamil

msoLanguageIDTatar

msoLanguageIDTelugu

msoLanguageIDThai

msoLanguageIDTibetan

msoLanguageIDTraditionalChinese

msoLanguageIDTsonga

msoLanguageIDTswana

msoLanguageIDTurkish

msoLanguageIDTurkmen

msoLanguageIDUkrainian

msoLanguageIDUrdu

msoLanguageIDUzbekCyrillic

msoLanguageIDUzbekLatin

msoLanguageIDVenda

msoLanguageIDVietnamese

msoLanguageIDWelsh

msoLanguageIDXhosa

msoLanguageIDZulu

msoLanguageIDPortuguese

Example

This example sets the language for the specified text in shape one to US English.

VBA Copy code Copy code
ActivePresentation.Slides(1).Shapes(1).TextFrame.TextRange.LanguageID = msoLanguageIDEnglishUS

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


XlBackground Enumeration (PowerPoint)

 Copy code hover
[image]

XlBackground Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the background type for text in charts.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xlBackgroundAutomatic | -4105 | Word controls the background.
xlBackgroundOpaque | 3 | An opaque background.
xlBackgroundTransparent | 2 | A transparent background.


ChartTitle.Width Property (PowerPoint)

 Copy code hover
[image]

ChartTitle.Width Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a Double value that represents the width, in points, of the object. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Width

expression A variable that represents a ChartTitle object.

Return Value

Double

See also

Concepts

ChartTitle Object

Other resources

ChartTitle Object Members


PublishObject.Application Property (PowerPoint)

 Copy code hover
[image]

PublishObject.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a PublishObject object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

PublishObject Object

Other resources

PublishObject Object Members


AxisTitle.Creator Property (PowerPoint)

 Copy code hover
[image]

AxisTitle.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents an AxisTitle object.

See also

Concepts

AxisTitle Object

Other resources

AxisTitle Object Members


Presentation.CommandBars Property (PowerPoint)

 Copy code hover
[image]

Presentation.CommandBars Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a CommandBars collection that represents the merged command bar set from the host container application and Microsoft PowerPoint. This property returns a valid object only when the container is a DocObject server, like Microsoft Binder, and PowerPoint is acting as an OLE server. Read-only.

Syntax

expression .CommandBars

expression A variable that represents a Presentation object.

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


ChartArea.Clear Method (PowerPoint)

 Copy code hover
[image]

ChartArea.Clear Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Clears the entire object.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Clear

expression A variable that represents a ChartArea object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example clears the chart area (the chart data and formatting) of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineGroups(1)

    If .HasChart Then

        .Chart.ChartArea.Clear

    End If

End With

See also

Concepts

ChartArea Object

Other resources

ChartArea Object Members


ConnectorFormat.EndConnectionSite Property (PowerPoint)

 Copy code hover
[image]

ConnectorFormat.EndConnectionSite Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an integer that specifies the connection site that the end of a connector is connected to. Read-only.

Syntax

expression .EndConnectionSite

expression A variable that represents an ConnectorFormat object.

Return Value

Long

Remarks

If the end of the specified connector isn't attached to a shape, this property generates an error.

Example

This example assumes that the first slide in the active presentation already contains two shapes attached by a connector named "Conn1To2." The code adds a rectangle and a connector to the first slide. The end of the new connector will be attached to the same connection site as the end of the connector named "Conn1To2," and the beginning of the new connector will be attached to connection site one on the new rectangle.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes

    Set r3 = .AddShape(msoShapeRectangle, 100, 420, 200, 100)

    .AddConnector(msoConnectorCurve, 0, 0, 10, 10) _

        .Name = "Conn1To3"

    With .Item("Conn1To2").ConnectorFormat

        endConnSite1 = .EndConnectionSite

        Set endConnShape1 = .EndConnectedShape

    End With

    With .Item("Conn1To3").ConnectorFormat

        .BeginConnect r3, 1

        .EndConnect endConnShape1, endConnSite1

    End With

End With

See also

Concepts

ConnectorFormat Object

Other resources

ConnectorFormat Object Members


Chart.ClearToMatchStyle Method (PowerPoint)

 Copy code hover
[image]

Chart.ClearToMatchStyle Method (PowerPoint)
See also Send feedback

Published: July 12, 2012

Clears the chart elements formatting to automatic.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ClearToMatchStyle

expression A variable that represents a Chart object.

Remarks

Use this method to reset the chart elements formatting to automatic. If you use this method on a chart, all formatting (including overrides) will be reset.

See also

Concepts

Chart Object

Other resources

Chart Object Members


FreeformBuilder Object (PowerPoint)

 Copy code hover
[image]

FreeformBuilder Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the geometry of a freeform while it is being built.

Example

Use the BuildFreeform method to return a FreeformBuilder object. Use the AddNodes method to add nodes to the freefrom. Use the ConvertToShape method to create the shape defined in the FreeformBuilder object and add it to the Shapes collection. The following example adds a freeform with four segments to myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.BuildFreeform(msoEditingCorner, 360, 200)

    .AddNodes msoSegmentCurve, msoEditingCorner, _

        380, 230, 400, 250, 450, 300

    .AddNodes msoSegmentCurve, msoEditingAuto, 480, 200

    .AddNodes msoSegmentLine, msoEditingAuto, 480, 400

    .AddNodes msoSegmentLine, msoEditingAuto, 360, 200

    .ConvertToShape

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

FreeformBuilder Object Members


Shape.HasTable Property (PowerPoint)

 Copy code hover
[image]

Shape.HasTable Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns whether the specified shape is a table. Read-only.

Syntax

expression .HasTable

expression A variable that represents a Shape object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | The specified shape is not a table.
msoTrue | The specified shape is a table.

Example

This example checks the currently selected shape to see if it is a table. If it is, the code sets the width of column one to one inch (72 points).

VBA Copy code Copy code
With ActiveWindow.Selection.ShapeRange

    If .HasTable = msoTrue Then

       .Table.Columns(1).Width = 72

    End If

End With

See also

Concepts

Shape Object

Other resources

Shape Object Members


DataLabels.ShowSeriesName Property (PowerPoint)

 Copy code hover
[image]

DataLabels.ShowSeriesName Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True to show the series name for the data labels on a chart. False to hide the name. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ShowSeriesName

expression A variable that represents a DataLabels object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example enables the series name to be shown for the data labels of the first series on the first chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).DataLabels. _

            ShowSeriesName = True

    End If

End With

See also

Concepts

DataLabels Object

Other resources

DataLabels Object Members


Series.ApplyPictToEnd Property (PowerPoint)

 Copy code hover
[image]

Series.ApplyPictToEnd Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if a picture is applied to the end of the point or all points in the series. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .ApplyPictToEnd

expression A variable that represents a Series object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example applies pictures to the end of all points in the first series of the first chart in the active document. The series must already have pictures applied to it (setting this property changes the picture orientation).

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).ApplyPictToEnd = True

    End If

End With

See also

Concepts

Series Object

Other resources

Series Object Members


Trendlines Properties (PowerPoint)

 Copy code hover
[image]

Trendlines Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
Count | Returns the number of objects in the collection. Read-only Long.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Parent | Returns the parent for the specified object. Read-only Object.


AnimationPoints.Add Method (PowerPoint)

 Copy code hover
[image]

AnimationPoints.Add Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an AnimationPoint object that represents a new animation point.

Syntax

expression .Add(Index)

expression A variable that represents an AnimationPoints object.

Parameters

Name | Required/Optional | Data Type | Description
Index | Optional | Long | The position of the animation point in relation to other animation points. The default value is -1, which means that if you omit the Index parameter, the new animation point is added to the end of existing animation points.

Return Value

AnimationPoint

See also

Concepts

AnimationPoints Object

Other resources

AnimationPoints Object Members


Borders.Item Method (PowerPoint)

 Copy code hover
[image]

Borders.Item Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a LineFormat object for the specified border from the Borders collection.

Syntax

expression .Item(BorderType)

expression A variable that represents a Borders object.

Parameters

Name | Required/Optional | Data Type | Description
BorderType | Required | PpBorderType | Specifies which border of a cell or cell range is to be returned.

Return Value

LineFormat

Remarks

The BorderType parameter value can be one of these PpBorderType constants.

ppBorderBottom

ppBorderDiagonalDown

ppBorderDiagonalUp

ppBorderLeft

ppBorderRight

ppBorderTop

See also

Concepts

Borders Object

Other resources

Borders Object Members


ConnectorFormat.Parent Property (PowerPoint)

 Copy code hover
[image]

ConnectorFormat.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a ConnectorFormat object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

ConnectorFormat Object

Other resources

ConnectorFormat Object Members


Chart.BarShape Property (PowerPoint)

 Copy code hover
[image]

Chart.BarShape Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the shape used for every series in a 3-D bar or column chart. Read/write XlBarShape.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .BarShape

expression A variable that represents a Chart object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the shape used with the first series of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.BarShape = xlConeToPoint

    End If

End With

See also

Concepts

Chart Object

Other resources

Chart Object Members


ChartGroup.FirstSliceAngle Property (PowerPoint)

 Copy code hover
[image]

ChartGroup.FirstSliceAngle Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the angle, in degrees (clockwise from vertical), of the first pie-chart or doughnut-chart slice. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .FirstSliceAngle

expression A variable that represents a ChartGroup object.

Remarks

This property applies only to pie, 3-D pie, and doughnut charts. It can be a value from 0 through 360.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the angle for the first slice in chart group one for the first chart in the active document. You should run the example on a 2-D pie chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.ChartGroups(1).FirstSliceAngle = 15

    End If

End With

See also

Concepts

ChartGroup Object

Other resources

ChartGroup Object Members


Presentation.HasVBProject Property (PowerPoint)

 Copy code hover
[image]

Presentation.HasVBProject Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns whether the active presentation contains a Microsoft Visual Basic for Applications (VBA) project. Read-only.

Syntax

expression .HasVBProject

expression An expression that returns a Presentation object.

Return Value

Boolean

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


TextRange.InsertBefore Method (PowerPoint)

 Copy code hover
[image]

TextRange.InsertBefore Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Appends a string to the beginning of the specified text range. Returns a TextRange object that represents the appended text. When used without an argument, this method returns a zero-length string at the end of the specified range.

Syntax

expression .InsertBefore(NewText)

expression A variable that represents a TextRange object.

Parameters

Name | Required/Optional | Data Type | Description
NewText | Optional | String | The text to be appended. The default value is an empty string.

Example

This example appends the string "Test version: " to the beginning of the title on slide one in the active presentation.

VBA Copy code Copy code
With Application.ActivePresentation.Slides(1).Shapes(1)

    .TextFrame.TextRange.InsertBefore "Test version: "

End With

This example appends the contents of the Clipboard to the beginning of the title on slide one in the active presentation.

VBA Copy code Copy code
Application.ActivePresentation.Slides(1).Shapes(1).TextFrame _

    .TextRange.InsertBefore.Paste

See also

Concepts

TextRange Object

Other resources

TextRange Object Members


PpEntryEffect Enumeration (PowerPoint)

 Copy code hover
[image]

PpEntryEffect Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the special effect applied to the animation for the specified shape or to the specified slide transition.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppEffectAppear | 3844 | Appear
ppEffectBlindsHorizontal | 769 | Blinds Horizontal
ppEffectBlindsVertical | 770 | Blinds Vertical
ppEffectBoxIn | 3074 | Box In
ppEffectBoxOut | 3073 | Box Out
ppEffectCheckerboardAcross | 1025 | Checkerboard Across
ppEffectCheckerboardDown | 1026 | Checkerboard Down
ppEffectCircleOut | 3845 | Circle Out
ppEffectCombHorizontal | 3847 | Comb Horizontal
ppEffectCombVertical | 3848 | Comb Vertical
ppEffectCoverDown | 1284 | Cover Down
ppEffectCoverLeft | 1281 | Cover Left
ppEffectCoverLeftDown | 1287 | Cover Left Down
ppEffectCoverLeftUp | 1285 | Cover Left Up
ppEffectCoverRight | 1283 |
ppEffectCoverRightDown | 1288 | Cover Right Down
ppEffectCoverRightUp | 1286 | Cover Right Up
ppEffectCoverUp | 1282 | Cover Up
ppEffectCrawlFromDown | 3344 | Crawl From Down
ppEffectCrawlFromLeft | 3341 | Crawl From Left
ppEffectCrawlFromRight | 3343 | Crawl From Right
ppEffectCrawlFromUp | 3342 | Crawl From Up
ppEffectCut | 257 | Cut
ppEffectCutThroughBlack | 258 | Cut Through Black
ppEffectDiamondOut | 3846 | Diamond Out
ppEffectDissolve | 1537 | Dissolve
ppEffectFade | 1793 | Fade
ppEffectFadeSmoothly | 3849 | Fade Smoothly
ppEffectFlashOnceFast | 3841 | Flash Once Fast
ppEffectFlashOnceMedium | 3842 | Flash Once Medium
ppEffectFlashOnceSlow | 3843 | Flash Once Slow
ppEffectFlyFromBottom | 3332 | Fly From Bottom
ppEffectFlyFromBottomLeft | 3335 | From Bottom Left
ppEffectFlyFromBottomRight | 3336 | From Bottom Right
ppEffectFlyFromLeft | 3329 | Fly From Left
ppEffectFlyFromRight | 3331 | Fly From Right
ppEffectFlyFromTop | 3330 | Fly From Top
ppEffectFlyFromTopLeft | 3333 | Fly From Top Left
ppEffectFlyFromTopRight | 3334 | Fly From Top Right
ppEffectMixed | -2 | Mixed
ppEffectNewsflash | 3850 | Newsflash
ppEffectNone | 0 | None
ppEffectPeekFromDown | 3338 | Peek From Down
ppEffectPeekFromLeft | 3337 | Peek From Left
ppEffectPeekFromRight | 3339 | Peek From Right
ppEffectPeekFromUp | 3340 | Peek From Up
ppEffectPlusOut | 3851 | Plus Out
ppEffectPushDown | 3852 | Push Down
ppEffectPushLeft | 3853 | Push Left
ppEffectPushRight | 3854 | Push Right
ppEffectPushUp | 3855 | Push Up
ppEffectRandom | 513 | Random
ppEffectRandomBarsHorizontal | 2305 | Random Bars Horizontal
ppEffectRandomBarsVertical | 2306 | Random Bars Vertical
ppEffectSpiral | 3357 | Spiral
ppEffectSplitHorizontalIn | 3586 | Split Horizontal In
ppEffectSplitHorizontalOut | 3585 | Split Horizontal Out
ppEffectSplitVerticalIn | 3588 | Split Vertical In
ppEffectSplitVerticalOut | 3587 | Split Vertical Out
ppEffectStretchAcross | 3351 | Stretch Across
ppEffectStretchDown | 3355 | Stretch Down
ppEffectStretchLeft | 3352 | Stretch Left
ppEffectStretchRight | 3354 | Stretch Right
ppEffectStretchUp | 3353 | Stretch Up
ppEffectStripsDownLeft | 2563 | Strips Down Left
ppEffectStripsDownRight | 2564 | Strips Down Right
ppEffectStripsLeftDown | 2567 | Strips Left Down
ppEffectStripsLeftUp | 2565 | Strips Left Up
ppEffectStripsRightDown | 2568 | Strips Right Down
ppEffectStripsRightUp | 2566 | Strips Right Up
ppEffectStripsUpLeft | 2561 | Strips Up Left
ppEffectStripsUpRight | 2562 | Strips Up Right
ppEffectSwivel | 3356 | Swivel
ppEffectUncoverDown | 2052 | Uncover Down
ppEffectUncoverLeft | 2049 | Uncover Left
ppEffectUncoverLeftDown | 2055 | Uncover Left Down
ppEffectUncoverLeftUp | 2053 | Uncover Left Up
ppEffectUncoverRight | 2051 | Effect Uncover Right
ppEffectUncoverRightDown | 2056 | Uncover Right Down
ppEffectUncoverRightUp | 2054 | Uncover Right Up
ppEffectUncoverUp | 2050 | Uncover Up
ppEffectWedge | 3856 | Wedge
ppEffectWheel1Spoke | 3857 | Wheel1 Spoke
ppEffectWheel2Spokes | 3858 | Wheel2 Spokes
ppEffectWheel3Spokes | 3859 | Wheel3 Spokes
ppEffectWheel4Spokes | 3860 | Wheel4 Spokes
ppEffectWheel8Spokes | 3861 | Wheel8 Spokes
ppEffectWipeDown | 2820 | Wipe Down
ppEffectWipeLeft | 2817 | Wipe Left
ppEffectWipeRight | 2819 | Wipe Right
ppEffectWipeUp | 2818 | Wipe Up
ppEffectZoomBottom | 3350 | Zoom Bottom
ppEffectZoomCenter | 3349 | Zoom Center
ppEffectZoomIn | 3345 | Zoom In
ppEffectZoomInSlightly | 3346 | Zoom In Slightly
ppEffectZoomOut | 3347 | Zoom Out
ppEffectZoomOutSlightly | 3348 | Zoom Out Slightly


OLEFormat Object (PowerPoint)

 Copy code hover
[image]

OLEFormat Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Contains properties and methods that apply to OLE objects.

Remarks

The LinkFormat object contains properties and methods that apply to linked OLE objects only. The PictureFormat object contains properties and methods that apply to pictures and OLE objects.

Example

Use the OLEFormat property to return an OLEFormat object. The following example loops through all the shapes on all the slides in the active presentation and sets all linked Microsoft Excel worksheets to be updated manually.

VBA Copy code Copy code
For Each sld In ActivePresentation.Slides

    For Each sh In sld.Shapes

        If sh.Type = msoLinkedOLEObject Then

            If sh.OLEFormat.ProgID = "Excel.Sheet" Then

                sh.LinkFormat.AutoUpdate = ppUpdateOptionManual

            End If

        End If

    Next

Next

See also

Concepts

PowerPoint Object Model Reference

Other resources

OLEFormat Object Members


ChartGroup.HasUpDownBars Property (PowerPoint)

 Copy code hover
[image]

ChartGroup.HasUpDownBars Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if a line chart has up and down bars. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .HasUpDownBars

expression A variable that represents a ChartGroup object.

Remarks

This property applies only to line charts.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example enables up and down bars for chart group one of the first chart in the active document and then sets their colors. You should run the example on a 2-D line chart that contains two series that cross each other at one or more data points.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.ChartGroups(1)

            .HasUpDownBars = True

            .DownBars.Interior.ColorIndex = 3

            .UpBars.Interior.ColorIndex = 5

        End With

    End If

End With

See also

Concepts

ChartGroup Object

Other resources

ChartGroup Object Members


DataLabel.Text Property (PowerPoint)

 Copy code hover
[image]

DataLabel.Text Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the text for the specified object. Read/write String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Text

expression A variable that represents a DataLabel object.

See also

Concepts

DataLabel Object

Other resources

DataLabel Object Members


Design.MoveTo Method (PowerPoint)

 Copy code hover
[image]

Design.MoveTo Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Moves the specified object to a specific location within the same collection, renumbering all other items in the collection appropriately.

Syntax

expression .MoveTo(toPos)

expression A variable that represents a Design object.

Parameters

Name | Required/Optional | Data Type | Description
toPos | Required | Long | The index position to which to move the animation effect.

Example

This example moves an animation effect to the second in the animation effects collection for the specified shape.

VBA Copy code Copy code
Sub MoveEffect()

    Dim sldFirst as Slide

    Dim shpFirst As Shape

    Dim effAdd As Effect

    Set sldFirst = ActivePresentation.Slides(1)

    Set shpFirst = sldFirst.Shapes(1)

    Set effAdd = sldFirst.TimeLine.MainSequence.AddEffect _

        (Shape:=shpFirst, effectId:=msoAnimEffectBlinds)

    effAdd.MoveTo toPos:=2

End Sub

This example moves the second slide in the active presentation to the first slide.

VBA Copy code Copy code
Sub MoveSlideToNewLocation()

    ActivePresentation.Slides(2).MoveTo toPos:=1

End Sub

See also

Concepts

Design Object

Other resources

Design Object Members


AddIns Properties (PowerPoint)

 Copy code hover
[image]

AddIns Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
Count | Returns the number of objects in the specified collection. Read-only.
Parent | Returns the parent object for the specified object.


TabStop.Position Property (PowerPoint)

 Copy code hover
[image]

TabStop.Position Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the position of the specified tab stop, in points. Read/write.

Syntax

expression .Position

expression A variable that represents a TabStop object.

Return Value

Single

Example

This example deletes all tab stops greater than 1 inch (72 points) for the text in shape two on slide one in the active presentation.

VBA Copy code Copy code
With Application.ActivePresentation.Slides(1).Shapes(2).TextFrame _

    .Ruler.TabStops

    For i = .Count To 1 Step -1

        With .Item(i)

            If .Position > 72 Then .Clear

        End With

    Next

End With

See also

Concepts

TabStop Object

Other resources

TabStop Object Members


TextFrame.VerticalAnchor Property (PowerPoint)

 Copy code hover
[image]

TextFrame.VerticalAnchor Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the vertical alignment of text in a text frame. Read/write.

Syntax

expression .VerticalAnchor

expression A variable that represents a TextFrame object.

Return Value

MsoVerticalAnchor

Remarks

The value of the VerticalAnchor property can be one of these MsoVerticalAnchor constants.

Constant | Description
msoAnchorBottom | Anchors the bottom of the text string to the current position.
msoAnchorBottomBaseLine | Anchors the bottom of the text string to the current position regardless of the resizing of text. When you resize text without baseline anchoring, the text centers itself on the previous position.
msoAnchorMiddle | Anchors the middle of the text string to the current position.
msoAnchorTop | Anchors the top of the text string to the current position
msoAnchorTopBaseline | Anchors the top of the text string to the current position regardless of the resizing of text. When you resize text without baseline anchoring, the text centers itself on the previous position.
msoVerticalAnchorMixed | Read-only. Returned when two or more text boxes within a shape range have this property set to different values.

Example

This example sets the alignment of the text in shape one on myDocument to top centered.

VBA Copy code Copy code
Set myDocument = ActivePresentation.SlideMaster

With myDocument.Shapes(1)

    .TextFrame.HorizontalAnchor = msoAnchorCenter

    .TextFrame.VerticalAnchor = msoAnchorTop

End With

See also

Concepts

TextFrame Object

Other resources

TextFrame Object Members


Presentation.CheckInWithVersion Method (PowerPoint)

 Copy code hover
[image]

Presentation.CheckInWithVersion Method (PowerPoint)
Send feedback

Published: July 16, 2012

Returns a presentation from a local computer to a server, and sets the local file to read-only so that it cannot be edited locally.

Syntax

expression .CheckInWithVersion(SaveChanges, Comments, MakePublic, VersionType)

expression An expression that returns a Presentation object.

Parameters

Name | Required/Optional | Data Type | Description
SaveChanges | Optional | Boolean | True saves the presentation to the server location. The default value is False.
Comments | Optional | Variant | Comments for the revision of the presentation being checked in (only applies if SaveChanges equals True).
MakePublic | Optional | Variant | True allows the user to perform a publish on the presentation after being checked in. This submits the document for the approval process, which can eventually result in a version of the presentation being published to users with read-only rights to the presentation (only applies if SaveChanges equals True).
VersionType | Optional | Variant | Version number of the presentation.

Remarks

To take advantage of the collaboration features built into Microsoft PowerPoint, you must store presentations on a Microsoft SharePoint Portal Server.

For the VersionType parameter, you can also pass a constant from the PpCheckInVersionType enumeration.

Example

This example checks the server to see if the specified presentation can be checked in and, if so, closes the presentation and checks it back into server.

VBA Copy code Copy code
Sub CheckInPresentation(strPresentation As String)

    If Presentations(strPresentation).CanCheckIn = True Then

        Presentations(strPresentation).CheckIn

        MsgBox strPresentation & " has been checked in."

    Else

        MsgBox strPresentation & " cannot be checked in at this time.  Please try again later."

    End If

End Sub

To call the subroutine above, use the following subroutine and replace the "http://servername/workspace/report.ppt" file name with an actual file located on a server mentioned in the Remarks section above.

VBA Copy code Copy code
Sub CheckInPresentation()

    Call CheckInPresentation(strPresentation:= "http://servername/workspace/report.ppt")

End Sub


PlaceholderFormat Properties (PowerPoint)

 Copy code hover
[image]

PlaceholderFormat Properties (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following properties:

Properties

Name | Description
Application | Returns an Application object that represents the creator of the specified object.
ContainedType | Returns the type of the shape that contains the specified placeholder format. Read-only.
Name | Returns or sets the name of the specified object. Read/write.
Parent | Returns the parent object for the specified object.
Type | Represents the type of placeholder. Read-only.


Shape.Title Property (PowerPoint)

 Copy code hover
[image]

Shape.Title Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Shape object that represents the slide title. Read-only.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Title

expression A variable that represents a Shape object.

Remarks

You can also use the Item method of the Shapes or Placeholders collection to return the slide title.

Example

The following example sets the title text on myDocument.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

myDocument.Shapes.Title.TextFrame.TextRange.Text = "Welcome!"

See also

Concepts

Shape Object

Other resources

Shape Object Members


Presentation.FarEastLineBreakLevel Property (PowerPoint)

 Copy code hover
[image]

Presentation.FarEastLineBreakLevel Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the line break based upon Asian character level. Read/write.

Syntax

expression .FarEastLineBreakLevel

expression A variable that represents a Presentation object.

Return Value

PpFarEastLineBreakLevel

Remarks

The value of the FarEastLineBreakLevel property can be one of these PpFarEastLineBreakLevel constants.

ppFarEastLineBreakLevelCustom

ppFarEastLineBreakLevelNormal

ppFarEastLineBreakLevelStrict

Example

This example sets line break control to use level one kinsoku characters.

VBA Copy code Copy code
ActivePresentation.FarEastLineBreakLevel = ppFarEastLineBreakLevelNormal

See also

Concepts

Presentation Object

Other resources

Presentation Object Members


ThreeDFormat.PresetThreeDFormat Property (PowerPoint)

 Copy code hover
[image]

ThreeDFormat.PresetThreeDFormat Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the preset extrusion format. Read-only.

Syntax

expression .PresetThreeDFormat

expression A variable that represents a ThreeDFormat object.

Return Value

MsoPresetThreeDFormat

Remarks

This property is read-only. To set the preset extrusion format, use the SetThreeDFormat method.

Each preset extrusion format contains a set of preset values for the various properties of the extrusion. The values for this property correspond to the options (numbered from left to right, top to bottom) displayed when you click the 3-D Rotation submenu on the Shape Effects menu.

The value of the PresetThreeDFormat property can be one of these MsoPresetThreeDFormat constants. If the value is msoPresetThreeDFormatMixed, the extrusion has a custom format rather than a preset format.

msoPresetThreeDFormatMixed

msoThreeD1

msoThreeD2

msoThreeD3

msoThreeD4

msoThreeD5

msoThreeD6

msoThreeD7

msoThreeD8

msoThreeD9

msoThreeD10

msoThreeD11

msoThreeD12

msoThreeD13

msoThreeD14

msoThreeD15

msoThreeD16

msoThreeD17

msoThreeD18

msoThreeD19

msoThreeD20

Example

This example sets the extrusion format for shape one on myDocument to 3D Style 12 if the shape initially has a custom extrusion format.

VBA Copy code Copy code
Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(1).ThreeD

    If .PresetThreeDFormat = msoPresetThreeDFormatMixed Then

        .SetThreeDFormat msoThreeD12

    End If

End With

See also

Concepts

ThreeDFormat Object

Other resources

ThreeDFormat Object Members


OLEFormat.Object Property (PowerPoint)

 Copy code hover
[image]

OLEFormat.Object Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the object that represents the specified OLE object's top-level interface. Read-only.

Syntax

expression .Object

expression A variable that represents an OLEFormat object.

Return Value

Object

Remarks

This property allows you to access the properties and methods of the application in which an OLE object was created.

Use the TypeName function to determine the type of object this property returns for a specific OLE object.

Example

This example displays the type of object contained in shape one on slide one in the active presentation. Shape one must contain an OLE object.

VBA Copy code Copy code
MsgBox TypeName(ActivePresentation.Slides(1) _

    .Shapes(1).OLEFormat.Object)

This example displays the name of the application in which each embedded OLE object on slide one in the active presentation was created.

VBA Copy code Copy code
For Each s In ActivePresentation.Slides(1).Shapes

    If s.Type = msoEmbeddedOLEObject Then

        MsgBox s.OLEFormat.Object.Application.Name

    End If

Next

This example adds text to cell A1 on worksheet one in the Microsoft Excel workbook contained in shape three on slide one in the active presentation.

VBA Copy code Copy code
With ActivePresentation.Slides(1).Shapes(3)

    .OLEFormat.Object.Worksheets(1).Range("A1").Value = "New text"

End With

See also

Concepts

OLEFormat Object

Other resources

OLEFormat Object Members


Axis Methods (PowerPoint)

 Copy code hover
[image]

Axis Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Delete | Deletes the object.
Select | Selects the object.


TickLabels.Alignment Property (PowerPoint)

 Copy code hover
[image]

TickLabels.Alignment Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the alignment for the specified phonetic text or tick label. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Alignment

expression A variable that represents a TickLabels object.

See also

Concepts

TickLabels Object

Other resources

TickLabels Object Members


ChartGroup.Overlap Property (PowerPoint)

 Copy code hover
[image]

ChartGroup.Overlap Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Specifies how bars and columns are positioned. Read/write Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Overlap

expression A variable that represents a ChartGroup object.

Remarks

This property applies only to 2-D bar and 2-D column charts.

You can set this property to a value from -100 through 100. If this property is set to -100, bars are positioned so that there is one bar width between them. If the overlap is 0 (zero), there is no space between bars (one bar starts immediately after the preceding bar). If the overlap is 100, bars are positioned on top of each other.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the overlap for chart group one of the first chart in the active document to -50. You should run the example on a 2-D column chart that has two or more series.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.ChartGroups(1).Overlap = -50

    End If

End With

See also

Concepts

ChartGroup Object

Other resources

ChartGroup Object Members


PlotArea.Name Property (PowerPoint)

 Copy code hover
[image]

PlotArea.Name Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the name of the object. Read-only String.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Name

expression A variable that represents a PlotArea object.

See also

Concepts

PlotArea Object

Other resources

PlotArea Object Members


Interior.Creator Property (PowerPoint)

 Copy code hover
[image]

Interior.Creator Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Creator

expression A variable that represents an Interior object.

See also

Concepts

Interior Object

Other resources

Interior Object Members


ResampleMediaTasks Methods (PowerPoint)

 Copy code hover
[image]

ResampleMediaTasks Methods (PowerPoint)
Send feedback

Published: July 16, 2012

This object has the following methods:

Methods

Name | Description
Cancel | Cancels mobilization of the current media asset.
Item | Returns a single ResampleMediaTask object from the specified ResampleMediaTasks collection.
Pause | Pauses the media represented by the specified object.
Resume | Resumes mobilization of the current media asset.


MotionEffect.ToX Property (PowerPoint)

 Copy code hover
[image]

MotionEffect.ToX Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Sets or returns a Single that represents the horizontal position of a MotionEffect object, specified as a percent of the screen width. Read/write.

Syntax

expression .ToX

expression A variable that represents a MotionEffect object.

Return Value

Single

Remarks

The default value of this property is Empty, in which case the current position of the object is used.

Use this property in conjunction with the FromX property to resize or jump from one position to another.

Do not confuse this property with the To property of the ColorEffect , RotationEffect , or PropertyEffect objects, which is used to set or change colors, rotations, or other properties of an animation behavior, respectively.

Example

The following example adds an animation path and sets the starting and ending horizontal and vertical positions.

VBA Copy code Copy code
Sub AddMotionPath()

    Dim effCustom As Effect

    Dim animMotion As AnimationBehavior

    Dim shpRectangle As Shape

    'Adds shape and sets effect and animation properties

    Set shpRectangle = ActivePresentation.Slides(1).Shapes _

        .AddShape(Type:=msoShapeRectangle, Left:=100, _

        Top:=100, Width:=50, Height:=50)

    Set effCustom = ActivePresentation.Slides(1).TimeLine.MainSequence _

        .AddEffect(Shape:=shpRectangle, effectId:=msoAnimEffectCustom)

    Set animMotion = effCustom.Behaviors.Add(msoAnimTypeMotion)

    'Sets starting and ending horizontal and vertical positions

    With animMotion.MotionEffect

        .FromX = 0

        .FromY = 0

        .ToX = 50

        .ToY = 50

    End With

End Sub

See also

Concepts

MotionEffect Object

Other resources

MotionEffect Object Members


ChartBorder Object (PowerPoint)

 Copy code hover
[image]

ChartBorder Object (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the border of an object.

Version Information

Version Added: PowerPoint 2007

Remarks

Most bordered objects have a border that is treated as a single entity, regardless of how many sides it has. The entire border must be returned as a unit. To return a Border object, use the Border property for the particular bordered object (for example, the Border property of a TrendLine object).

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example changes the type and line style of a trendline on the active chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1).Chart.SeriesCollection(1).Trendlines(1)

    .Type = xlLinear

    .Border.LineStyle = xlDash

End With

See also

Concepts

PowerPoint Object Model Reference

Other resources

ChartBorder Object Members


ProtectedViewWindow.Edit Method (PowerPoint)

 Copy code hover
[image]

ProtectedViewWindow.Edit Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Changes the password of the ProtectedViewWindow object.

Version Information

Version Added: PowerPoint 2010

Syntax

expression .Edit(ModifyPassword)

expression A variable that represents a ProtectedViewWindow object.

Parameters

Name | Required/Optional | Data Type | Description
ModifyPassword | Optional | String | The new password to change to.

Return Value

Presentation

See also

Concepts

ProtectedViewWindow Object

Other resources

ProtectedViewWindow Object Members


ParagraphFormat.LineRuleAfter Property (PowerPoint)

 Copy code hover
[image]

ParagraphFormat.LineRuleAfter Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Determines whether line spacing after the last line in each paragraph is set to a specific number of points or lines. Read/write.

Syntax

expression .LineRuleAfter

expression A variable that represents a ParagraphFormat object.

Return Value

MsoTriState

Remarks

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

Constant | Description
msoFalse | Line spacing after the last line in each paragraph is set to a specific number of points.
msoTrue | Line spacing after the last line in each paragraph is set to a specific number of lines.

Example

This example displays a message box that shows the setting for space after paragraphs for the text in shape two on slide one in the active presentation.

VBA Copy code Copy code
With Application.ActivePresentation.Slides(1).Shapes(2).TextFrame

    With .TextRange.ParagraphFormat

        sa = .SpaceAfter

        If .LineRuleAfter Then

            saUnits = " lines"

        Else

            saUnits = " points"

        End If

    End With

End With

MsgBox "Current spacing after paragraphs: " & sa & saUnits

See also

Concepts

ParagraphFormat Object

Other resources

ParagraphFormat Object Members


Chart.DataTable Property (PowerPoint)

 Copy code hover
[image]

Chart.DataTable Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the chart data table. Read-only DataTable.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .DataTable

expression A variable that represents a Chart object.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example adds a data table with an outline border to the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.HasDataTable = True

        .Chart.DataTable.HasBorderOutline = True

    End If

End With

See also

Concepts

Chart Object

Other resources

Chart Object Members


NamedSlideShow.Name Property (PowerPoint)

 Copy code hover
[image]

NamedSlideShow.Name Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

You cannot use this property to set the name for a custom slide show. Use the Add method to redefine a custom slide show under a new name. Read-only.

Syntax

expression .Name

expression A variable that represents a NamedSlideShow object.

Return Value

String

Remarks

You can use the object's name in conjunction with the Item method to return a reference to the object if the Item method for the collection that contains the object takes a Variant argument. For example, if the value of the Name property for a shape is Rectangle 2, then .Shapes("Rectangle 2") will return a reference to that shape.

See also

Concepts

NamedSlideShow Object

Other resources

NamedSlideShow Object Members


FullSeriesCollection.Item Method (PowerPoint)

 Copy code hover
[image]

FullSeriesCollection.Item Method (PowerPoint)
Send feedback

Returns an individual Series object from the collection.

Version information

Version Added: PowerPoint 2013

Syntax

expression .Item(Index)

expression A variable that represents a FullSeriesCollection object.

Parameters

Name | Required/Optional | Data type | Description
Index | Required | VARIANT | The name or index number of the item to return.
Index | Required | VARIANT |

Return value

Series


SlideRange.Background Property (PowerPoint)

 Copy code hover
[image]

SlideRange.Background Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a ShapeRange object that represents the slide background.

Syntax

expression .Background

expression A variable that represents a SlideRange object.

Return Value

ShapeRange

Remarks

If you use the Background property to set the background for an individual slide without changing the slide master, the FollowMasterBackground property for that slide must be set to False.

Example

This example sets the background of the slide master in the active presentation to a preset shade.

VBA Copy code Copy code
ActivePresentation.SlideMaster.Background.Fill.PresetGradient _

    Style:=msoGradientHorizontal, Variant:=1, _

    PresetGradientType:=msoGradientLateSunset

This example sets the background of slide one in the active presentation to a preset shade.

VBA Copy code Copy code
With ActivePresentation.Slides(1)

    .FollowMasterBackground = False

    .Background.Fill.PresetGradient Style:=msoGradientHorizontal, _

        Variant:=1, PresetGradientType:=msoGradientLateSunset

End With

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


ResampleMediaTasks Members (PowerPoint)

 Copy code hover
[image]

ResampleMediaTasks Members (PowerPoint)
Send feedback

Published: July 16, 2012

A collection of ResampleMediaTask objects.

Methods

Name | Description
Cancel | Cancels mobilization of the current media asset.
Item | Returns a single ResampleMediaTask object from the specified ResampleMediaTasks collection.
Pause | Pauses the media represented by the specified object.
Resume | Resumes mobilization of the current media asset.

Properties

Name | Description
Count | Returns the number of objects in the specified collection. Read-only.
PercentComplete | Returns the percentage of completion of the sample. Read-only.


HiLoLines Methods (PowerPoint)

 Copy code hover
[image]

HiLoLines Methods (PowerPoint)
Send feedback

This object has the following methods:

Methods

Name | Description
Delete | Deletes the object.
Select | Selects the object.


SlideShowView Members (PowerPoint)

 Copy code hover
[image]

SlideShowView Members (PowerPoint)
Send feedback

Published: July 12, 2012

Represents the view in a slide show window.

Methods

Name | Description
DrawLine | Draws a line in the specified slide show view.
EndNamedShow | Switches from running a custom, or named, slide show to running the entire presentation of which the custom show is a subset. When the slide show advances from the current slide, the next slide displayed will be the next one in the entire presentation, not the next one in the custom slide show.
EraseDrawing | Removes lines drawn during a slide show by using either the DrawLine method or the pen tool.
Exit | Ends the specified slide show.
First | Sets the specified slide show view to display the first slide in the presentation.
FirstAnimationIsAutomatic | Returns True if the current slide has an initial animation that runs automically.
GetClickCount | Returns the number of mouse clicks that are defined for a slide.
GetClickIndex | Returns the index number of the current mouse click for an animation that is actively playing on a slide or has just finished.
GotoClick | Plays an animation associated with a specified mouse click and any animations that follow on the slide.
GotoNamedShow | Switches to the specified custom, or named, slide show during another slide show. When the slide show advances from the current slide, the next slide displayed will be the next one in the specified custom slide show, not the next one in current slide show.
GotoSlide | Switches to the specified slide during a slide show. You can specify whether you want the animation effects to be rerun.
Last | Sets the specified slide show view to display the last slide in the presentation.
Next | Displays the slide immediately following the slide that's currently displayed.
Player | Allows access to playback controls for the associated view in the current window.
Previous | Shows the slide immediately preceding the slide that's currently displayed.
ResetSlideTime | Resets the elapsed time (represented by the SlideElapsedTime property) for the slide that's currently displayed to 0 (zero).

Properties

Name | Description
AcceleratorsEnabled | Determines whether shortcut keys are enabled during a slide show. Read/write.
AdvanceMode | Returns a value that indicates how the slide show in the specified view advances. Read-only.
Application | Returns an Application object that represents the creator of the specified object.
CurrentShowPosition | Returns the position of the current slide within the slide show that is showing in the specified view. Read-only.
IsNamedShow | Determines whether a custom (named) slide show is displayed in the specified slide show view. Read-only.
LastSlideViewed | Returns a Slide object that represents the slide viewed immediately before the current slide in the specified slide show view.
MediaControlsHeight | Returns the height of the media control bounding box. Read-only.
MediaControlsLeft | Returns the distance, in points, from the left edge of the media control bounding box to the left edge of the Slide. Read-only.
MediaControlsTop | Returns the distance, in points, from the top edge of the media control bounding box to the top edge of the Slide object. Read-only.
MediaControlsVisible | Indicates whether the media controls are visible. Read-only.
MediaControlsWidth | Returns the width, in points, of the media control bounding box. Read-only.
Parent | Returns the parent object for the specified object.
PointerColor | Returns a ColorFormat object that represents the pointer color for the specified presentation during one slide show. Read-only.
PointerType | Returns or sets the type of pointer used in the slide show. Read/write.
PresentationElapsedTime | Returns the number of seconds that have elapsed since the beginning of the specified slide show. Read-only.
Slide | Returns a Slide object that represents the slide that's currently displayed in the specified slide show window view. Read-only.
SlideElapsedTime | Returns the number of seconds that the current slide has been displayed. Read/write.
SlideShowName | Returns the name of the custom slide show that's currently running in the specified slide show view. Read-only.
State | Returns or sets the state of the slide show. Read/write.
Zoom | Returns the zoom setting of the specified slide show window view as a percentage of normal size. Read-only.


LegendEntry.Top Property (PowerPoint)

 Copy code hover
[image]

LegendEntry.Top Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the distance, in points, from the top edge of the object to the top of the first row (on a worksheet) or the top of the chart area (on a chart). Read-only Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Top

expression A variable that represents a LegendEntry object.

See also

Concepts

LegendEntry Object

Other resources

LegendEntry Object Members


XlConstants Enumeration (PowerPoint)

 Copy code hover
[image]

XlConstants Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies a miscellaneous constant in Microsoft Word.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
xl3DBar | -4099 | Three-dimensional bar chart group or series.
xl3DSurface | -4103 | Three-dimensional surface chart group or series.
xlAbove | 0 | The summary row is displayed above the specified range.
xlAutomatic | -4105 | Word applies automatic settings, such as a color or page number, to the specified object.
xlBar | 2 | Two-dimensional bar chart group or series.
xlBelow | 1 | The summary row is displayed below the specified range.
xlBoth | 1 | Display positive and negative error bars in the specified chart group or series.
xlBottom | -4107 | Bottom.
xlCenter | -4108 | Center.
xlChecker | 9 | Checker pattern.
xlCircle | 8 | Circle.
xlColumn | 3 | Columnar chart group or series.
xlCombination | -4111 | Combination.
xlCorner | 2 | Corner.
xlCrissCross | 16 | Criss-cross pattern.
xlCross | 4 | Cross pattern.
xlCustom | -4114 | Word applies custom settings, such as a color or error amount, to the specified object.
xlDefaultAutoFormat | -1 | Word applies default or automatic formatting.
xlDiamond | 2 | Diamond pattern.
xlDistributed | -4117 | Distributed.
xlFill | 5 | Fill.
xlFixedValue | 1 | Display error amounts as a fixed value.
xlGeneral | 1 | General.
xlGray16 | 17 | 16% gray pattern.
xlGray25 | -4124 | 25% gray pattern.
xlGray50 | -4125 | 50% gray pattern.
xlGray75 | -4126 | 75% gray pattern.
xlGray8 | 18 | 8% gray pattern.
xlGrid | 15 | Grid pattern.
xlHigh | -4127 | High.
xlInside | 2 | Inside.
xlJustify | -4130 | Justify.
xlLeft | -4131 | Left.
xlLightDown | 13 | Light down line pattern.
xlLightHorizontal | 11 | Light horizontal line pattern.
xlLightUp | 14 | Light up line pattern.
xlLightVertical | 12 | Light vertical line pattern.
xlLow | -4134 | Low.
xlMaximum | 2 | Maximum.
xlMinimum | 4 | Minimum.
xlMinusValues | 3 | Minus values.
xlNextToAxis | 4 | Next to axis.
xlNone | -4142 | Do not display error bars in the specified chart group or series.
xlOpaque | 3 | Opaque fill.
xlOutside | 3 | Outside.
xlPercent | 2 | Display error amounts as a percentage.
xlPlus | 9 | Display positive error bars in the specified chart group or series.
xlPlusValues | 2 | Plus values.
xlRight | -4152 | Right.
xlScale | 3 | Scale.
xlSemiGray75 | 10 | 75% semi-gray pattern.
xlShowLabel | 4 | Show label.
xlShowLabelAndPercent | 5 | Show label and percent.
xlShowPercent | 3 | Show percent.
xlShowValue | 2 | Show value.
xlSingle | 2 | Single line.
xlSolid | 1 | Solid pattern.
xlSquare | 1 | Square.
xlStar | 5 | Star.
xlStError | 4 | Display error amounts as a standard error.
xlTop | -4160 | Top.
xlTransparent | 2 | Transparent fill.
xlTriangle | 3 | Triangle.


DataLabel Members (PowerPoint)

 Copy code hover
[image]

DataLabel Members (PowerPoint)
Send feedback

Published: July 16, 2012

Represents the data label on a chart point or trendline.

Methods

Name | Description
Delete | Deletes the object.
Select | Selects the object.

Properties

Name | Description
Application | When used without an object qualifier, returns an Application object that represents the Microsoft PowerPoint application. When used with an object qualifier, returns an Application object that represents the creator of the specified object (you can use this property with an Automation object to return the application of that object). Read-only.
AutoText | True if the object automatically generates appropriate text based on context. Read/write Boolean.
Caption | Returns or sets the data label text. Read/write String.
Characters | Returns a ChartCharacters object that represents a range of characters within the object text. You can use the ChartCharacters object to format characters within a text string.
Creator | Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Format | Returns the line, fill, and effect formatting for the object. Read-only ChartFormat.
Formula | Returns or sets the object's formula in A1-style notation. Read/write.
FormulaLocal | Returns or sets the formula for the object, using A1-style references in the language of the user. Read/write String.
FormulaR1C1 | Returns or sets the formula for the object, using R1C1-style notation in the language of the macro. Read/write String.
FormulaR1C1Local | Returns or sets the formula for the object, using R1C1-style notation in the language of the user. Read/write String.
Height | Returns the height, in points, of the object. Read-only.
HorizontalAlignment | Returns or sets the horizontal alignment for the specified object. Read/write Variant.
Left | Returns or sets the distance, in points, from the left edge of the object to the left edge of the chart area. Read/write Double.
Name | Returns the name of the object. Read-only String.
NumberFormat | Returns or sets the format code for the object. Read/write String.
NumberFormatLinked | True if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). Read/write Boolean.
NumberFormatLocal | Returns or sets the format code for the object as a string in the language of the user. Read/write Variant.
Orientation | Returns or sets the text orientation. Read/write Long.
Parent | Returns the parent for the specified object. Read-only Object.
Position | Returns or sets the position of the data label. Read/write XlDataLabelPosition.
ReadingOrder | Returns or sets an XlReadingOrder constant that represents the reading order for the specified object. Read/write Long.
Separator | Returns or sets the separator used for the data labels on a chart. Read/write Variant.
Shadow | Returns or sets a value that indicates whether the object has a shadow. Read/write Boolean.
ShowBubbleSize | True to show the bubble size for the data labels on a chart. False to hide the bubble size. Read/write Boolean.
ShowCategoryName | True to display the category name for the data labels on a chart. False to hide the category name. Read/write Boolean.
ShowLegendKey | True if the data label legend key is visible. Read/write Boolean.
ShowPercentage | True to display the percentage value for the data labels on a chart. False to hide the value. Read/write Boolean.
ShowRange | Set to True to display the Value From Cells range field for the specified chart data label. Set to False to hide that field. Read/write Boolean.
ShowSeriesName | True to show the series name for the data labels on a chart. False to hide the series name. Read/write Boolean.
ShowValue | True to display a specified chart's data label values. False to hide the values. Read/write Boolean.
Text | Returns or sets the text for the specified object. Read/write String.
Top | Returns or sets the distance, in points, from the top edge of the object to the top of the first row (on a worksheet) or the top of the chart area (on a chart). Read/write Double.
VerticalAlignment | Returns or sets the vertical alignment of the specified object. Read/write Variant.
Width | Returns the width, in points, of the object. Read-only.


TextStyleLevels.Parent Property (PowerPoint)

 Copy code hover
[image]

TextStyleLevels.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a TextStyleLevels object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

TextStyleLevels Object

Other resources

TextStyleLevels Object Members


Sequence.AddEffect Method (PowerPoint)

 Copy code hover
[image]

Sequence.AddEffect Method (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Effect object that represents a new animation effect added to a sequence of animation effects.

Syntax

expression .AddEffect(Shape, effectId, Level, trigger, Index)

expression A variable that represents a Sequence object.

Parameters

Name | Required/Optional | Data Type | Description
Shape | Required | Shape | The shape to which the animation effect is added.
effectId | Required | MsoAnimEffect | The animation effect to be applied.
Level | Optional | MsoAnimateByLevel | For charts, diagrams, or text, the level to which the animation effect will be applied. The default value is msoAnimationLevelNone.
trigger | Optional | MsoAnimTriggerType | The action that triggers the animation effect. The default value is msoAnimTriggerOnPageClick.
Index | Optional | Long | The position at which the effect will be placed in the collection of animation effects. The default value is -1 (added to the end).

Return Value

Effect

Example

The following example adds a bouncing animation to the first shape range on the first slide. This example assumes a shape range containing one or more shapes is selected on the first slide.

VBA Copy code Copy code
Sub AddBouncingAnimation()

    Dim sldActive As Slide

    Dim shpSelected As Shape

    Set sldActive = ActiveWindow.Selection.SlideRange(1)

    Set shpSelected = ActiveWindow.Selection.ShapeRange(1)

    ' Add a bouncing animation.

    sldActive.TimeLine.MainSequence.AddEffect _

        Shape:=shpSelected, effectId:=msoAnimEffectBounce

End Sub

See also

Concepts

Sequence Object

Other resources

Sequence Object Members


ShapeRange.MergeShapes Method (PowerPoint)

 Copy code hover
[image]

ShapeRange.MergeShapes Method (PowerPoint)
Send feedback

Combines all of the shapes in the range to create a single new shape.

Version information

Version Added: PowerPoint 2013

Syntax

expression .MergeShapes(MergeCmd,PrimaryShape)

expression A variable that represents a ShapeRange object.

Parameters

Name | Required/Optional | Data type | Description
MergeCmd | Required | MsoMergeCmd | The merge operation to perform on the shape range.
PrimaryShape | Optional | Shape | The shape that the resulting shape inherits its formatting from.
MergeCmd | Required | <unknown |
PrimaryShape | Optional | SHAPE |

Return value

VOID


PpBorderType Enumeration (PowerPoint)

 Copy code hover
[image]

PpBorderType Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Indicates the direction in which a cell border or diagonal line is drawn.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppBorderBottom | 3 | Bottom
ppBorderDiagonalDown | 5 | Diagonally down
ppBorderDiagonalUp | 6 | Diagonally up
ppBorderLeft | 2 | Left
ppBorderRight | 4 | Right
ppBorderTop | 1 | Top


Axis.Border Property (PowerPoint)

 Copy code hover
[image]

Axis.Border Property (PowerPoint)
Send feedback

Published: July 16, 2012

Returns the border of the object. Read-only ChartBorder.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Border

expression A variable that represents an Axis object.


PpDirection Enumeration (PowerPoint)

 Copy code hover
[image]

PpDirection Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Specifies the layout direction for text, table cells , or user interface.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppDirectionLeftToRight | 1 | Left-to-right layout
ppDirectionMixed | -2 | Mixed layout
ppDirectionRightToLeft | 2 | Right-to-left layout


Axis.MinorUnit Property (PowerPoint)

 Copy code hover
[image]

Axis.MinorUnit Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the minor units on the value axis. Read/write Double.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .MinorUnit

expression A variable that represents an Axis object.

Remarks

Setting this property sets the MinorUnitIsAuto property to False.

Use the TickMarkSpacing property to set tick-mark spacing on the category axis.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the major and minor units for the value axis of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.Axes(xlValue)

            .MajorUnit = 100

            .MinorUnit = 20

        End With

    End If

End With

See also

Concepts

Axis Object

Other resources

Axis Object Members


SlideRange.Comments Property (PowerPoint)

 Copy code hover
[image]

SlideRange.Comments Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns a Comments object that represents a collection of comments. Read-only.

Syntax

expression .Comments

expression A variable that represents a SlideRange object.

Return Value

Comments

Example

The following example adds a comment to a slide.

VBA Copy code Copy code
Sub AddNewComment()

    ActivePresentation.Slides(1).Comments.Add _

        Left:=0, Top:=0, Author:="John Doe", AuthorInitials:="jd", _

        Text:="Please check this spelling again before the next draft."

End Sub

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


Series.Values Property (PowerPoint)

 Copy code hover
[image]

Series.Values Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets a collection of all the values in the series. Read/write Variant.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Values

expression A variable that represents a Series object.

Remarks

The value of this property can be either the address of a range on the chart's worksheet or an array of constant values, but not a combination of both. See the examples for details.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the series values from a range address.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).Values = "=Sheet1!B2:B5"

    End If

End With

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

To assign a constant value to each individual data point, you must use an array, as shown in the following example.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).Values = _

            Array(1, 3, 5, 7, 11, 13, 17, 19)

    End If

End With

See also

Concepts

Series Object

Other resources

Series Object Members


ChartFormat.Adjustments Property (PowerPoint)

 Copy code hover
[image]

ChartFormat.Adjustments Property (PowerPoint)
Send feedback

Returns an Adjustments object that contains a collection of adjustment values for the specified Chart Format object.

Version information

Version Added: PowerPoint 2013

Syntax

expression .Adjustments

expression A variable that represents a ChartFormat object.

Property value

ADJUSTMENTS


SlideRange.Count Property (PowerPoint)

 Copy code hover
[image]

SlideRange.Count Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the number of objects in the specified collection. Read-only.

Syntax

expression .Count

expression A variable that represents a SlideRange object.

Return Value

Long

Example

This example closes all windows except the active window.

VBA Copy code Copy code
With Application.Windows

    For i = 2 To .Count

        .Item(2).Close

    Next

End With

See also

Concepts

SlideRange Object

Other resources

SlideRange Object Members


ShapeRange.OLEFormat Property (PowerPoint)

 Copy code hover
[image]

ShapeRange.OLEFormat Property (PowerPoint)
See also Send feedback

Published: July 12, 2012

Returns an OLEFormat object that contains OLE formatting properties for the specified shape. Applies to Shape or ShapeRange objects that represent OLE objects. Read-only.

Syntax

expression .OLEFormat

expression A variable that represents a ShapeRange object.

Return Value

OLEFormat

Example

This example loops through all the objects on all the slides in the active presentation and sets all linked Microsoft Word documents to be updated manually.

VBA Copy code Copy code
For Each sld In ActivePresentation.Slides

    For Each sh In sld.Shapes

        If sh.Type = msoLinkedOLEObject Then

            If sh.OLEFormat.ProgID = "Word.Document" Then

                sh.LinkFormat.AutoUpdate = ppUpdateOptionManual

            End If

        End If

    Next

Next

See also

Concepts

ShapeRange Object

Other resources

ShapeRange Object Members


CustomLayout.MatchingName Property (PowerPoint)

 Copy code hover
[image]

CustomLayout.MatchingName Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Represents the internal name of the specified custom layout. Read/write.

Syntax

expression .MatchingName

expression A variable that represents a CustomLayout object.

Return Value

String

See also

Concepts

CustomLayout Object

Other resources

CustomLayout Object Members


PpSlideLayout Enumeration (PowerPoint)

 Copy code hover
[image]

PpSlideLayout Enumeration (PowerPoint)
Send feedback

Published: July 16, 2012

Constants that specify the layout of the slide, passed to and returned by the Layout property of the Slide and SlideRange objects.

Version Information

Version Added: PowerPoint 2007

Name | Value | Description
ppLayoutBlank | 12 | Blank
ppLayoutChart | 8 | Chart
ppLayoutChartAndText | 6 | Chart and text
ppLayoutClipartAndText | 10 | Clipart and text
ppLayoutClipArtAndVerticalText | 26 | ClipArt and vertical text
ppLayoutCustom | 32 | Custom
ppLayoutFourObjects | 24 | Four objects
ppLayoutLargeObject | 15 | Large object
ppLayoutMediaClipAndText | 18 | MediaClip and text
ppLayoutMixed | -2 | Mixed
ppLayoutObject | 16 | Object
ppLayoutObjectAndText | 14 | Object and text
ppLayoutObjectAndTwoObjects | 30 | Object and two objects
ppLayoutObjectOverText | 19 | Object over text
ppLayoutOrgchart | 7 | Organization chart
ppLayoutTable | 4 | Table
ppLayoutText | 2 | Text
ppLayoutTextAndChart | 5 | Text and chart
ppLayoutTextAndClipart | 9 | Text and clipart
ppLayoutTextAndMediaClip | 17 | Text and MediaClip
ppLayoutTextAndObject | 13 | Text and object
ppLayoutTextAndTwoObjects | 21 | Text and two objects
ppLayoutTextOverObject | 20 | Text over object
ppLayoutTitle | 1 | Title
ppLayoutTitleOnly | 11 | Title only
ppLayoutTwoColumnText | 3 | Two-column text
ppLayoutTwoObjects | 29 | Two objects
ppLayoutTwoObjectsAndObject | 31 | Two objects and object
ppLayoutTwoObjectsAndText | 22 | Two objects and text
ppLayoutTwoObjectsOverText | 23 | Two objects over text
ppLayoutVerticalText | 25 | Vertical text
ppLayoutVerticalTitleAndText | 27 | Vertical title and text
ppLayoutVerticalTitleAndTextOverChart | 28 | Vertical title and text over chart


ParagraphFormat.FarEastLineBreakControl Property (PowerPoint)

 Copy code hover
[image]

ParagraphFormat.FarEastLineBreakControl Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns or sets the line break control option if you have an Asian language setting specified. Read/write.

Syntax

expression .FarEastLineBreakControl

expression A variable that represents a ParagraphFormat object.

Return Value

MsoTriState

Remarks

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

msoFalse | The line break control option is not selected.
msoTrue | The line break control option is selected.

Example

This example selects the line break option for the text in shape one on the first slide of the active presentation.

VBA Copy code Copy code
ActivePresentation.Slides(1).Shapes(1).TextFrame.TextRange.ParagraphFormat.FarEastLineBreakControl = msoTrue

See also

Concepts

ParagraphFormat Object

Other resources

ParagraphFormat Object Members


PropertyEffect.Application Property (PowerPoint)

 Copy code hover
[image]

PropertyEffect.Application Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns an Application object that represents the creator of the specified object.

Syntax

expression .Application

expression A variable that represents a PropertyEffect object.

Return Value

Application

Example

In this example, a Presentation object is passed to the procedure. The procedure adds a slide to the presentation and then saves the presentation in the folder where Microsoft PowerPoint is running.

VBA Copy code Copy code
Sub AddAndSave(pptPres As Presentation)

    pptPres.Slides.Add 1, 1

    pptPres.SaveAs pptPres.Application.Path & "\Added Slide"

End Sub

This example displays the name of the application that created each linked OLE object on slide one in the active presentation.

VBA Copy code Copy code
For Each shpOle In ActivePresentation.Slides(1).Shapes

    If shpOle.Type = msoLinkedOLEObject Then

        MsgBox shpOle.OLEFormat.Application.Name

    End If

Next

See also

Concepts

PropertyEffect Object

Other resources

PropertyEffect Object Members


TickLabels.Depth Property (PowerPoint)

 Copy code hover
[image]

TickLabels.Depth Property (PowerPoint)
Send feedback

Published: July 16, 2012

Returns the number of levels of category tick labels. Read-only Long.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Depth

expression A variable that represents a TickLabels object.


Axis.MajorUnitIsAuto Property (PowerPoint)

 Copy code hover
[image]

Axis.MajorUnitIsAuto Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

True if Microsoft Word calculates the major units for the value axis. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .MajorUnitIsAuto

expression A variable that represents an Axis object.

Remarks

Setting the MajorUnit property sets this property to False.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example automatically sets the major and minor units for the value axis of the first chart in the active document.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.Axes(xlValue)

            .MajorUnitIsAuto = True

            .MinorUnitIsAuto = True

        End With

    End If

End With

See also

Concepts

Axis Object

Other resources

Axis Object Members


Series.Smooth Property (PowerPoint)

 Copy code hover
[image]

Series.Smooth Property (PowerPoint)
Send feedback

Published: July 16, 2012

True if curve smoothing is enabled for the line chart or scatter chart. Read/write Boolean.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Smooth

expression A variable that represents a Series object.

Remarks

This property applies only to line and scatter charts.

Example

Note Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example enables curve smoothing for series one for the first chart in the active document. You should run the example on a 2-D line chart.

VBA Copy code Copy code
With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).Smooth = True

    End If

End With


Sequence.Parent Property (PowerPoint)

 Copy code hover
[image]

Sequence.Parent Property (PowerPoint)
See also Send feedback

Published: July 16, 2012

Returns the parent object for the specified object.

Syntax

expression .Parent

expression A variable that represents a Sequence object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

VBA Copy code Copy code
Set myShapes = ActivePresentation.Slides(1).Shapes

With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _

        Top:=50, Width:=300, Height:=150).TextFrame

    .TextRange.Text = "Test text"

    .Parent.Rotation = 45

End With

See also

Concepts

Sequence Object

Other resources

Sequence Object Members