怎么批量调整复制到word中文档中图片的大小?

来源:百度知道 编辑:UC知道 时间:2024/05/31 12:22:04
我复制到word中的图片太大超出word的页面范围,一张张的调整太麻烦,想批量调整。。。。。
第三种 代码不错 可是我的图片不是一样大的 怎么该代码 固定图片的长和宽?变成a4一样大的就可以了

以下为VBA代码,Alt+F11,点击This Document,粘贴代码,使用请备份文档:

Sub AllPictSize()
Dim PecentSize As Integer
Dim oIshp As InlineShape
Dim oshp As Shape

'默认缩放值为75%
PercentSize = InputBox("Enter percent of full size", "Resize Picture", 75)

For Each oIshp In ActiveDocument.InlineShapes
With oIshp
.ScaleHeight = PercentSize
.ScaleWidth = PercentSize
End With
Next oIshp

For Each oshp In ActiveDocument.Shapes
With oshp
.ScaleHeight Factor:=(PercentSize / 100), _
RelativeToOriginalSize:=msoCTrue
.ScaleWidth Factor:=(PercentSize / 100), _
RelativeToOriginalSize:=msoCTrue
End With
Next oshp
End Sub

1、如果是word2003及以