以下是在 Microsoft Word 中使用 VBA 实现图片旋转的源代码:
Sub RotateImage()
Dim shp As Shape
For Each shp In ActiveDocument.Shapes
If shp.Type = msoPicture Then
shp.Rotation = shp.Rotation + 30
End If
Next
End Sub
请将代码复制并粘贴到 Microsoft Word 中的 VBA 编辑器中。您可以按 Alt + F11 打开 VBA 编辑器。然后,您可以运行此代