Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    543
    Thanks
    56
    Thanked 0 Times in 0 Posts

    Templates (9.0.2729)

    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.
    cheers

    Phil Carter

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Creating new document, not opening template (2000)

    <hr>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.<hr>
    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.)

  3. #3
    4 Star Lounger
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    543
    Thanks
    56
    Thanked 0 Times in 0 Posts

    Re: Creating new document, not opening template (2000)

    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.
    cheers

    Phil Carter

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •