Batch Update Fonts and Font Size (Bold/Italic Included) in Multiple MS Word Files

Bulk Edit Font Properties — Change Font, Size, Bold & Italic in Multiple DOCX

Changing font properties across many Word documents can be tedious if done one file at a time. This guide gives practical, repeatable methods to change font, font size, bold, italic and other text styles across multiple .docx files — using built-in Word features, a simple macro, and a PowerShell script for automation. Choose the approach that fits your comfort with tools and the scale of files.

When to use each method

  • Use Find & Replace across multiple open documents for a handful of files you can open at once.
  • Use a Word VBA macro when you need repeatable, customizable edits across many files and prefer working inside Word.
  • Use PowerShell with the Open XML SDK or a script that manipulates .docx as zip/XML for large batches or server-side automation.

Method 1 — Use Word’s Styles (recommended when possible)

  1. Open one representative document.
  2. Modify the relevant styles (Normal, Heading 1, etc.):
    • Right-click a style in the Styles pane → Modify.
    • Set Font, Size, Bold/Italic, spacing, and formatting.
    • Check “New documents based on this template” if you want future files to inherit it.
  3. Save the document as a template (.dotx) or copy the modified Normal.dotm template to other machines.
  4. To apply to other documents:
    • Open a target document → Design tab → “Themes” / “Styles” pane → “Import/Export” (Manage Styles) → “Import styles from file” and select the template or source document.
    • Review and update styles in each target document. This keeps formatting consistent and is safer than direct find/replace.

Method 2 — Word VBA Macro (applies edits inside DOCX files automatically)

Use this when you want to change specific font properties across many documents in a folder.

  1. Open Word → press Alt+F11 to open the VBA editor.
  2. Insert a new Module and paste this macro (customize values for FontName, FontSize, BoldFlag, ItalicFlag, and FolderPath):

vb

Sub BulkEditFontsInFolder() Dim fso As Object, fld As Object, fil As Object

Dim doc As Document Dim FolderPath As String Dim FontName As String, FontSize As Single Dim BoldFlag As Boolean, ItalicFlag As Boolean FolderPath = "C:\Path\To\Your\Docs\"  ' << change this FontName = "Calibri"                  ' << desired font FontSize = 11                         ' << desired size BoldFlag = False                      ' << True = bold, False = not bold ItalicFlag = False                    ' << True = italic, False = not italic Set fso = CreateObject("Scripting.FileSystemObject") Set fld = fso.GetFolder(FolderPath) For Each fil In fld.Files     If LCase(fso.GetExtensionName(fil.Name)) = "docx" Or LCase(fso.GetExtensionName(fil.Name)) = "doc" Then         Set doc = Documents.Open(FileName:=fil.Path, ReadOnly:=False)         With doc.Content.Font             .Name = FontName             .Size = FontSize             .Bold = IIf(BoldFlag, True, False)             .Italic = IIf(ItalicFlag, True, False)         End With         doc.Save         doc.Close     End If Next fil MsgBox "Done." 

End Sub

  1. Update FolderPath and font settings, then run the macro.
    Notes:
  • This replaces font for the entire document body (including tables). It may not change text in shapes, headers/footers, or text with direct character-level overrides tied to styles — you can extend the macro to iterate through headers, footers, shapes, and ranges if needed.
  • Test on backups first.

Method 3 — PowerShell + Open XML (no Word required)

Useful for server-side or headless batch edits. You can edit the document’s document.xml inside the .docx package or use the Open XML SDK. Example using the Open XML PowerTools or System.IO.Packaging is more robust; here’s a minimal PowerShell approach using the Open XML SDK (assumes SDK or DocumentFormat.OpenXml assembly available):

  • Install the Open XML SDK (NuGet) or use scripts that reference DocumentFormat.OpenXml.dll.
  • Write a PowerShell script to open each .docx package, parse /word/document.xml, and update w:rPr nodes (w:rPr/w:rFonts, w:sz, w:b, w:i). Because XML namespaces matter, use an XML library rather than naive string replace.
  • Always back up files first.

(If you want this script, tell me and I’ll provide a ready-to-run PowerShell example.)

Tips, caveats, and best practices

  • Back up files before batch operations.
  • Prefer modifying styles over global replacement — styles preserve structure and are reversible.
  • Character-level direct formatting in documents can override style settings; consider clearing direct formatting (select all → Ctrl+Space) before applying new styles.
  • Test on a small set of copies to confirm results.
  • For documents with tracked changes, accept/reject changes before bulk formatting to avoid version issues.
  • If documents use different languages or complex scripts, verify fonts support needed glyphs.

Quick checklist

  • Backup originals.
  • Choose method (Styles, VBA, PowerShell).
  • Test on 2–3 files.
  • Run across full set.
  • Verify headers, footers, shapes, and tracked changes.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *