Programatically (VBA) copy and paste all objects from a slide of anon-active presentation to current

Q

quiquejbb

Hey there,

I am trying to programatically copy all the contents of a specific
slide of a non-active presentation (powerpoint) into the current slide
of my active presentation.

If anyone can help me out with this I would really appreciate it.

All the best
 
S

Shyam Pillai

You can access all the presentations that are open by their index numbers.
So to copy shapes from a specific slide you could use:

If Presentations(1).Slides(2).Shapes.Count > 0 Then
'Copy all shapes on the slide
Presentations(1).Slides(2).Shapes.Range.Copy

' Paste into the active slide
ActiveWindow.Selection.SlideRange.Shapes.Paste
End If


Regards,
Shyam Pillai

Image Importer Wizard
http://skp.mvps.org/iiw.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top