In order to distinguish the boundary between the picture and the text, or to beautify the document layout, we will add a border to the picture. Many people know how to add borders to pictures, but the author will teach you how to quickly add borders to pictures in batches today.
How to Add Border to a Piece of Picture?
- Select the picture and go to Format in the toolbar to set the Picture Border. You can also adjust the Picture Effects behind the Picture Border.
- You can also right-click the picture and choose Format Picture.
How to Add Borders to Multiple Pictures in Batch?
If your word document contains a lot of pictures, this will waste much time to add borders one by one. Actually, Macro allows you to complete these quickly.
Step1: Go to View and click on Macros, then choose View Macros.
Copy the code below into the Microsoft Visual Basic for Applications window:
Dim oInlineShape As InlineShape
Application.ScreenUpdating = False
For Each oInlineShape In ActiveDocument.InlineShapes
With oInlineShape.Borders
.OutsideLineStyle = wdLineStyleSingle
.OutsideColorIndex = wdColorAutomatic
.OutsideLineWidth = wdLineWidth050pt
End With
Next
Application.ScreenUpdating = True
At last, click to run the code. You will find that the pictures in the word document have been adding a border.