跪求~~~!!word中如何批量使图片铺满整张纸???解决后加分~!
发布网友
发布时间:2022-04-26 23:25
我来回答
共2个回答
热心网友
时间:2022-05-03 02:57
编辑宏,这个宏按选定的样本图片的大小设置文档中所有图片的大小。
Sub 按选择的图片样本设置图片大小()
Dim s
Dim r, SelectShape As Boolean
If Selection.InlineShapes.Count = 1 Then SelectShape = True Else If Selection.ShapeRange.Count = 1 Then SelectShape = True
If SelectShape And Selection.InlineShapes.Count = 1 Then
Set s = Selection.InlineShapes(1)
r = Array(s.Height, s.Width)
ElseIf SelectShape Then
Set s = Selection.ShapeRange(1)
r = Array(s.Height, s.Width)
End If
If SelectShape Then
For Each s In ActiveDocument.InlineShapes
s.Height = r(0): s.Width = r(1)
Next s
For Each s In ActiveDocument.Shapes
If InStr(s.Name, "Picture") > 0 Then
s.Height = r(0): s.Width = r(1)
End If
Next s
MsgBox "已经完成对图片大小的设置"
Else
MsgBox "没有选定样本图片"
End If
End Sub
热心网友
时间:2022-05-03 04:15
留下你的联系方式。快。。追问不好意思~~~另外一个人已经弄完了~~~也谢谢啦~!呵呵