Why is my Writer document saving as an MS-DOS Application?

Just reinstalled LibreOffice - have used in the past with no problems.

I tried saving some documents in .docx format. The first file saved fine, and opens fine.

Subsequent files are sometimes saving as MS-DOS Applications, even though I am selecting the same format as the first (Word 2007-2019)

It seems to happen just over half the time. Sometimes I can fix it by repeating ‘Save As’ from the open document, which seems to create a copy.

It’s very tiresome and has wasted a lot of my time.

Please can you tell me how to fix this?

What would be an “MS-DOS Application”?

I really don’t know.

It’s an error that’s making the files save with the wrong extension - I want them to save as .docx but they sometimes don’t, even though I am saving them as the same type and in the same folder.

There is a work-around to open them on my own PC, but I need to send these files as they are for my work, and I’m not sure how they would be opened at the other end if they have saved with the wrong extension.

I have unchecked the box in Control Panel > File Explorer Options > View > Hide extensions for known file types

Now I can see the file extension on all my documents, but it doesn’t stop it from randomly saving as an MS-DOS Application sometimes.

You state saving as “MS-DOS Application” but don’t state what file extension this gives.

I deleted them all, but I think it was .com

Just a thought, but reading how he’s turned off hidden file extensions, and knows how to select different save formats, but it sounds like he’s OS has associated .doc (or docx etc) file types as MS-DOS executable via some kind of registry change.

I personally (and please make sure you HAVE turned the option to hide known extensions) might consider trying to ‘run’ a .docx file you see listed as a DOS executable.

  1. If it’s a case of a registry change making docx files APPEAR as MS-DOS executables, the system will try and run them, and bug out with an error. This means that the file extension docx has been associated as a DOS Executable. This can be easy to fix, but seek help though, as changing registry settings can be bad if you mess it up.

  2. If the system opens the docx file in Libre, it’s probably a case of the registry calling docx files MS-DOS executable, but the run command is intact, in which case, AGAIN seeking help if unsure, you may just need to rename the registry entry.

(character limit reached)

In either case, you could just try a repair install of Libre (long time since I installed, so not sure if there is such an option), and you should be able to fix either error with minimal effort.

LibreOffice does not save any document type automatically with the file name extension .com, even if explicitly entered it would by default append the file name extension of the selected export filter (so you’d end up with filename.com.odt or filename.com.docx for example). See also Saving Documents. Make sure you don’t have some Windows quirk or virus causing this.