我想将我的PowerPoint幻灯片大小调整为标准(4:3)最大化。我有代码自动调整大小为4:3,但它的默认值,以确保适合。我如何更改代码以将幻灯片大小缩放到4:3最大化,而不是确保合适?我试着找遍了互联网,也没找到解决方案。
这就是我到目前为止所拥有的代码。提前谢谢你!
Public Sub StandardMaximize()
Dim PPPres As Presentation
Application.ActivePresentation.PageSetup.SlideSize = ppSlideSizeCustom
Set PPPres = Application.ActivePresentation
With PPPres.PageSetup
.SlideSize = ppSlideSizeCustom
.SlideWidth = 10 * 72
.SlideHeight = 7.5 * 72
.FirstSlideNumber = 1
.SlideOrientation = msoOrientationHorizontal
.NotesOrientation = msoOrientationVertical
End With
End Sub
发布于 2019-10-03 00:49:24
我在C#中这样做过一次:
pptPresentation.PageSetup.SlideSize = PpSlideSizeType.ppSlideSizeOnScreen;
并将其缩放到整个幻灯片大小,只需创建一个与您的演示文稿相等的新CustomLayout
,并将您的形状大小设置为等于CustomLayout。
CustomLayout customLayout = pptPresenation.SlideMaster.CustomLayouts[PpSlideLayout.ppLayoutText]
shape.Height = customLayout.Height;
shape.Width = customLayout.Width;
我很久以前就这么做了。我希望它能帮上忙。
https://stackoverflow.com/questions/57897653
复制相似问题