Open a new Word 2000 file in Lister context menu

Hello:

I want to open a new Word 2000 file in Lister context menu. Right-click, New (I have it already), and then a menu item that opens a dot file (Working.dot, that is in the Word 2000 template folder). Just, I cannot remember what command to put in the Command Editor's field "Function".

FileType NEW=Working.doc
FileType NEW=Working.dot

do not work.

Grateful for help.

Hans L

Here's an example modified from directly out of the help file / manual:

FileType NEW .doc NEWNAME "norename:working.doc"

You can try .dot instead - but not sure if that is going to work... I believe the .DOT template is what is used to create a 'registered' new .DOC file. See what you come up with... If you have trouble getting a new actual "template" file to be created, you can always forget about bothering with the 'FileType NEW' command altogether and just creating a button that runs a raw 'Copy' command to copy the .DOT template to the current directory as working.dot...

Thanks, Steje.

What your code did was to create a file working.doc or working.dot, and as far as I can see, it was based on Normal.dot (it was certainly not based on Working.dot).

Not sure I was clear enough: I want a file to be created with any name (.e.g., the usual "New Microsoft Word Document"). The file should be based on Working.dot (and not on Normal.dot).

Would that change your recommendation?

Regards,

Hans L

Do you just want a button that copies Working.dot to a new name/place?

No, Leo.

I have one button already,

FileType NEW=.doc

which creates a new, blank file with the default name "New Microsoft Word Document.doc", and this file is always based on the template Normal.dot.

What I want is another button that creates a new, blank file called, for instance, "New_file.doc", and I want that file to be based on a .dot file (template) I created called Working.dot.

(The templates are located in C:\Users\"Owner"\AppData\Roaming\Microsoft\Templates in Word 2000.)

Regards,

Hans L

Similar to the question Leo just asked - that's why I trailed off in my first reply suggesting that:

Though... to be honest, if you're trying to do that in order to use a copy of a .DOT file as a regular "document" instead of as a "template" for a new document, then I think you might not want to do that. I seem to recall a document "template" (.dot) file having some internal differences to an actual "document" (.doc) file. So unless you're using this idea to create new "template" files... you might want to open your original working.dot file and then re-save it from within Word as an actual "document" (working.doc) file. In any case, you can then use a command like:

Copy HERE FILE "D:\templates\working.docx" WHENEXISTS=rename

...which will copy the "FILE" from whatever location you want to keep this "template" to your current folder.

Steje, yes, I sent you in the wrong direction by not being clear. Sorry about that.

Now, there is no problem with double-clicking on Working.dot, because when you do, the result is a new, blank document called "Document1", based on the template Working.dot. When you click Save or Save As, you are prompted for "Save in:" and "File name:" (destination and name).

So, what I rally need is a button that, when clicked, creates a double-clicks on file "C:\Users\Hans L\AppData\Roaming\Microsoft\Templates\Working.dot".

Regards,

Hans L

Hans

Just create a button with the following command ...

"C:\Users\Hans L\AppData\Roaming\Microsoft\Templates\Working.dot"[/b]

It turns out to be that simple! :smiley:

Regards, AB

Just saw your reply after posting mine... ok, so then given the behavior you just described - you could just write a command in your button to 'open' the working.dot template, and it would open it as "Document1". Unfortunately, even if you add a "cd {s}" command to the button to set the current folder as the "working" directory, it looks like recent versions of Word don't pay any attention to the current working folder. They always want to save auto-documents like those based on a template (as opposed to an actual existing .doc file) to the 'default save location' set in Word options.

So, even if you were to copy the template (working.dot) file to the current folder, then have Word open that copy in the current folder... when you go to save it, Word would still prompt you to save it in the default save folder, not the current one.

If none of that matters to you - then you can just create a context menu item or button that runs "C:\Users\Hans L\AppData\Roaming\Microsoft\Templates\Working.dot" which will open up word as "Document1".

Otherwise, I think you're going to have to save that template off as a word .doc file, and copy THAT to the current folder, after which... opening it and then trying to save your changes will naturally default to the new/current document location instead of the 'default save location'...

Know what I'm saying...?

EDIT: @ AB... unless he doesn't want to have to then always browse to his current folder within Word in order to save it where he wants it... per my notes above. At least - this is the behavior on Office 2010. Maybe older versions of Word from Office 2000 pay attention to the current working directory.

Yes, guys, you are right, of course. It is as simple as to issue the command

"C:\Users\'Owner'\AppData\Roaming\Microsoft\Templates\Working.dot".

Now, one perhaps, in this particular case, even simpler way would be

Copy FILE "C:\Users\'Owner'\AppData\Roaming\Microsoft\Templates\Working.dot" TO "current folder\New file.doc".

Because, when you open and then save this file, it will not default to My Documents (or other default), but to the current folder.

So, now, the crucial question: is there a code for "current folder"?

Regards,

Hans L

... or, instead of copy, could one use

"C:\Users\'Owner'\AppData\Roaming\Microsoft\Templates\Working.dot"

and specify, somehow, "New file.doc" in current folder?

Hans L

Sorry for my long-winded responses... just the way I roll sometimes :slight_smile:...

I'm really not sure if it's ok to directly copy a .dot file to a .doc file. You can try it... but comments I've seen elsewhere in webworld say not to do this. If you want to see if this causes problems down the road for you or not, you can do it easily by modifying the copy command I suggested above to something like:

Copy HERE FILE "D:\templates\working.dotx" AS "New File.doc" WHENEXISTS=rename

...good luck, hope it doesn't create an issue that's not immediately obvious.

Maybe it's not an issue, and to be honest... I worked out a way of adding a new file extension definition that would allow you to use your template with the regular "FileType NEW" command as you originally intended. I just deleted all of that because I noticed that using the "New" menu in this fashion from a template file simply copies the file anyway! So using the method above is just as good or bad... What I can say is that directly opening a .dotx template file, then saving "Document1" without any changes - as a .docx file results in a file that has some sort of binary differences to the original template (as part of being .4 kb larger than the original template file). Not sure how bad that is or isn't... just an observation perhaps related to the cautions I've found on the web about not renaming .dot files to .doc.

So I'd still suggest saving off a copy of that template to a regular .doc file and using that as the file to copy to the current folder...

Worked like a charm!!!

Thank you very much, Steje et al.

Hans L