Does it work if you change the array to
Are CH31 or TB10 minimized? I had problems with this before, please, try to have them restored or maximized before you try your code.
Also, I had problems with this type of code when QV would take long to copy and paste the object. You can try to include a
Hope it helps,
thanks. there was an error in your string (missing the " " for each item):
When I copy those, it does not position the bitmap properly on the document and it copies both graph on the same slide.
So correction of this would work but would extend dramatically the code if 10 or 15 items must be pasted....
Items are not minimized
Thanks for the tip on the WaitforIdle.
I tried again with your array and was able to use it.
I also checked and you need to change the slides.add( 1, 1 ) including a counter.
Your code should be like this:
Dim myArray(3)'change (2) by number of items to export
myArray(0) = "CH01"
myArray(1) = "CH02" 'add chart or table reference in reverse order of slide
myArray(2) = "CH03"
'Create ppt object
Set objPPT = CreateObject("PowerPoint.Application")
objPPT.Visible = True
Set objPresentation = objPPT.Presentations.Add
For i =0 to 2
Set PPSlide = objPresentation.Slides.Add(i+1,1) msgbox myArray(i) ActiveDocument.GetSheetObject(myArray(i)).CopyBitmapToClipboard PPSlide.Shapes.Paste with PPSlide.Shapes(PPSlide.Shapes.Count) .left = 0 .top = 200 .width=720 end with
Hope this helps,