word宏代码--选中的图片修改尺寸,不是批量处理
把别人的代码作如下修改即可:
a=Selection.ShapeRange.Count''获取选中的图片数
ifa=10then''选中10张运行本宏
ForEachpInSelection.ShapeRange''也可以为Selection.InlineShapesp.Width=100
p.Height=100
Next
elseifa=8then''选中8张运行本宏
ForEachpInSelection.ShapeRange''也可以为Selection.InlineShapes
p.Width=80
p.Height=80
Next
endif |
|