配色: 字号:
word宏代码--选中的图片修改尺寸.txt
2020-04-28 | 阅:  转:  |  分享 
  
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
献花(0)
+1
(本文系AiChemi首藏)