嗨,我是PowerPoint VBA世界中的Newbee,並希望我的英語不是太糟糕:我必須在PowerPoint 2010中解決以下問題:首先我換成16: 9寬屏幕格式,然後通過單擊向上和向下箭頭來縮放高度,然後查看現在太大的所有圖片,並從圖片中隨尺寸對話框更改。這張照片將採用我以前在4:3演示中使用的正確形式。這很容易,但如果你不得不改變100張以上的照片,那麼這種做法就不容易我嘗試了很多次,但沒有任何效果。這裏是我的代碼:如何更改寬屏格式的powerpoint圖片
Sub ChangePictures()
Dim sld As Slide
Dim sh As Shape
Dim meinShHeight As Double
ActivePresentation.PageSetup.SlideSize = 15
For Each sld In ActivePresentation.Slides
For Each sh In sld.Shapes
'If sh = msoLinkedOLEObject Or msoTextBox Then
If sh.Type = msoPicture Then
'meinShHeight = sh.ScaleHeight.Value
'sh.ScaleHeight meinShHeight, msoScaleFromTopLeft
sh.LockAspectRatio = msoTrue
With tSlide.Shapes.Select
.Height = ActiveWindow.Presentation.PageSetup.SlideHeight
.Width = ActiveWindow.Presentation.PageSetup.SlideWidth
End With
'sh.ScaleHeight 1.75, msoTrue
'sh.ScaleHeight -1.75, msoTrue
End If
'End If
Next
Next
End Sub
也許這是不可能在VBA中使用這個向上和向下的箭頭技巧? 不幸的是我不能使用PowerPoint 2013,那麼我的演示沒有任何問題。
有沒有人可以幫助我。我希望以正確的方式表達我的問題;-)
在此先感謝。
問候 奇奇
沒有'sh.ScaleHeight ActiveWindow.Presentation.PageSetup.SlideHeight,msoTrue'幫助? –