Discussion Board for collaboration related to QlikView App Development.
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?
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.
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