NEW with a twist

Hello:

I have a lister context menu with NEW = .docx (new Word 2010 document), and it works (obvioulsy with Normal.dotm).

However, if I do not want to fiddle with Word (chaning to another default template for new documents, if at all possible), how can I achieve almost the same, that is, opening a new docx document from a custom .dotm template (NOT Normal.dotm) located anywhere (e.g. C:\Custome Template\Customenew.dotm)?

I have looked in FileType, but I do not understand fully the instructions for NEW, and if I use FileType open FILE "C:\Custome Template\Customenew.dotm, a new .docx file doesn't open, but the template file Customenew.dotm opens (which is correct, I assume).

So, what should i use to get the custom template to be considered a template? Is there any way?

Thanks,

Hans L

You can probably do what you're aiming for by simply saving a Word document somewhere and making a button to copy it to a new file in the current folder. I'm not familiar enough with Word to know if that's the same as using a new template, or if Word does more than just copy the .dotm file to a new .docx when creating a new document.

Instead of using NEW, have you tried creating a button that opens the specific dotx template itself?
When you open a dotx document, Word does not open is as an editable template. Instead, it creates a new document using that template.

Yes, you are probably right, Leo. I can use the new template and crate an empty document with the correct settings, and the open that file over and over.

Thank you for your insight into this simple solution.

Best regards,

Hans L

No, not a button. I want the Context menu option. When I opened the specific dotx (dotm, really) file via the context menu (FleType open FILE ...), it opened the template file. So, that is not the correct OPEN command (I have the same OPEN in the file context menu, which is handy sometimes).

So, I would need a command that opens my custom template file the same way as when I double-click on it, in which case it creates a new documents using the template.

Is the problem the word "New" in my context menu? I just created a new menu button in the context menu, so now, I just have to figure out what code to put in there. I will look in Help, but if you know, do not hesitate :slight_smile:

Regards,

Hans L

I wrote a response earlier that did not seem to have made it. So, let me repeat some and then add some new stuff.

What I did was this:

FileType Action=dblclk FILE "My custom template.dotm"

Works beautifully.

Now, I could not get the keyboard key programming of my Word key to work. It just kept opening the template file. Well, I figured that Word would have a switch that would fix that. And, indeed, it had. Here it is:

"C:\Program Files (x86)\Microsoft Office\Office14\WINWORD.EXE" /t"My custom template.dotm"

Yes, no space between the "t" and the name of the template file. When I had a space, thinking that the no-space was a misprint, again, the template file was simply opened.

Another way to achieve the above is to edit the Normal.dotm file (default template) with the format you like, but one problem with that is that if this file gets corrupted, and you delete it and start Word again – whereupon a new, default Normal.dotm is created –, the newly created file has the default Microsoft format (which is a 10 point space after each paragraph and a linespace of 1.5, something that must have been designed by a competitor's spy :slight_smile:.

Thank you, Leo and Playful, for your help and inspiration.

Hans L

Hi Hans,
After a bit of testing, this seems to do it.
You need to use the /t command line switch when launching word.
Here is the command I tried:

"C:\Program Files (x86)\Microsoft Office\Office14\WINWORD.EXE" /t{filepath}

When I select the template file and click the button (should be the same in context menu), it opens a new file based on that template.

Obviously you need to change the path to the correct path of your winword.
Hope I understood what you were asking.

Also, if you don't want to select the template but just want a command that creates a new file based on that template, just use the template's full path in the function field, e.g.

C:\Users\Hans\Desktop\HansTemplate.dotx

Okay, finally tried in the context menu.
Still using /t, modify the end of command so it looks like this:

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

Then right-click NEW works

Playful, I guess you did not see my last post, where I had done mainly what you suggest. I thank you nevertheless.

Hans L

Wow, yes, I had completely missed that. :slight_smile:
Glad you sorted it out. It seems like a very sensible application of "new" for a template.

Thank you for the kind words, and again, thank you!

Hans L