Results 1 to 5 of 5
  1. #1
    Lounger
    Join Date
    Jan 2001
    Location
    Bay Area, California, USA
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Template from template loses code (Word 2000 SR1)

    I created a template containing a macro, which is run from an embedded {MACROBUTTON} field in the first paragraph. The macro deletes the first paragraph, which only contains instructions on how to use the template.

    This works great with the template, and any document created from the template.

    But I also want to be able to create new templates from this one, because it contains a specific Outline Numbering scheme.

    So when I create a new document from this template, Tools> Templates and Add-ins indicates the current Document Template.

    But as soon as I save the new document as a template, "Document Template" is blank and disabled (makes sense, it is now it's own template), but the code does not work anymore, because it's gone.

    How can I retain my code in this second-generation template?

    Thanks - Klaus

  2. #2
    2 Star Lounger
    Join Date
    Mar 2001
    Location
    Oregon, USA
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Template from template loses code (Word 2000 SR1)

    Hi Klaus,

    Open the original template and do a Save As from there, not from a document based on the template.

    HTH,

    Chris

  3. #3
    Lounger
    Join Date
    Jan 2001
    Location
    Bay Area, California, USA
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Template from template loses code (Word 2000 SR1)

    Fair enough, that'll work. It's just that this template will be shared with corporate users, that may have been (finally) trained to right-click and select "New", or are selecting the template via Word's File> New dialog, which includes the Workgroup Templates, where I store the template in question.

    Thanks for your reply.

    Klaus

  4. #4
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: Template from template loses code (Word 2000 SR1)

    Klaus,

    Just to clarify further, when the users select "New" or use File > New, they are creating a new document, based on that template. Any macros that are in the template stay in the template; the new document will not contain any of the macros.
    If you then save this (macro-less) document as a template, the new template will be similarly macro-less.
    You could then use the Organizer if necessary, to copy macros from the original template, into the new template.

    But given that you want to reproduce the outline numbering scheme that's in the original template, why is it necessary to give users access to creating their own new templates? - isn't letting them create new documents, based on your original template, good enough?

    Gary

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

    Re: Template from template loses code (Word 2000 SR1)

    Try this:

    Sub NewTemp()
    Documents.Add Template:=ActiveDocument.AttachedTemplate.FullName , NewTemplate:=True
    End Sub

Posting Permissions

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