dydxw

 针对office的word文档,先添加宏文件,再运行就可以。

Sub 图片格式统一()
Myheigth = 8   \'设置高度
Mywidth = 10   \'设置宽度
On Error Resume Next
For Each iShape In ActiveDocument.InlineShapes
iShape.LockAspectRatio = msoFlase   \'取消锁定纵横比
iShape.Height = 28.345 * Myheigth
iShape.Width = 28.345 * Mywidth

With iShape
.Range.ParagraphFormat.Reset
.Range.ParagraphFormat.Alignment = wdAlignParagraphCenter \'居中
End With

Next

For Each Shape In ActiveDocument.Shapes
Shape.LockAspectRatio = msoFlase
Shape.Height = 28.345 * Myheigth
Shape.Width = 28.345 * Mywidth

With Shape
.Range.ParagraphFormat.Reset
.Range.ParagraphFormat.Alignment = wdAlignParagraphCenter \'居中
End With

Next

End Sub

 

分类:

技术点:

相关文章:

  • 2021-10-28
  • 2021-12-26
  • 2021-12-19
  • 2021-12-04
  • 2021-12-15
  • 2022-01-01
  • 2021-07-06
  • 2021-12-12
猜你喜欢
  • 2021-12-26
  • 2021-05-06
  • 2021-11-21
  • 2021-12-26
  • 2021-12-05
  • 2021-11-26
  • 2021-12-26
相关资源
相似解决方案