Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Nov 2008
    Location
    Sydney, New South Wales, Australia
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi All,

    I have developed a template which contains a number of macros.

    When I create a document from the template, save it and send it to somebody else the macros are not part of the document and therefore it does not function correctly.

    When I look under Tools -> Templates and Add-Ins the template listed is as it was when the document was created


    Is there a way to save the macros, forms etc that were in the template as part of the "instance" document so that it will work correctly?

    Thanks in advance

    Ross

  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
    [quote name='RossJ' post='763817' date='05-Mar-2009 21:41']Hi All,

    I have developed a template which contains a number of macros.

    When I create a document from the template, save it and send it to somebody else the macros are not part of the document and therefore it does not function correctly.[/quote]
    When you create a document from a template, the contents and style definitions are "cloned" into the document. The template's macros and autotext entries remain available only as long as the "attached" template is available to the user opening the document.

    You could send the template along with the document, and rely on the recipient to coordinate them together. Or, you could manually copy the macros into the document (using the Organizer, from the Macros dialog). Neither of those is a perfect solution, but I think the latter is preferable if the recipient's security settings permit it.

    Note that in Word 2007, you need to save a document containing macros with a different file extension or the macros will be stripped.

  3. #3
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts
    It might be easier not to use a template at all.

    Create a document that contains all the Macros and other content that you need. Copy this document each time you need to create a new one.

  4. #4
    New Lounger
    Join Date
    Nov 2008
    Location
    Sydney, New South Wales, Australia
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='jscher2000' post='763821' date='06-Mar-2009 08:31']When you create a document from a template, the contents and style definitions are "cloned" into the document. The template's macros and autotext entries remain available only as long as the "attached" template is available to the user opening the document.

    You could send the template along with the document, and rely on the recipient to coordinate them together. Or, you could manually copy the macros into the document (using the Organizer, from the Macros dialog). Neither of those is a perfect solution, but I think the latter is preferable if the recipient's security settings permit it.

    Note that in Word 2007, you need to save a document containing macros with a different file extension or the macros will be stripped.[/quote]

    Thanks for the reply

    Is there a way to also "clone" the macro's and forms etc to the document automatically?

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    [quote name='RossJ' post='763824' date='06-Mar-2009 10:15']Thanks for the reply

    Is there a way to also "clone" the macro's and forms etc to the document automatically?[/quote]
    See StuartR's reply - it came in just before you posted yours.

Posting Permissions

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