• Templates (9.0.2729)

    Author
    Topic
    #367491

    I am running Word 2000 under Win2000 and am having trouble with a macro. I have developed a template that uses a macro for data input. If I open the template from the Word toolbar it “Opens” the template and therefore must be saved as a template, even using the Save As function the file option is “greyed out”, but if I double click on the file using Windows Explorer it opens a new document based on the template. This then allows the report to be saved as a document.
    The macro is executed via the AutoNew routine.

    Viewing 0 reply threads
    Author
    Replies
    • #573207

      [indent]


      If I open the template from the Word toolbar it “Opens” the template and therefore must be saved as a template, even using the Save As function the file option is “greyed out”, but if I double click on the file using Windows Explorer it opens a new document based on the template.


      [/indent]Since you are using an AutoNew macro, I assume you prefer the second behavior. Copy or move your template into your User Templates folder and you will be able to easily create new documents based on your template through the File|New… dialog. Since these will be documents, rather than templates, you will of course be able to save them wherever you like.

      There are two ways to do this:

      (1) Look up your User Templates folder under Tools|Options|File Locations and copy the template to that folder using Windows Explorer.

      (2) Right-click and copy the template in Windows Explorer, then, in Word, open the File|New… dialog, right-click an empty space and paste.

      Prior to Word 2000, you also could do the following, but (thankfully) Word doesn’t do this any more:

      (3) Open your template using File|Open (or the equivalent icon) and do a File|Save As… By default, Word wants to save a template in your User Templates folder.

      If you are looking for a solution that does not require you or other users to have the template in a particular location, then you can add code to the template that will force users to create a new document when they inadvertently open it. See the code in Post #114960. (Note that this code prevents you from editing your own template by closing it immediately. Hold the shift key while opening to bypass the AutoOpen macro.)

      • #573477

        Thanks for that. I will try inserting the code.
        What I originally wanted to do was to create a new document from the template and run the macro from a toolbar selection. I found that even pointing the menu selection to the Templates folder “opened” the document and did not create a “new” document as I wanted causing the problem already mentioned.

    Viewing 0 reply threads
    Reply To: Templates (9.0.2729)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: