将 PowerPoint 中的图片快速调整为全幻灯片大小
Quickly resize picture in PowerPoint to full slide size
有谁知道在 PowerPoint 中将图片调整为完整幻灯片大小的方法,这种方法比通过拖动移动和调整大小更快?我在想类似 'Fit to Page' 的东西,在 Word 中使用表格和打印。
在VBA中,你可以这样写一个宏
Public Sub cFitImage()
Dim srSelection As ShapeRange
Set srSelection = Application.ActiveWindow.Selection.ShapeRange
Dim sObjet As Shape
For Each sObjet In srSelection
iOldHeight = sObjet.Height
iOldWidth = sObjet.Width
With Application.ActiveWindow.Presentation.PageSetup
If (iOldHeight / iOldWidth) > (.SlideHeight / .SlideWidth) Then
sObjet.Height = .SlideHeight
sObjet.Top = 0
sObjet.Left = .SlideWidth / 2 - sObjet.Width / 2
Else
sObjet.Width = .SlideWidth
sObjet.Left = 0
sObjet.Top = .SlideHeight / 2 - sObjet.Height / 2
End If
End With
Next sObjet
End Sub
然后从相应功能区 (images/format) 中的个性化按钮调用它,并选择一些图像。
有谁知道在 PowerPoint 中将图片调整为完整幻灯片大小的方法,这种方法比通过拖动移动和调整大小更快?我在想类似 'Fit to Page' 的东西,在 Word 中使用表格和打印。
在VBA中,你可以这样写一个宏
Public Sub cFitImage()
Dim srSelection As ShapeRange
Set srSelection = Application.ActiveWindow.Selection.ShapeRange
Dim sObjet As Shape
For Each sObjet In srSelection
iOldHeight = sObjet.Height
iOldWidth = sObjet.Width
With Application.ActiveWindow.Presentation.PageSetup
If (iOldHeight / iOldWidth) > (.SlideHeight / .SlideWidth) Then
sObjet.Height = .SlideHeight
sObjet.Top = 0
sObjet.Left = .SlideWidth / 2 - sObjet.Width / 2
Else
sObjet.Width = .SlideWidth
sObjet.Left = 0
sObjet.Top = .SlideHeight / 2 - sObjet.Height / 2
End If
End With
Next sObjet
End Sub
然后从相应功能区 (images/format) 中的个性化按钮调用它,并选择一些图像。