Formatting Issues

How to Apply Different Word Caption Styles by Label

Steven ParkerSteven Parker Nov 3, 2026 868 views

Question details

The user wants to apply different formatting styles to document captions based on their specific label, such as using distinct styles for 'Figure' and 'Table'.

How to Apply Different Caption Styles by Label in Microsoft Word
Product
Microsoft Word
Device & OS
not provided
Scenario
Formatting a document with multiple types of captioned elements (figures, tables, custom labels) that require visually distinct alignments, fonts, or styling rules.
Observed behavior
Microsoft Word applies a single default 'Caption' style to all inserted captions regardless of the selected label, preventing automatic differentiation through standard style configurations.
Before you start

Ensure the Developer tab is enabled in your Microsoft Word ribbon if you plan to use the macro solution. It is highly recommended to save a copy of your document before running any VBA scripts.

Solution 1Recommended

Use a VBA Macro to Automatically Apply Styles by Label

Since Word does not natively support assigning different styles by caption label automatically, running a VBA macro is the most efficient method to detect the label text and apply the correct corresponding style.

This method requires you to have custom styles already created in your document (for example, 'Caption Figure' and 'Caption Table'). The macro will scan through the sequence fields in your document, identify the label, and apply the appropriate formatting.

1
Open the VBA Editor

Press 'Alt + F11' on your keyboard to open the Microsoft Visual Basic for Applications window.

2
Insert a New Module

In the top menu, click 'Insert' and select 'Module' to create a blank workspace for your script.

3
Enter the Macro Code

Write or paste a VBA script that loops through 'ActiveDocument.Fields'. Set the script to check if the field is a 'wdFieldSequence' and conditionally apply your custom styles (e.g., 'Selection.Style = ActiveDocument.Styles("Caption Figure")') based on the preceding label text.

4
Run the Macro

Close the VBA editor. Go to the Developer tab, click 'Macros', select your new macro from the list, and click 'Run'. The styles will update across your document automatically.

Use a VBA Macro to Automatically Apply Styles by Label
VBA Capability Note: Macros cannot trigger automatically every time you insert a new caption. You will need to re-run the macro whenever you add new figures or tables to update their styles.
Free Microsoft Office alternative

Edit and Format Documents Seamlessly with WPS Office

While complex macro workarounds are sometimes required to bypass formatting limitations in Microsoft Word, WPS Office provides a highly compatible, free, and lightweight alternative for all your document needs. Enjoy an intuitive interface for managing styles, references, and tables of contents without a steep learning curve.

  1. 1. Download and Install: Visit the official WPS Office website to download and install the free software suite.
  2. 2. Open Your Document: Launch WPS Writer and open your existing .docx file. All native styles and captions will be preserved.
  3. 3. Manage Formatting Easily: Use the intuitive References and Home tabs to quickly adjust caption alignments, update styles, and insert reference tables.
Free and lightweight alternative to Microsoft OfficeFully compatible with Microsoft Word (.doc, .docx) formatsUser-friendly style and caption management for academic documentsBuilt-in PDF editor and document conversion tools
microsoft office alternative - wps office

Frequently Asked Questions

Can I make Word automatically use different styles for figures and tables without using a macro?

No, Microsoft Word natively applies the exact same default 'Caption' style to all inserted captions regardless of their label type. To achieve different styling automatically, a VBA macro is required.

How do I create a custom style specifically for table captions?

Select an existing table caption and format its font, alignment, and spacing to your preference. Open the Styles pane from the Home tab, click the 'New Style' button at the bottom, name it (e.g., 'Table Caption'), and click OK to save it for future use.

Will changing caption styles manually affect my Table of Figures?

Not if you use the default method. Word generates the Table of Figures by identifying the specific caption 'Label' (like Figure or Table), not the style. Modifying the visual style of the text will not break your reference tables.

How do I add a completely custom caption label?

Navigate to the References tab and click 'Insert Caption'. In the dialog box, click 'New Label', type your desired custom label name (such as 'Diagram', 'Equation', or 'Chart'), and click OK. It will now appear in your label dropdown.