Fix Word Saving as .docm Instead of .docx Despite the Save As Dialog
🔍 WiseChecker

Fix Word Saving as .docm Instead of .docx Despite the Save As Dialog

You choose Save As in Word, pick the Word Document .docx format, and click Save. But the saved file has a .docm extension instead. This happens because Word automatically switches to the macro-enabled format when your document contains macros or ActiveX controls. The Save As dialog respects the file type you select, but Word overrides it if it detects macro content. This article explains why Word forces the .docm format and how to prevent it from happening.

Key Takeaways: Stopping Word From Saving as .docm

  • File > Options > Trust Center > Trust Center Settings > Macro Settings > Disable all macros without notification: Prevents new macros from being added to the document, keeping it macro-free.
  • Alt+F11 to open the Visual Basic Editor, then remove macro modules manually: Eliminates existing macros that trigger the .docm format conversion.
  • Ctrl+G to open Immediate Window, then type ActiveDocument.SaveAs2 FileName:=ActiveDocument.FullName, FileFormat:=wdFormatDocumentDefault: Forces a .docx save via VBA even if macros exist.

ADVERTISEMENT

Why Word Changes the File Extension to .docm

Word uses two primary document formats: .docx for documents without macros and .docm for documents that contain macros. The .docx format cannot store VBA project code, ActiveX controls, or macro-enabled forms. When you open a .docx file and add any macro component, Word internally marks the document as macro-enabled. When you then use Save As and select Word Document .docx, Word detects the macro content and silently changes the Save As type to Word Macro-Enabled Document .docm. This behavior is by design to prevent data loss — saving a macro-enabled document as .docx would permanently delete all VBA code.

The Save As dialog shows the selected format in the Save as type dropdown, but Word applies the .docm extension after you click Save. The extension change happens at the file system level, not in the dialog itself. This can be confusing because the dialog appears to ignore your selection.

What Triggers the .docm Conversion

Any of the following elements in your document will cause Word to save as .docm:

  • VBA macros stored in the document project
  • ActiveX controls such as command buttons or text boxes
  • Form controls with attached macro code
  • Document-level event handlers like Document_Open or Document_Close
  • Custom XML parts that reference VBA code

Opening a .docm file and then trying to save as .docx will also trigger the conversion, even if you did not add new macros yourself.

Steps to Force Word to Save as .docx

You have three reliable methods to save a document as .docx. Choose the method that matches your situation.

Method 1: Remove All Macros and ActiveX Controls Manually

  1. Open the Visual Basic Editor
    Press Alt+F11 on your keyboard. This opens the VBA development environment.
  2. Expand the project tree
    In the Project Explorer pane on the left, look for the Normal project and your document project. Your document project is listed as Project (YourDocumentName).
  3. Delete macro modules
    Expand the Modules folder under your document project. Right-click each module and choose Remove Module. Click No when asked if you want to export the module before removing it.
  4. Delete form controls
    Close the Visual Basic Editor. In your document, click each ActiveX control such as a command button. Press Delete on your keyboard. Repeat for all controls.
  5. Save the document as .docx
    Press F12 to open the Save As dialog. In the Save as type dropdown, select Word Document .docx. Click Save. The file now has a .docx extension.

Method 2: Save Without Macros Using a Copy

  1. Open the original document
    Open the .docm file that you want to convert to .docx.
  2. Select all content
    Press Ctrl+A to select all text and objects in the document.
  3. Copy the content
    Press Ctrl+C to copy everything to the clipboard.
  4. Create a new blank document
    Press Ctrl+N to open a new blank Word document.
  5. Paste without macros
    Press Ctrl+Alt+V to open the Paste Special dialog. Select Unformatted Text or Styled Text depending on your formatting needs. This pastes the content without any VBA code or controls.
  6. Save the new document as .docx
    Press F12, choose Word Document .docx, and click Save.

Method 3: Use VBA to Force a .docx Save

  1. Open the Immediate Window
    Press Alt+F11 to open the Visual Basic Editor. Then press Ctrl+G to open the Immediate Window at the bottom.
  2. Type the save command
    In the Immediate Window, type the following line exactly:
    ActiveDocument.SaveAs2 FileName:=ActiveDocument.FullName, FileFormat:=wdFormatDocumentDefault
  3. Press Enter
    Word saves the document as .docx using the current file name. The command overrides the format conversion that normally occurs.
  4. Verify the file extension
    Close Word and open the file location in File Explorer. Confirm the file ends with .docx.

ADVERTISEMENT

If Word Still Saves as .docm After These Fixes

Word Keeps Adding Macros From a Template

If your document is based on a template that contains macros, Word will re-add those macros each time you open the document. To break this link, open the document, go to Developer > Document Template, and uncheck Automatically update document styles. Then clear the template path and click OK.

ActiveX Controls Are Hidden in the Document Body

Some ActiveX controls are invisible during normal editing. To see all controls, go to File > Options > Customize Ribbon, enable the Developer tab, then click Design Mode on the Developer tab. All controls become visible and selectable. Delete them one by one.

Corrupted VBA Project Prevents Removal

If you cannot delete modules because Word crashes or gives an error, export the document content using Method 2. Create a new blank document, paste the content as unformatted text, and save as .docx. This discards the entire VBA project.

.docx vs .docm: Key Differences for Saving

Item .docx .docm
File extension .docx .docm
Macro storage Cannot store macros Stores VBA macros and ActiveX controls
Security prompt No macro warning on open Yellow bar warning when macros are present
File size Smaller Larger due to embedded code
Compatibility Opens in Word 2007 and later Opens in Word 2007 and later
Corporate policy Often allowed by email filters Often blocked by email filters

After removing all macros and controls from your document, you can save it as .docx without Word overriding the extension. Use the Developer tab to inspect for hidden macros before saving. If you frequently work with macro-free documents, consider disabling all macros in Trust Center to prevent accidental macro insertion that triggers the .docm conversion.

ADVERTISEMENT