-
VBA for 16:9 to 4:3
Hi, I'm trying to resize my PowerPoint from 16:9 to 4:3. I can do this manually but want this to be automated with vba.
Right now when I do this manually I get the option to choose Maximize or Ensure Fit. I want the vba code to be the Maximize option so after the slide is resized to 4:3 nothing on the objects get shifted or reduced. Looks to me the ppSlideSizeCustom is default to pick Ensure Fit and not sure how to get it to work to choose the other option instead. Any help would be much appreciated.
-
Hi this will help, but you'll need to change the measurements:
Sub Resize()
With Application.ActivePresentation.PageSetup
.SlideWidth = 14.09449 * 72
.SlideHeight = 7.93070866 * 72
End With
End Sub
-
I want to resize to 4:3 with Maximize. Your code is for widescreen and after I changed the measurements it goes to Endure fit and not the Maximize option I wanted to achieve. Maybe this is not possible with VBA?
-
Maximised is not exposed in the Object Model so I don't think it can be done.
-
Thank you John! That’s really good to know. Does this mean it can only be done with xml code?
-
My guess is it's hard coded C# and not accessible to the user except through the manual interface.
-
Roger that! Thanks John:)
-
Hi pptbot
At work I often have to switch between 16:9 and 4:3, both directions.
Office 2013 and beyond MS introduced a new way of converting the page layout - and it's a nightmare compared to Office 2007 / 2010. Anyone using the new Maximise / Ensure Fit options will know what I mean!
So my solution would be to have a copy of MS Office (or at least PPT) 2010. Convert from the Page Layout to 16:9 or 4:3, and PPT auto sizes everything for you. Just quickly resize circles.
Save and open with the newer version of PPT you have.
I hope that helps!