Others

Change Paragraph Mark Color and Text Font with a Word VBA Macro

Khadija KhanKhadija Khan Nov 20, 2026 869 views

Question details

The user wants a Word macro that colors paragraph marks red and sets document text to 14-point Calibri.

Change Paragraph Mark Color and Text Font with a Word VBA Macro
Product
Microsoft Word
Device & OS
not provided
Scenario
Format paragraph marks and document text consistently using VBA.
Observed behavior
The desired result is red paragraph marks with document text in 14-point Calibri.
Before you start

Open the document in a desktop version of Word that supports VBA, and use Home > Show/Hide ¶ to display paragraph marks. The macro below targets the main document body, not headers, footers, or other stories.

Solution 1Recommended

Run a VBA macro to format text and paragraph marks

Use this approach to apply both formatting changes to the main document body in one operation.

1
Open the VBA editor

In desktop Word, open the Developer tab and select Visual Basic. In Word for Windows, you can also press Alt+F11.

2
Insert the macro

In the VBA editor, select Insert > Module and paste this code: Sub FormatParagraphMarks() Dim body As Range Set body = ActiveDocument.Content body.Font.Name = "Calibri" body.Font.Size = 14 Set body = ActiveDocument.Content With body.Find .ClearFormatting .Replacement.ClearFormatting .Text = "^p" .Replacement.Text = "^p" .Replacement.Font.Color = wdColorRed .Forward = True .Wrap = wdFindStop .Format = True .MatchWildcards = False .Execute Replace:=wdReplaceAll End With End Sub

3
Run and inspect the result

Return to Word, select Developer > Macros, choose FormatParagraphMarks, and select Run. Check the document with Home > Show/Hide ¶ enabled.

4
Save the macro if needed

To keep the macro in the document, select File > Save As and choose Word Macro-Enabled Document (*.docm).

Run a VBA macro to format text and paragraph marks
Check paragraph formatting: Paragraph marks carry formatting that can affect text typed into a paragraph. Inspect the result, including the final paragraph and any tables, and adjust formatting if necessary.
Free Microsoft Office alternative

Format Word Documents with WPS Writer

WPS Office is a free, lightweight alternative with a familiar interface for editing Word documents and applying font formatting. Its format compatibility helps you move existing documents into WPS Writer; it does not fix or guarantee support for a Microsoft Word VBA macro.

Apply font and paragraph formatting in WPS WriterOpen and edit Microsoft Word DOCX documentsUse familiar editing controls for an easier transitionWork with a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

How do I show paragraph marks in Word?

On the Home tab, select Show/Hide ¶ in the Paragraph group. Select it again to hide the marks.

Does the macro also format headers and footers?

No. It uses ActiveDocument.Content, which targets the main document body. Headers, footers, and other stories require separate handling.

Will setting the font to Calibri change the existing text color?

The macro sets the font name and size without explicitly changing the text color. It then applies red to paragraph marks found in the main document body.

Why should I check text typed after a red paragraph mark?

A paragraph mark carries character formatting, which can influence newly typed text. If new text appears red, select it and change its font color from Home > Font Color.

How can I keep the macro for future use?

Use File > Save As and choose Word Macro-Enabled Document (*.docm) if the macro is stored in the document. A standard DOCX file cannot retain VBA macros.