Results 1 to 2 of 2
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Picture Format (XP; SR3)

    I just started using PP and have a number of slides that the picture sizing keeps on changing; all by itself. I have the lock aspect ratio set to lock but I do not understand why PP has a mind of its own. The picture format height is suppose to be 7.2" and the width 10.0".

    What I would like to do is create a macro that would set the height/width to what I previously mentioned.

    Something like:

    For I = 2 to 30

    Change the height/width to the required specifications' I'm not sure how to apply the settings to specific slides (2 to 30)

    Next I


    Any assistance would be appreciated as I could not follow the code via the macro recorder. The code via the recorder was only working on the activewindow.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: Picture Format (XP; SR3)

    PowerPoint VBA is all but incomprehensible to me, but here is an attempt. It will make all shapes of mixed type on slides 2 to 30 the same width, and center them on the slide.

    Sub EqualizePictures()
    Dim i As Integer
    Dim oSh As Shape

    For i = 2 To 30
    For Each oSh In ActivePresentation.Slides(i).Shapes
    If oSh.AutoShapeType = msoShapeMixed Then
    oSh.LockAspectRatio = True
    oSh.Width = 10 * 72 ' 10 inches
    oSh.Top = (ActivePresentation.PageSetup.SlideHeight - oSh.Height) / 2
    oSh.Left = (ActivePresentation.PageSetup.SlideWidth - oSh.Width) / 2
    End If
    Next oSh
    Next i
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •