Chart.Copy method (Project)

Copies a chart.

Syntax

expression.Copy

expression A variable that represents a Chart object.

Return value

Variant

Example

The following example copies the chart and then pastes the chart as a picture on the active report.

Sub CopyAndPasteChart()
    Dim chartShape As Shape
    Dim reportName As String
    Dim duplicateChart As Chart
    
    reportName = "Simple scalar chart"
    Set chartShape = ActiveProject.Reports(reportName).Shapes(1)
    
    chartShape.Chart.Copy
    Application.PasteAsPicture
End Sub

See also

Chart Object CopyPicture Method

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.