gpt4 book ai didi

在 PowerPoint 2016 中调整图像大小的 VBA 代码

转载 作者:行者123 更新时间:2023-12-02 03:34:08 26 4
gpt4 key购买 nike

我在学习 VBA 的第一周,我正在寻找一个 VBA 代码,它可以帮助我调整粘贴到 PowerPoint 2016 中的图片的大小和位置。所需的图片格式详细信息如下:

尺寸
- 高度 = 3.39"
- 宽度 = 6.67"
- 旋转 = 0
- 比例高度 = 62%
- 刻度宽度 = 62%
- 纵横比 = 锁定
- 相对于原图大小=true

位置
- 水平位置 = 0
- 左上角
- 垂直位置 = 2.06
- 左上角

如有任何帮助,我们将不胜感激。

最佳答案

下面是对我有用的代码。感谢支持。

Sub ResizeAll()
For Each tSlide In ActiveWindow.Presentation.Slides
tSlide.Select
With tSlide.Shapes.Item(1)
'assume a blank slide with one image added only
.Select
.Height = 72 * 3.39
.Width = 72 * 6.67
'algin middle (Horizontal Center)
.Left = 0
.Top = ActivePresentation.PageSetup.SlideHeight / 3.25
End With
Next
End Sub

关于在 PowerPoint 2016 中调整图像大小的 VBA 代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50844525/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com