Reputation: 35781
Is it possible to apply a style or at least give a thin border to all the images in a Word 2013 document using VBA?
Upvotes: 1
Views: 3011
Reputation: 21
If you want to apply a style to the images use this macro:
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
Upvotes: 2
Reputation: 2451
The following should work,
Dim pic As InlineShape
For Each pic In ActiveDocument.InlineShapes
pic.Borders.OutsideLineStyle = wdLineStyleSingle
pic.Borders.OutsideLineWidth = wdLineWidth050pt
Next
Upvotes: 2