How to Identify Word Templates Renamed from DOTX to DOT Without Losing Alt Text
Question details
The user needs to identify Word template files incorrectly renamed from .dotx to .dot and ensure image alternative text (especially in headers/footers) is preserved when saving them in the correct format.
- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Managing a collection of Word template files that have potential extension mismatches.
- Observed behavior
- Saving falsely renamed .dotx files as genuine legacy .dot files strips the alternative text from inline and floating images located in the document body, headers, and footers.
Create a secure backup of your entire template directory before running any batch scripts or executing format conversions to prevent accidental metadata loss.
Use PowerShell and Word Automation to Inspect Files
Utilize a PowerShell script via Office automation to detect format mismatches and preserve accessibility metadata before conversion.
Because resolving this requires checking inline and floating shapes across multiple document sections (body, headers, and footers), automating the inspection with PowerShell is the most reliable approach for large batches of files.
Open PowerShell ISE or your preferred script editor as an administrator on a Windows machine with Microsoft Word installed.
Use the command `New-Object -ComObject Word.Application` to start a background instance of Word for processing the documents.
Write a loop to iterate through your directory of .dot files. Attempt to open each file and check its `SaveFormat` property to identify if it is actually an XML-based format (.dotx).
Iterate through the `ActiveDocument.StoryRanges` (specifically looking at `wdPrimaryHeaderStory` and `wdPrimaryFooterStory`) to identify inline shapes. Extract and log any existing alternative text to a variable or array.
Securely use 'Save As' to convert the file to the intended format. Use your script to programmatic reapply the logged alternative text to the shapes if they were stripped during the format change.

Manually Verify Template Extensions
If you are working with a small batch of files, you can manually verify the underlying file architecture to identify falsely renamed extensions.
Edit Templates and Preserve Alt Text in WPS Office
WPS Office provides seamless support for both .dot and .dotx formats. You can easily open your renamed templates, verify image alternative text, and save them in the correct format without losing critical metadata.
- 1. Open the Template: Launch WPS Writer, click on 'Menu' > 'Open', and select your suspicious .dot or .dotx template file.
- 2. Verify Image Alt Text: Right-click any image within the document body, header, or footer, and select 'Picture'. Navigate to the 'Alt Text' tab to confirm your descriptions are intact.
- 3. Save in the Correct Format: Click 'Menu' > 'Save As'. Choose 'Word Template (*.dotx)' for modern XML-based formatting or 'Word 97-2003 Template (*.dot)' for legacy compatibility, ensuring all metadata is natively preserved.

Frequently Asked Questions
Why does saving a .dotx as a .dot file remove alt text?
The .dot (Word 97-2003) format is a legacy binary format that handles graphical objects differently than the modern XML-based .dotx format. During the backward conversion, advanced metadata like alternative text on images—especially those nested in headers and footers—can be stripped if the conversion process isn't handled carefully.
How can I easily tell if a .dot file is actually a renamed .dotx file?
Because .dotx is built on Open XML and acts as a compressed ZIP archive, you can change the file's extension to .zip and try to open it. If it successfully opens to reveal 'word' and 'docProps' folders, it is a .dotx file. A genuine .dot binary file will return an error if you attempt to open it as a ZIP archive.
Can I run PowerShell scripts for Word automation without Microsoft Word installed?
No. Scripting solutions that instantiate the Word.Application COM object require the full Microsoft Word desktop application to be installed on the machine executing the script, as it relies on the local Word libraries to process the documents.




