VBA将样式应用于Word Doc中的所有图像
题
是可以使用VBA申请风格或至少给出Word 2013文档中的所有图像的薄边框?
解决方案
以下应该工作,
Dim pic As InlineShape
For Each pic In ActiveDocument.InlineShapes
pic.Borders.OutsideLineStyle = wdLineStyleSingle
pic.Borders.OutsideLineWidth = wdLineWidth050pt
Next
. 其他提示
如果要将样式应用于图像,请使用此宏:
Sub set_image_to_figure_style()
Dim pic As InlineShape
For Each pic In ActiveDocument.InlineShapes
pic.Select
Selection.Style = ActiveDocument.Styles("Figure")
Next
End Sub
. 不隶属于 StackOverflow