Here is the final result. I love adding an inputbox to give the ability to choose different shapes. Thanks again John
Sub copyShape()
Dim mylibrary As Presentation
Dim osld As Slide
Dim shapebox As String
shapebox = InputBox("type in the shape name")
'open library file with NO window
Set mylibrary = Presentations.Open(Environ("USERPROFILE") & "\My Documents\CustomShapesPresentation.ppt", WithWindow:=False)
'copy shape
mylibrary.Slides(1).Shapes(shapebox).Copy
'paste into current slide
ActiveWindow.View.Slide.Shapes.Paste
'close library
mylibrary.Close
End Sub
|