Table of contents
Collapse the table of content
Expand the table of content

Chart.Paste Method (PowerPoint)

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

Pastes chart data from the Clipboard into the chart.


expression. Paste( Type )

expression A variable that represents a Chart object.


NameRequired/OptionalData TypeDescription
TypeOptionalVariantSpecifies the chart information to paste if a chart is on the Clipboard. Can be one of the following values:
-4104Everything will be pasted. This is the default value.
-4122Copied source formats are pasted.
-4123Formulas are pasted.


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.

With ActiveDocument.InlineShapes(1)
    If .HasChart Then
        .Chart.ChartData.Workbook. _
    End If
End With

See also


Chart Object

© 2018 Microsoft