Formatting Issues

How to Stop Word From Underlining and Bolding Inserted Images

Huda QurayshiHuda Qurayshi Nov 3, 2026 870 views

Question details

Users need a way to stop Microsoft Word from automatically applying bold or underline text styles to images that are programmatically inserted into a document.

How to Stop Word From Underlining and Bolding Inserted Images
Product
Microsoft Word
Device & OS
not provided
Scenario
Using an automated program or script to insert images into Word documents based on existing placeholder text.
Observed behavior
The inserted images inherit the character formatting of the placeholder text, causing the images themselves to appear with visible bolding or underlines.
Before you start

Ensure you have permission to run VBA macros in your Microsoft Word environment, or have access to modify the source code of the automation program.

Solution 1Recommended

Use a Word VBA Macro to Clear Image Formatting

Run a VBA script to automatically scan the document and strip text formatting like bold and underline from all inline shapes.

This method is ideal if you cannot modify the external automated program. When an image is placed 'In Line with Text', Word treats it as a text character. The macro targets these inline shapes and resets their font attributes, effectively removing the unwanted underlining and bolding without altering the document structure.

1
Open the VBA Editor

Press 'Alt + F11' in Microsoft Word to open the Microsoft Visual Basic for Applications window.

2
Insert a New Module

Go to the 'Insert' menu at the top and select 'Module' to create a blank script window.

3
Paste the Formatting Script

Enter a VBA script that iterates through ActiveDocument.InlineShapes. For each shape, select its range and set both Range.Font.Bold to False and Range.Font.Underline to wdUnderlineNone.

4
Run the Macro

Press 'F5' on your keyboard or click the 'Run' button. The script will execute and instantly clear the formatting from all inserted images in the document.

Use a Word VBA Macro to Clear Image Formatting
Macro Execution: Running the macro will only affect the formatting of the inline images and will leave your surrounding text styles intact.
WPS Writer Solution

Easily Manage Document Formatting with WPS Writer

WPS Writer offers robust tools for handling document formatting and supports automated macros to easily clear unwanted styles from inserted images, streamlining your workflow.

  1. 1. Open Your Document in WPS Writer: Launch WPS Office and open the document containing the automated images.
  2. 2. Access the Developer Tab: Navigate to the 'Developer' tab on the top ribbon to access macro functions.
  3. 3. Create a Formatting Macro: Click 'Macros', create a new script, and input your VBA code to strip underline and bold styling.
  4. 4. Execute the Macro: Run the macro to instantly remove bold and underline styles from all inline images across the document.
Fully compatible with Microsoft Word .doc and .docx formatsSupports advanced macros and VBA for automated image formattingIntuitive user interface for precise paragraph and text styling controlLightweight, free-to-use alternative with powerful processing capabilities
microsoft office alternative - wps office

Frequently Asked Questions

Why do my inserted images have an underline in Word?

Images inserted with the 'In Line with Text' wrapping style are treated by Word as large text characters. If the text cursor or placeholder they replace has underline formatting applied, the image will automatically inherit that styling.

Can I manually remove the bold or underline from an individual image?

Yes. You can highlight the image by clicking and dragging your cursor over it (treating it exactly like a letter), then click the Bold or Underline buttons on the Home tab to toggle the inherited formatting off.

Does changing the image text wrapping fix the underline issue?

Yes. If you select the image and change its text wrapping from 'In Line with Text' to 'Square', 'Tight', or 'In Front of Text', the image is no longer treated as a text character and will immediately drop any font formatting like underlines.