Home  >  Article  >  Topics  >  Practical Word tips to share: Add borders to pictures quickly and in batches!

Practical Word tips to share: Add borders to pictures quickly and in batches!

青灯夜游
青灯夜游forward
2023-03-15 19:57:035442browse

This article will share with you the super practical skills of mixing pictures and text in Word. Let’s talk about how to quickly and batch add borders to pictures in Word documents. I hope it will be helpful to everyone!

Practical Word tips to share: Add borders to pictures quickly and in batches!

In documents with mixed graphics and text, text and pictures complement each other and complement each other. They are the key to creating order and beauty in the layout. Whether the two can be combined appropriately Together, better expression of the theme is the focus of typography.

Sometimes, in order to distinguish the boundary between pictures and text, or to beautify the document layout, we will add a top border to the picture.

So, how to add borders to pictures in Word? Next, the editor will teach you a few setting methods, I hope it can help you!

1. Add borders to a small number of pictures

If there are not many pictures that need to be added with borders in the document, we can directly add them in " Set it under the "Picture Border" function.

Method 1: Select the picture that needs to be added with a border in the document, click the [Picture Tools]-[Format]-[Picture Style]-[Picture Border] button in the pop-up menu Just select the line style from the "Thick Line" or "Dotted Line" submenu.

Practical Word tips to share: Add borders to pictures quickly and in batches!

Tips: Click the "Picture Border" button, and you can also select a desired color as the border color in the pop-up menu. Click the [Picture Style]-[Picture Effect] button, select the corresponding option in the pop-up menu, and add shadow, glow and other effects to the picture.

Method 2: Select the picture that needs to be added with a border in the document, right-click the mouse, select the "Format Picture" command in the pop-up menu, and select "Format Picture" in the task pane that opens. Click the "Fill and Line" option, expand the "Line" column, and select the "Solid Line" radio button to add a top border to the image. At the same time, you can also set parameters such as border line color, line type, thick line, transparency, and link type below.

Practical Word tips to share: Add borders to pictures quickly and in batches!

2. Add borders to multiple pictures in batches

When typesetting long documents , if there are many pictures in the document that need to add borders at the same time, it will be very time-consuming to add borders one by one manually. At this time, we can use macros to add borders to pictures in batches.

The method is: click the [View]-[Macro] button, then select the "View Macro" command, open the "Macro" dialog box, enter the name of the macro in the "Macro Name" text box, enter here" picture" and click the "Create" button. Open the "Macro Code" dialog box and paste the following code:

Sub Example()
    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
End Sub

Then save the macro and execute the macro command. Close the window and return to the document interface. You can see that borders have been added to all pictures. The final effect is as shown below. Display:

Practical Word tips to share: Add borders to pictures quickly and in batches!

Tips: It should be noted that the pictures in the Word document must be embedded pictures. Run the above code to add borders, otherwise it will be invalid.

Recommended tutorial: "Word Tutorial"

The above is the detailed content of Practical Word tips to share: Add borders to pictures quickly and in batches!. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:itblw.com. If there is any infringement, please contact admin@php.cn delete