balumail75
11-11-2011, 04:20 AM
Hello All,
I am trying to create a vba code to pick the shape and copy to all the slides in ppt 2007. Below is the code. It copies the shape in the same slide.
Thanks for your help.
Option Base 1
Dim selshp As Shape
Dim itop As Integer, ileft As Integer
Dim sld As Slide
Dim sldind As Integer
Public Sub pickshp()
sldind = ActiveWindow.View.Slide.SlideIndex
Set selshp = ActiveWindow.Selection.ShapeRange(1)
itop = selshp.Top
ileft = selshp.Left
End Sub
Public Sub copyshapetoallslides()
For Each sld In ActivePresentation.Slides
selshp(1).Duplicate
selshp.Top = itop
selshp.Left = ileft
Next sld
End Sub
Thanks and Regards,
Balu.
I am trying to create a vba code to pick the shape and copy to all the slides in ppt 2007. Below is the code. It copies the shape in the same slide.
Thanks for your help.
Option Base 1
Dim selshp As Shape
Dim itop As Integer, ileft As Integer
Dim sld As Slide
Dim sldind As Integer
Public Sub pickshp()
sldind = ActiveWindow.View.Slide.SlideIndex
Set selshp = ActiveWindow.Selection.ShapeRange(1)
itop = selshp.Top
ileft = selshp.Left
End Sub
Public Sub copyshapetoallslides()
For Each sld In ActivePresentation.Slides
selshp(1).Duplicate
selshp.Top = itop
selshp.Left = ileft
Next sld
End Sub
Thanks and Regards,
Balu.