Consulting

Results 1 to 3 of 3

Thread: Copy content from slide in file 1 and paste on file 2

  1. #1

    Copy content from slide in file 1 and paste on file 2

    Hello,

    I am using PPT 2010 and I am searching for a code which can copy only the content of a particular slides in a different presentation (an autoshape or group of shapes). Currently I am able to insert the whole slide into an active presentation with the below code, but I am not getting correct set of codes to copy just the content of that slide.

    Sub slidecontent()
    Dim objPresentation As Presentation
    Dim i As Integer
    Set objPresentation = Presentations.Open("C:\Desktop\repository 1.pptx")
    For i = 1 To objPresentation.Slides.Count
    objPresentation.Slides.Item(i).Copy
    Presentations.Item(1).Slides.Paste
    Presentations.Item(1).Slides.Item(Presentations.Item(1).Slides.Count).Desig n = objPresentation.Slides.Item(i).Design
    Next i
    objPresentation.Close
    End Sub


    Please can someone me with the correct set of codes.

  2. #2
    I have a set of slides which has multiple grouped autoshapes on each slide called the "repository.pptx".
    I am searching for a code which copies a specific grouped object from any of these slides and paste to the active presentation.

    I got the piece that copies the object to the active presentation.

    Sub copyobject()
    Dim objPresentation As Presentation
    Set objPresentation = Presentations.Open("\Desktop\repository.pptx")
    Dim PPShape As Object
    objPresentation.Slides.Item(1).Shapes("Group 8").Copy
    Set PPShape = Presentations.Item(1).Slides(1).Shapes.Paste
    objPresentation.Close
    End Sub


    But it paste the object to the very first slide in the active presentation and not in the active slide. Also it copies only grouped object from the very first slide from repository.pptx

    Please can someone help with the missing piece of code.

    Thanks

  3. #3
    Hi John,

    Can you help with the missing piece of code to paste the object on the current slide.

    Thanks,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •