Thread: [Solved] Custom Autoshapes
View Single Post
 
Old 03-27-2012, 10:12 AM
excelledsoftware excelledsoftware is offline Windows 7 64bit Office 2003
IT Specialist
 
Join Date: Jan 2012
Location: Utah
Posts: 455
excelledsoftware will become famous soon enough
Default

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
Reply With Quote