粘贴到PowerPoint

时间:2017-05-20 08:02:02

标签: excel vba excel-vba excel-charts

我已使用以下功能制作并格式化我的图表。

Function CreateTwoValuesPie(ByVal x As Long, ByVal Y As Long) As Chart
Set CreateTwoValuesPie = charts.Add
  CreateTwoValuesPie.ChartType = XlChartType.xlDoughnut
  With CreateTwoValuesPie.SeriesCollection.NewSeries
    .Values = Array(x, Y)
  End With
  With CreateTwoValuesPie
    .ChartGroups(1).DoughnutHoleSize = 20
    .ChartArea.Format.Fill.Visible = msoFalse
    .Legend.Delete
  End With

End Function

我试图将我的图表复制到PowerPoint幻灯片中,但看起来也没有复制孔大小的格式。我使用以下代码创建,复制并粘贴我的图表到powerpoint。

Set oPPTShape10 = oPPTFile.Slides(1)
'EarlyAdoption
d11 = Format(Dashboard.EAScore1.Caption, "Standard")
Set ch = CreateTwoValuesPie(d11, 10 - d11)

With ch
.CopyPicture _
Appearance:=xlScreen, Size:=xlScreen, Format:=xlPicture
End With

With oPPTShape10.Shapes.Paste
.Top = 200
.Left = 200
.Width = 300
End With

代码在PowerPoint中给出了以下图表。 PowerPoint Chart

这显然没有我想要的孔尺寸20。复制到PowerPoint时如何修复图表的格式?谢谢!

0 个答案:

没有答案