Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to copy some charts to PowerPoint. This works fine if the charts are on the same sheet.
When I try to copy a chart from a different sheet, the 'CopyBitmapToClipboard' command fails and the previous item on the clipboard is pasted again.
Any ideas?
.
.
.
ActiveDocument.GetSheetObject("CH128").CopyBitmapToClipboard
PPSlide.Shapes.Paste
.
.
.
ActiveDocument.Sheets("Charts").Activate
ActiveDocument.GetSheetObject("CH131").CopyBitmapToClipboard 'this command fails unless the chart is on the same sheet as the previous
PPSlide.Shapes.Paste
Could you use CopyObject?
Hello,
I experienced similar troubles with Copy/Paste to Excel.
I found that my QV app is too slow for my script code 😉
When activating a different sheet, the sheet needs some time to get populated.
It is the same thing as you do it manually ... sometimes the controls/ charts show the sandglass until they are finally populated.
Doing a Copy/Paste at that time failed.
I resolved that by using the WaitForIdle command in QV.
This command holds the script until QV is done with whatever it is currently doing ... like populating charts.
It worked for me, it migh work for you.
Thilo
No need to make macros for this - just use a tool like NPrinting (www.nprinting.com) - that will look after all your extraction to Excel, PowerPoint and so on. It can also filter data based on who's going to receive it and schedule distribution of the output. Definitely worth a look.