You have to loop through the list of charts, and in each loop, copy one
chart, then paste it, then in the next loop, copy another chart, then paste
it.
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. -
http://PeltierTech.com
_______
"shelfish" <(E-Mail Removed)> wrote in message
news:8b73990c-bec1-4626-bf9d-(E-Mail Removed)...
> Ok, I've searched this group for while and cannot find any solution to
> this so here goes...
>
> Please ignore syntax errors as this is strongly paraphrased from the
> actual code. I'm just looking for a way to accomplish the
> objective....
> ********************************************************************************
> Dim PictureArray as variant = Array(chart1, chart2, chart3....)
> Dim elementCount as int = PictureArray.Elements.count
> Dim i
>
> 'COPY EXCEL CHARTS TO ARRAY AS PICTURES
> For i = 1 To elementCount
>
> With PictureArray(i)
> .Select
> [some code removed]
>
> 'COPY CHART AS PICTURE
> PictureArray(i) = .CopyPicture(Appearance:=xlScreen,
> Size:=xlScreen, Format:=xlPicture)
>
> End With
> Next
>
> 'START POWERPOINT
> Set PPApp =
> CreateObject("PowerPoint.Application")
> PPApp.Visible = True
>
> 'NEW PRESENTATION
> Set PPPres = PPApp.Presentations.Add
>
> [more code removed]
>
> 'ADD NEW SLIDE TO THE END
> SlideCount = PPPres.Slides.Count
> Set PPSlide = PPPres.Slides.Add(SlideCount + 1,
> ppLayoutTitleOnly)
> PPApp.ActiveWindow.View.GotoSlide PPSlide.SlideIndex
>
>
> 'PASTE PICTURE ARRAY ELEMENTS
> For i = 1 To elementCount
> With PPSlide
>
> 'PASTE IMAGE FROM ARRAY
> On Error Resume Next
> .Shapes.Paste (copyPasteArray(i))
> .Shapes(i + 1).Select
>
> End With
> Next
> *****************************************************************************************
>
> This last part just pastes the last item copied to the clip board. So
> the question is, how do I do all the copying and then all the
> pasting.
>
> Many thanks for any assistance offered.
>
> S.