File Cannot Open

Fix Microsoft Word DOCX Files Opening in a Text Editor or Showing Code

Jason MillerJason Miller Nov 13, 2026 869 views

Question details

The user needs downloaded DOCX documents to display readable document content in Microsoft Word instead of opening in a text editor or showing code.

Product
Microsoft Word / Word for Microsoft 365
Device & OS
not provided
Scenario
Opening DOCX documents downloaded from the internet, including documents exported by writing software.
Observed behavior
Downloaded DOCX files open in a text editor described as Note, or display document code rather than formatted Word content.
Before you start

Locate a downloaded file and confirm that its extension is .docx; on Windows, enable File name extensions from File Explorer's View menu if necessary. Only unblock or open downloaded documents from sources you trust.

Solution 1Recommended

Open the DOCX file directly in Word and check its default app

Use this first when double-clicking a DOCX file launches a text editor instead of Microsoft Word.

1
Open the document from Word

Start Microsoft Word, select File > Open > Browse, and choose the downloaded DOCX file. If it displays correctly, the file is readable and its default opening app may be incorrect.

2
Choose Word as the opening app

On Windows, right-click the DOCX file in File Explorer and select Open with > Choose another app. Select Microsoft Word and choose Always or the option to always use this app for .docx files, depending on your Windows version.

3
Test the default app

Close the document and double-click the DOCX file in File Explorer. It should now launch Word rather than the text editor.

Open the DOCX file directly in Word and check its default app
Code does not always mean the document is damaged: A DOCX file is a package containing XML and other document data. Opening it in a text editor can display unreadable characters or underlying data instead of the formatted document.
Free Microsoft Office alternative

Open and Edit Word Documents with WPS Writer

WPS Office is a free, lightweight alternative with a familiar interface and support for Microsoft Word formats. Use WPS Writer to open valid DOCX downloads and continue editing existing documents with minimal workflow changes; it does not repair Microsoft Word settings or guarantee recovery of invalid files.

Open and edit valid downloaded DOCX documents in WPS Writer.Supports Microsoft Word .doc and .docx formats.Familiar document-editing controls make migration easier.A lightweight Office alternative for everyday document work.
microsoft office alternative - wps office

Frequently Asked Questions

Why do my DOCX downloads open in a text editor?

The .docx extension may be associated with a text editor rather than Word. On Windows, right-click a DOCX file, select Open with > Choose another app, choose Microsoft Word, and set it as the app to always use for .docx files.

What if the file still shows code when I open it from Word?

If File > Open > Browse in Word still displays code, the download may not contain a valid DOCX document. Download it again or use the source application's Export or Save As command to create a genuine Word document. Changing the filename extension is not a conversion.

Where is the Unblock option for a downloaded document?

On Windows, right-click the file in File Explorer and select Properties > General. If Windows has marked the file as downloaded from another computer, an Unblock option may appear near the bottom. Use it only for a trusted file; if it is absent, there is nothing to unblock there.

Can saving as DOC and then DOCX resolve the problem?

It can help if the original application's DOCX export is problematic but its DOC export is valid. Export as .doc from that application, open it in Word, then use File > Save As to save as Word Document (*.docx). Review the result because conversion through DOC can change formatting.

Can WPS Writer open the downloaded DOCX instead?

WPS Writer can open valid Microsoft Word .docx files. Launch WPS Writer, select Menu > Open, and choose the downloaded document. It is an alternative editor, not a fix for Word's default-app settings or a guarantee that an invalid file will open.