Windows – Add multiple files of one type to the “New” context-menu

context menutemplateswindowswindows-registry

I fully understand how to add a "New" file/template to the context menu from Windows Explorer (Windows 7), by modifying the registry, as explained here for example:

How can I add an item to the 'new' context menu?

It works greats and the "filename" sub-key allow me to define a specific file located in C:\Windows\ShellNew. I thus configured there a .doc file corresponding to the template letter of my company (with logo, name, address…). Each time I want to create a letter, I just right-click and I got the template on my current directory !

Now, I would like to have several templates like this one for only 1 filetype (.doc)

The problem is that it seems that there is only one possible NullFile / FileName / Data / Command sub-key in the ShellNew key.

Is there any workaround, with a Command value for example ? Or a similar behavior without modifying the registry?

I'd just like to easily create different Word templates from my current directory, and avoid a copy/paste.

Thank you for your answers or advices.

Best Answer

The first thing you need to do is set the Command string (Right Click > New > String Value) to %SystemRoot%\System32\cmd.exe /c "%SystemRoot%\ShellNew\WordTemplates.bat ^"%1^"" (assuming that the templates are at C:\Windows\ShellNew).

Then, create a new file at C:\Windows\ShellNew\WordTemplates.bat. In this file, place the following lines of code:

@echo off
echo What document would you like to create?
echo 1 - Template 1
echo 2 - The best template
echo 3 - Sample template
echo 4 - Template 4
echo 5 - Template 5
echo 6 - Template 6
echo 7 - Template 7
echo 8 - Template 8
echo 9 - Template 9
echo 0 - Template 10
choice /c 123457890>nul
copy "%SystemRoot%\ShellNew\Template%errorlevel%.docx" %1>nul

You can replace the descriptions of each template to your preference. The file names of each template must be Template1.docx, Template2.docx, ..., Template10.docx, Template11.docx, etc. The code above will only allow 10 templates. If you would like to specify 26 templates, you can use the alphabet as the choices. You can also change the file extension to .doc.

Related Question