Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
How can I paste chart in particular shape in PPT slide?
This is part of code:
Set CurrChart = ActiveDocument.GetSheetObject("CH01")CurrChart.RestoreCurrChart.ActivateAPP.Sleep 360ActiveDocument.GetSheetObject("CH01").CopyBitmapToClipboard
With PPSlide.Shapes(3).Paste .LockAspectRatio = false.Left = 510.Top = 130.Width = 374.Height = 165End With
I want to paste chart in shape 3, but it is not working - script stops and macro edit module opens.
How can I achieve this?
Thanks!
If you take a closer look at the Microsoft PowerPoint Object Model you will find that there is no "Paste" method for a "Slide" object.
So
PPSlide.Shapes(3).Paste
cannot work...
Furthermore the With statement should be used with an object and not on a method.
The Shapes object however has a Paste method so something like this might work:
Set pastedShape = PPSlide.Shapes.PasteWith pastedShape .LockAspectRatio = False .Left = 510 .Top = 130 .Width = 374 .Height = 165End With