Skip to content

Latest commit

 

History

History
54 lines (34 loc) · 1010 Bytes

Project.chart.copy.md

File metadata and controls

54 lines (34 loc) · 1010 Bytes
title keywords f1_keywords ms.service ms.assetid ms.date ms.localizationpriority
Chart.Copy method (Project)
vbapj.chm131611
vbapj.chm131611
project-server
92627648-016a-0a69-52b8-bb24b1ea22d3
06/08/2017
medium

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

[!includeSupport and feedback]