How to change file format .docx in Context Menu > New

I have changed the default file type to be a .docx when saving which works. When I go into the context menu and select New > OpenDocumentText it still creates a file with the .odt extension and I would like it to create a file with the .docx extension.

I have changed the file type in C:\Program Files\LibreOffice\share\template\shellnew to soffice.docx but this has not change things either.

Always store your important documents in the native, international standard ODF file formats of the LibreOffice (.odt for the Writer). And create (export) a copy at the end of the editing into the foreign file format.
Note:
There is not (never was and never will be) 100% compatibility between the different file formats. You will lose some formatting properties (or even some content) when you save your documents into foreign file formats.

You’re not in save context. In open/create context this is the intended and expected behaviour. Changing template extension will not change it because LO does not trust extensions. It reads some chunk at the beginning of the file and guesses real contents type. Since template is ODF, it will by default assign .odt extension. However, if you forced .docx saving, it should be turned to this extension at save time.

Re-read carefully @Zizi64’s advice about save format. It is much better to use any application with its own native formats.

Thanks for your reply. Point taken about storing in native formats

When you create a new file with the file type OpenDocument Text in the file manager, you have circumvented the entire LibreOffice suite and explicitly requested an odt file. The three letters “odt” is an abbreviation for OpenDocument Text.

You can subsequently open your odt file in MS Word, LibreOffice Writer, or any other application which supports the ODF standard, but this may be beside the point.

To create a docx file from the file manager, you need to request the ‘Office Open XML’ file type. In the context menu this usually appears as ‘Microsoft Word file’.

Of course, using DOCX as a primary file format with an application using a different native file format (LibreOffice Writer) is a very bad idea. However, here is your footgun.

The shell context menu operation (which is what you are talking about) is indeed operating system-dependent.
Since you are on Windows, you need to use Windows Registry editor (regedit.exe) to change HKEY_CLASSES_ROOT\.docx key.

(Updated steps for newer versions are at Right-click in a Win11 folder > New > OpenDocument Text: Can it open a .doc file rather than .odt? - #5 by mikekaganski)

  1. You notice which (Default) value is there: on the screenshot it’s “Word.Document.12”.
    image

  2. You expand the key, and check if it contains a aubkey with exactly the same name; if absent, you create it:
    image

  3. In it, you make sure to have ShellNew subkey:
    image

  4. In it, you make sure that FileName string value points to a “template” DOCX file you want to use as your starting point.

Thanks for your reply and the walkthrough. Out of interest, I tried to follow the steps but didn’t make the change I was originally looking for. I have however had a rethink about saving it in the native format and will be doing that instead.