user2591585
user2591585

Reputation: 1

Copy a shape from a PowerPoint Master slide layout to the cu

In PowerPoint 2010:

I would like to create a macro that will copy a shape that I created on one of the layout slides of the master slide, and will paste it to the active slide - the slide that i'm on now when I'm running that macro. (I need it so that i could utilize it on the slide- clone it, etc.)

How I do that?

Thanks,

Upvotes: 0

Views: 1471

Answers (1)

Steve Rindsberg
Steve Rindsberg

Reputation: 14809

You haven't mentioned how exactly you'd identify the shape to be copied, but if you know in advance that it'll be, for example, the sixth shape on the second custom layout of the first master in the presentation and you want to copy/paste it onto slide 3:

Sub Thing()

    Dim oSh As Shape

    ' This copies the sixth shape on the second layout of the first master
    ' Change as needed
    Set oSh = ActivePresentation.Designs(1).SlideMaster.CustomLayouts(2).Shapes(6)

    oSh.Copy

    Set oSh = ActivePresentation.Slides(3).Shapes.Paste(1)

    With oSh
        ' do any formatting/sizing/etc. you like here
    End With

End Sub

Upvotes: 1

Related Questions