In this article, we would like to discuss 3 quick methods of how to add borders to pictures in your Word Documents.
Why would we apply borders to pictures? The answer is obvious. Some pictures are too much like the main contents, say a shot of a block of words, which we might easily mistake for texts. Therefore, to make pictures stand out the text contents avails the usefulness of the following 3 methods we are going to show you.
Method 1: Add Borders to One Picture in One Document
- Firstly, click on a picture to select.
- Next click “Format” tab under “Picture Tool”.
- Then click “Picture Border” and choose a color.
Method 2: Add Borders to All Pictures in one Document
As shown in method 1, manually alter picture one by one is really not a great idea. To save efforts, macro is the way you should take.
- To start with, click “Developer” tab then the “Visual Basic” to show the VBA editor. When “Developer” is not available, simply press “Alt+ F11” instead.
- Then click “Normal”.
- Next click “Insert” tab and choose “Module” on its menu.
- Double click on the new module to open coding area on the right side.
- Now paste the bellowing macro there:
Sub AddPictureBorders() Dim objShape As Shape Dim objInLineShape As InlineShape Dim objDoc As Document Set objDoc = ActiveDocument With objDoc For Each objInLineShape In .InlineShapes With objInLineShape.Line .Style = msoLineSingle .ForeColor.RGB = RGB(0, 0, 0) End With Next For Each objShape In .Shapes objShape.Fill.Solid With objShape.Line .Style = msoLineSingle .ForeColor.RGB = RGB(0, 0, 0) End With Next End With End Sub
- Last but not the least, click “Run” button or hit “F5”.
Method 3: Add Borders to All Pictures in Multiple Documents
Since we can write a macro to deal with pictures in a document, there is way to process pictures in multiple documents as well.
Before all, you need to organize all target documents under the same directory. Then follow the exact the same steps exhibited above to install and run a macro, but replace it with the following one:
Sub AddPictureBordersInMultiDoc() Dim objShape As Shape Dim objInLineShape As InlineShape Dim objDoc As Document Dim strFile As String Dim strFolder As String Set objDoc = ActiveDocument strFolder = "C:\Users\Public\Documents\New folder\" strFile = Dir(strFolder & "*.docx", vbNormal) While strFile <> "" Set objDoc = Documents.Open(FileName:=strFolder & strFile) With objDoc For Each objInLineShape In .InlineShapes With objInLineShape.Line .Style = msoLineSingle .ForeColor.RGB = RGB(0, 0, 0) End With Next For Each objShape In .Shapes objShape.Fill.Solid With objShape.Line .Style = msoLineSingle .ForeColor.RGB = RGB(0, 0, 0) End With Next End With objDoc.Save objDoc.Close strFile = Dir() Wend End Sub
- The “C:\Users\Public\Documents\New folder\” in this macro refers to the directory path where you store documents. And never forget to add the last “\”.
- You can change the border color by altering the RGB value.
Time to Think about Backup
Most of us have been well informed of what a backup can do. It can be your life saver at the times of having Word damage. Thus, we shall never undermine the effect of taking minutes to back up valuable documents. As such, one cannot guarantee the safety of his data.
Vera Chen is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including damaged xlsx and pdf repair software products. For more information visit www.datanumen.com