Opening empty .docx document not based on Normal template in lister context menu

I have asked the question below a couple of times over the years, but I am still grappling with the issue. Perhaps someone can answer definitively whether is possible or not to ...

open an empty Word document not based on the Normal template (but a custom template) in a lister context menu

I have, during the last few days, tried many combinations of NEW and OPEN and other stuff, but always, I have come up short.

Thank you!

Hans L

Is there something now wrong with the previous solutions the forum provided which you said worked at the time?

If there is, please tell us what is wrong with the old solutions, else we don't know which direction to go when suggesting something new.

If there isn't, and you just forgot them, you can find them here:

Okay, Leo, I check several of the old "solutions", but none worked. What I did not do was to document what I was doing.

One new issue may be that I do not want to edit template Normal.dotm to my liking, but base all new docx on my custom template.

In any event, I will document and get back.

Hans L

The most basic suggestion was to save an alternative empty document somewhere and create a button that copies it to a new file. That should still work if nothing else does. (If any of the other suggestions have stopped working, it may be more a question about versions of Word than Opus.)

No, Leo, the most basic question is whether the developers of DOpus know if it is possible to open an new Word documents using a non-Normal.docm template in Dopus.

Your question is one for Microsoft, not us. If Word can do it then you can do it from Opus, but it's fundamentally a Word question.

Jon, NEW works well with the Normal template, but not with a custom-made template. I respectfully refuse to believe this is a MS issue. I believe that Dopus does not provide the custom-template option. NEW must have an intrinsic option for Normal.docm, but not the same option for a custom template. If I am wrong about this, I will admit it, but I am skeptical.

Sincerely,

Hans Leander

Opus has absolutely nothing whatsoever to do with Word templates.

The NEW menu just creates a file as specified in the registry. It's up to Word to specify the file that is created.

If you want to create a different file to the one Word normally makes, you can make a copy of that file somewhere and make an Opus button which copies it to a new place. (This is actually all the NEW menu does in many cases. The location of the file to copy is in the registry.) Instructions on how to do that are in one of the threads above.

Word may also have a command line argument or something else which can tell it to open or create a new file using a different template to normal. There seemed to be some discussion about that in one of the threads as well. But that's a question about how to use Word, not Opus. It has nothing at all to do with Opus, unless you have questions about how to turn thr command line into an Opus button, which we can answer. We can't answer many questions about Word as we didn't write Word, aren't experts in it, and aren't paid to support it. Those are Microsoft's jobs (or you may find answers on a more general help site or a site about Word).

I think the older threads already have at least two solutions that you should be able to use, and that you also said worked in the past.

Okay, Leo, I can buy that. Would you be able to tell me where in the registry NEW points?

Hans L

Hi HansL!
Its possible, here is a link:
https://www.askvg.com/how-to-add-remove-items-from-new-menu-in-windows

Basically:

  • Create your custom template and save it in word. It is located in:
    C:\Users\USERNAME\Documents\Custom Office Templates\customtemplate.dotx

  • Then use REGEDIT, open HKEY_CLASSES_ROOT and look for .dotx.
    I'm using Win10 so I go into: .dotx\word.template.12\shellnew and create the registry key and string value mentioned in that link.

  • Then copy your:
    C:\Users\USERNAME\Documents\Custom Office Templates\customtemplate.dotx
    to: C:\windows\shellnew and go back to REGEDIT and create that last entry with your filename as mentioned also in the link i provided.

Also: There is a commandline switch: Winword.exe /tcustomtemplate (NOTE THERE IS NO SPACE BETWEEN /t AND customtemplate) it only opens word with the specified custom template, but it's not what you want, it opens it but you have to save it yourself.

DOPUS itself is not created to manipulate registry entries, if "microsoft" does not provide a way to open as new custom template, and you do not have admin rights, THEN there is OPUS to solve it with alternative methods, like Leo described, creating a button which copies your template file to the desired location then opens it. You can put the button on any of the DOPUS rightclick menus.

I'm in an office where I can not test it due to not being able to edit registry values, but I hope this was helpful.

1 Like

Tortilladude, thanks for your post. Here is what I have in Registry:

Here is what i have in the Dopus Command Editor: FileType NEW=.docx

Still, while the new document opens with a generic name in the lister, it still opens with the Normal.dotm template.

What am I overlooking?

Hans L

Here is what i have in Edit "Micriosoft Word Document" [.docx] File Type, Action, Open:

C:\Program Files (x86)\Microsoft Office\Office14\WINWORD.EXE /n "%1"

...ContextMenu, New:

"C:\Program Files (x86)\Microsoft Office\Office14\WINWORD.EXE" /n /f "%1"

Interferring?

Hans L

And I use Windows 7 Ultimate/Hans L

Does not work in Windows Explorer either.

Hans L

Jon, yes, it is. As I have said below (today), my 'solution' does not work in Windows Explorer either. I am asking in a Word forum.

Regards,

Hans L

Ok so on my home computer i tried it. I have Win10 with Office2016. For me, it works, but i figured out the description i gave you is a bit incorrect. So once more:

  1. Use REGEDIT, open HKEY_CLASSES_ROOT and look for .dotx
  2. Create a NEW KEY under .dotx named ShellNew
  3. Under ShellNew create 2 string values: NullFile and FileName
  4. ShellNew is just empty, but FileName must contain the path to customtemplate, for example: C:\Users\Doug\Documents\Custom Office Templates\customtemplate.dotx

On my system it works. I right click in Windows Explorer, go to New, select Microsoft Word Template. The result is a created file with active inline renaming. So i enter name or just press enter, then if i open that document it will be my saved custom empty template.

Win7 should have kind of the same structure in the registry. I havent been experimenting with a DOPUS button to create the new template and then also open it, but the above method will be system wide.

About FileTypes in DOPUS
By editing FileTypes you are not gaining anything new in the "NEW context menu" which is an operating system (Windows) function, but you will gain a new entry when you right-click the file itself (not when right-clicking on empty space in the DOPUS lister or Windows Explorer). Your FileType settings only matter if you edit the File Type, Action, Open: C:\Program Files (x86)\Microsoft Office\Office14\WINWORD.EXE /n "%1" because it can make Word open the file with different commandline switches and if you mistype or make an error in it then Word may not be able to open the file if you double-click on it.

Tortilladude, I followed your revised instruction, and now, when I right-click (in Windows Explorer), a file with the name

New Microsoft Word Template.doTx

is crated, and when I click on it, a file named Document1 opens, and when I save it, i have to select a folder to save it in.

This is not what I was looking for.

When I right-click, I want a file

New Microsoft Word Template.doCx

to open, and when I save it, it should be saved in the folder where it was created.

Anything I can do to achieve this?

Hans L

Hi HansL! What you described is the purpose of a template, so users dont accidentally overwrite it lets say in an office environment where lotsa people use the same. If you create a template and if you open it, it always asks for a SAVE AS if you try to save it. It is its function. So to get what you need, i was experimenting:
docd.zip (764 Bytes)

So the thing is, to do what you want, you need to modify the default .DOCX entry in the REGEDIT. To avoid it, i created a .DOCD extension and defined it to open a pre-saved document (.docd\SHELLNEW, basically i copied the .docx and edited it). Now when i right click i get a new document "template" but not in word sense, in theory, because it will be just a saved .docx which is in my C:\TEMP\customtemplate.docx. Right-click, New, Create... i get New Microsoft Word Document.docd with active inline renaming. Press enter or give name. If .docd is open, i edit it then save it, right there where i created it. For this i linked you a simple REGEDIT export of the mentioned .docd format.

This is how my registry looks. I exported the .docx, edited it and renamed docx to docd, then edited it in regedit to look like this:

I do not know if its possible to rename things in the "New Context Menu", havent found a solution for that, so you will see two of the same "Microsoft Word Document" one will be my .docd and the other will be the real .docx. So the method works, import my stuff into your registry and test it. If you really really need this functionality then you should modify YOUR default .docx in your registry, but if you get any errors you may have to repair it yourself by running office setup repair.

If this is all too complicated or fiddly for you, here comes DOPUS. Create a word document, format it, save it, then create a button just like Leo told you. Save your doc, put it in a directory and the button will copy it to the current folder you are viewing and open it.

Tortilladude, I am giving up this effort, since there seems to be no other way than to edit the Normal.dotm; then, what I want works. However, I do not want to fiddle with Normal, so I will go with the DOpus button.

Thank you for your valiant efforts, which at least has shown that what I want cannot be done.

Best regards,

Hans L