Skip to content

Instantly share code, notes, and snippets.

@alane019
Created January 2, 2020 00:56
Show Gist options
  • Save alane019/5092a77ed24177349543b746f4764c25 to your computer and use it in GitHub Desktop.
Save alane019/5092a77ed24177349543b746f4764c25 to your computer and use it in GitHub Desktop.
VBA for Microsoft Word: Add a black, solid line border all pictures in a Word document
Sub borders()
'
' borders Macro
'
'There should be a way to make this the default styling for all images pasted into a Word document, in my opinion.
' Adds black solid line borders to all images in word document
' Source:
'
Dim pic As InlineShape
For Each pic In ActiveDocument.InlineShapes
pic.borders.OutsideLineStyle = wdLineStyleSingle
pic.borders.OutsideLineWidth = wdLineWidth050pt
Next
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment