• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Create PowerPoint with slide-size as onscreen show (16:9)

Hi Friends,

I am trying to create a powerpoint and export some of the charts from Excel to new PowerPoint.
The problem is i am trying to set the slide size to "onscreen show (16:9)" but not able to achieve it.
The code always creates a slide with "Widescreen (16:9) size, which is not my requirement.
I am using MS office 2016 version, please find attached the code in the attached file.

Same query is posted in another forum at the below link
https://www.excelforum.com/excel-pr...size-as-onscreen-show-16-9-a.html#post4869336

Can anyone of you help me on this.

Thanks a lot in advance,
 

Attachments

  • Create powerpoint.xlsm
    18 KB · Views: 18
Hi ,

How do you find out what the slide size is ?

What do you want it to be ?

BTW , your code should include a dot symbol in front of the following 3 lines of code :
Code:
        .SlideSize = ppSlideSizeCustom
        .SlideWidth = 10 * 72
        .SlideHeight = 5.625 * 72
Narayan
 
Hi Narayan,

I want the slide size to be
"on-screen show (16:9)" width 10 Inch and Height 5.6 Inch

Also as suggested by you I tried to put dot symbol in front of the three lines, but then I got the below error
Run-time error 2147024809(80070057)
PageSetup.SlideSize: Invalid enumeration value
 
Hi ,

I got the same error ; I then included :

Microsoft PowerPoint 14.0 Object Library

in References , and the error was no longer displayed.

Narayan
 
Thanks, i also did the same and its working now.
Is there any other way by which we can skip the manual process of including the Microsoft PowerPoint 14.0 Object Library. Since we need to share this file with multiple users and we cant ask them all to manually include it.

Hence can you suggest any modifications in the code to include Microsoft PowerPoint 14.0 Object Library automatically with VBA code, or by any other way.
 
Back
Top