Thread: [Solved] Custom Autoshapes
View Single Post
 
Old 03-27-2012, 12:44 AM
JohnWilson JohnWilson is offline Windows 7 64bit Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

Code:
Sub copyShape()
Dim mylibrary As Presentation
Dim osld As Slide
'open library file with NO window
Set mylibrary = Presentations.Open(Environ("USERPROFILE") & "\My Documents\CustomShapesPresentation.ppt", WithWindow:=False)
'copy shape
mylibrary.Slides(1).Shapes("CustomShape1").Copy
'paste into current slide
ActiveWindow.View.Slide.Shapes.Paste
'close library
mylibrary.Close
End Sub
Would be the basic code

If it's for client use I would hide the library file somewhere other than My Docs
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials

Last edited by JohnWilson; 03-27-2012 at 02:54 AM.
Reply With Quote