VBA: size existing images

S

stevewy

Is there a way I can make all images in the active slideshow the same
fixed position and size? I'm thinking of something along the lines of
For Each Slide in Current.Presentation (this position) (this size)

.... and the macro would resize/reposition all images in turn.

Any ideas, please?

Steve Wylie
 
J

John Wilson

This should start you off

Sub allsame()
Dim osld As Slide
Dim oshp As Shape
For Each osld In ActivePresentation.Slides
For Each oshp In osld.Shapes
If oshp.Type = msoPicture Then
' might want to leave this true
oshp.LockAspectRatio = False
'change to suit
oshp.Left = 100
oshp.Top = 150
oshp.Width = 200
oshp.Height = 200
End If
Next oshp
Next osld
End Sub



-------------------------------------------
Amazing PPT Hints, Tips and Tutorials

http://www.PPTAlchemy.co.uk
http://www.technologytrish.co.uk
email john AT technologytrish.co.uk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top