Fix Word Building Blocks Error When Inserting Headers or Page Numbers
Question details
Users need to resolve a crash or serious error warning related to the Built-In Building Blocks.dotx file when attempting to insert document elements.

- Product
- Microsoft Word
- Device & OS
- Windows
- Scenario
- Inserting headers, footers, page numbers, or symbols into a Word document.
- Observed behavior
- Microsoft Word displays a serious error message indicating that the Built-In Building Blocks.dotx file or a temporary file is damaged, preventing the insertion of headers or page numbers.
Ensure Microsoft Word and all other Office applications are completely closed before you attempt to navigate your system files and replace the damaged template.
Replace the Damaged Built-In Building Blocks File
Manually copy the pristine original building blocks template from the Office installation folder and use it to replace your corrupted user-level cache file.
The most common cause of this error is a corrupted cached file in your AppData directory. Overwriting it with a fresh copy from your program files directly solves the problem without requiring a full Office reinstallation.
Make sure Microsoft Word is completely closed. Check your system tray to ensure no background Office processes are running.
Press Windows Key + R to open the Run dialog. Type %appdata%\Microsoft\Document Building Blocks\1033\16 and press Enter. Locate the file named Built-In Building Blocks.dotx in this folder.
Open a new File Explorer window and navigate to C:\Program Files\Microsoft Office\root\Office16\Document Parts\1033\16. Right-click the original Built-In Building Blocks.dotx file here and select Copy.
Return to the AppData folder opened in step 2. Paste the copied file, choosing to overwrite the existing destination file. Restart Word and try inserting a page number.

Delete Corrupted LiveContent Temporary Files
Clear out the cached LiveContent template files if the error specifically mentions a temporary TM03998158 file.
Follow Official Microsoft Troubleshooting (KB921541)
Use Microsoft's advanced troubleshooting sequence to resolve persistent Word startup and feature crashes, holding off on registry edits.
Avoid Complex Template Errors with WPS Office
Microsoft Word's Building Blocks errors can disrupt your workflow and require complex system file replacements. WPS Office provides a stable, lightweight, and completely free alternative for creating professional documents with built-in headers, footers, and page numbers—without the hassle of corrupted configuration caches.
- 1. Download WPS Office: Visit the official WPS website and download the free WPS Office suite for your device.
- 2. Open Your Document: Launch WPS Writer and open your existing Word document.
- 3. Insert Elements Effortlessly: Go to the Insert tab and click Header and Footer or Page Number to reliably format your pages.

Frequently Asked Questions
What is the Built-In Building Blocks.dotx file?
It is a background Microsoft Word template file that stores default, pre-formatted document elements such as headers, footers, page numbers, text boxes, and cover pages. If it becomes corrupted, Word cannot load these components and throws an error.
Why do I get a TM03998158 temporary file error in Word?
This specific error happens when Word attempts to manage a cached LiveContent template (often downloaded dynamically from the internet), but the temporary cache file becomes locked by another process or corrupted. Deleting the corrupted cache clears the error.
Will replacing the Building Blocks file delete my custom text boxes or headers?
No. Replacing 'Built-In Building Blocks.dotx' only resets the default Office components. Any custom building blocks you created and saved are typically stored in a separate 'Building Blocks.dotx' file or your 'Normal.dotm' global template, which remain unaffected.




