How to you remove the reference to a template

Discussion in 'Word Programming' started by poranui, May 8, 2009.

  1. poranui

    poranui Guest

    I created a document using word 2007, it was based on a template which
    already had the styles in that I wanted. However the template also has
    loads of macros in it which for this document I do not need. It also
    has a custom ribbon which is not needed either.
    As the macros and ribbon are stored in the template, I cannot remove
    them without editing the template itself which I do not want to do.
    So how can I remove the reference to the template so that the ribbon
    is not visible when the document is opened.


    Also as an aside, it means that although it is a .docx file it is
    still macro enabled because the template it was based on is maacro
    enabled which seems a bit of a potential security threat.
     
    poranui, May 8, 2009
    #1
    1. Advertisements

  2. poranui

    poranui Guest

    Apologies, ignore the question I found the solution just after I
    posted the question
    temporarily rename the template, open the doc, then it will prompt you
    to delete the reference, the next time you open the document the
    reference is gone.
     
    poranui, May 8, 2009
    #2
    1. Advertisements

  3. poranui

    Jay Freedman Guest

    On Thu, 7 May 2009 16:37:26 -0700 (PDT), poranui <> wrote:

    >I created a document using word 2007, it was based on a template which
    >already had the styles in that I wanted. However the template also has
    >loads of macros in it which for this document I do not need. It also
    >has a custom ribbon which is not needed either.
    >As the macros and ribbon are stored in the template, I cannot remove
    >them without editing the template itself which I do not want to do.
    >So how can I remove the reference to the template so that the ribbon
    >is not visible when the document is opened.
    >
    >
    >Also as an aside, it means that although it is a .docx file it is
    >still macro enabled because the template it was based on is maacro
    >enabled which seems a bit of a potential security threat.


    Go to the Developer tab and click the Document Template button. In the dialog,
    click the Attach button in the upper right and choose the Normal.dotm template
    to replace the document's base template.

    The macros and custom ribbon will be gone. Also, the document will _not_ be
    macro-enabled -- a .docx file cannot be macro-enabled by definition -- and there
    is no security threat.

    --
    Regards,
    Jay Freedman
    Microsoft Word MVP
    Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
     
    Jay Freedman, May 8, 2009
    #3
  4. poranui

    poranui Guest

    On May 8, 12:22 pm, Jay Freedman <> wrote:

    >
    > >Also as an aside, it means that although it is a .docx file it is
    > >still macro enabled because the template it was based on is maacro
    > >enabled which seems a bit of a potential security threat.

    >
    > Go to the Developer tab and click the Document Template button. In the dialog,
    > click the Attach button in the upper right and choose the Normal.dotm template
    > to replace the document's base template.

    Thanks, that is an easier way


    > The macros and custom ribbon will be gone. Also, the document will _not_ be
    > macro-enabled -- a .docx file cannot be macro-enabled by definition -- and there
    > is no security threat.

    Although it is a docx the macros in the template that it was based on
    are still enabled and do still work as long as the user has access to
    the template.
    I agree you can't save macros inside the docx file itself, but it can
    still run macros from the template.
     
    poranui, May 8, 2009
    #4
  5. poranui

    Jay Freedman Guest

    On Thu, 7 May 2009 17:47:40 -0700 (PDT), poranui <> wrote:

    >On May 8, 12:22 pm, Jay Freedman <> wrote:
    >
    >>
    >> >Also as an aside, it means that although it is a .docx file it is
    >> >still macro enabled because the template it was based on is maacro
    >> >enabled which seems a bit of a potential security threat.

    >>
    >> Go to the Developer tab and click the Document Template button. In the dialog,
    >> click the Attach button in the upper right and choose the Normal.dotm template
    >> to replace the document's base template.

    >Thanks, that is an easier way
    >
    >
    >> The macros and custom ribbon will be gone. Also, the document will _not_ be
    >> macro-enabled -- a .docx file cannot be macro-enabled by definition -- and there
    >> is no security threat.

    >Although it is a docx the macros in the template that it was based on
    >are still enabled and do still work as long as the user has access to
    >the template.
    >I agree you can't save macros inside the docx file itself, but it can
    >still run macros from the template.


    That's correct. It's a different interpretation of the term "macro-enabled".

    In Microsoft lingo, a "macro-enabled" document is one that's saved as a .docm
    file, with the macros in the document itself rather than in the template. If you
    have a .docm file with macros and you use Save As to save it as a .docx file,
    Word will warn you that it will remove the macros.

    Having macros in an attached template, when that template is stored in a trusted
    location (usually the Templates folder), is not a security threat -- especially
    if the macro project is digitally signed.

    --
    Regards,
    Jay Freedman
    Microsoft Word MVP
    Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
     
    Jay Freedman, May 8, 2009
    #5
  6. poranui

    poranui Guest

    ..
    >
    > Having macros in an attached template, when that template is stored in a trusted
    > location (usually the Templates folder), is not a security threat -- especially
    > if the macro project is digitally signed.
    >

    Probably not a threat in our case as we control the templates quite
    strictly, though most staff tend just to enable macros regardless of
    where the document is from. It probably would only be an issue if
    there was a disgruntled employee who put a malicious template in a
    pulic shared network drive. slightly going off topic but would it be
    possible for the reference to be to a template on a web server?

    I have to say I was surprised that .docx were not what I thought they
    were, I had previously thought that they would not run macros at all.
     
    poranui, May 8, 2009
    #6
  7. poranui

    Jay Freedman Guest

    poranui wrote:
    > .
    >>
    >> Having macros in an attached template, when that template is stored
    >> in a trusted location (usually the Templates folder), is not a
    >> security threat -- especially if the macro project is digitally
    >> signed.
    >>

    > Probably not a threat in our case as we control the templates quite
    > strictly, though most staff tend just to enable macros regardless of
    > where the document is from. It probably would only be an issue if
    > there was a disgruntled employee who put a malicious template in a
    > pulic shared network drive. slightly going off topic but would it be
    > possible for the reference to be to a template on a web server?


    Yes, although it would be a file server rather than (or in addition to) a
    web server. Just use the Browse button in the Templates and Add-Ins dialog
    to locate the proper template. Of course, that means everyone who opens the
    document must have the rights to access the server, the share, the folder,
    and the file.

    > I have to say I was surprised that .docx were not what I thought they
    > were, I had previously thought that they would not run macros at all.


    With respect to macros, a .docx is exactly like a .doc file except that it
    can't _contain_ the macros but must access them from an attached template.
    Only a .docm file can also contain the macros.

    --
    Regards,
    Jay Freedman
    Microsoft Word MVP
    Email cannot be acknowledged; please post all follow-ups to the newsgroup so
    all may benefit.
     
    Jay Freedman, May 8, 2009
    #7
  8. poranui

    poranui Guest

    > >but would it be
    > > possible for the reference to be to a template on a web server?

    >
    > Yes, although it would be a file server rather than (or in addition to) a
    > web server. Just use the Browse button in the Templates and Add-Ins dialog
    > to locate the proper template. Of course, that means everyone who opens the
    > document must have the rights to access the server, the share, the folder,
    > and the file.


    I sucessfully managed to add a reference to a share point server
    template. I can run the macros in the template, though my collegue
    only gets a warning about them, but cannot see them in the template,
    however she still gets the custom toolbar.
     
    poranui, May 10, 2009
    #8
  9. poranui

    Guest

    On Friday, May 8, 2009 5:52:56 AM UTC+5:30, Jay Freedman wrote:
    > On Thu, 7 May 2009 16:37:26 -0700 (PDT), poranui <> wrote:
    >
    > >I created a document using word 2007, it was based on a template which
    > >already had the styles in that I wanted. However the template also has
    > >loads of macros in it which for this document I do not need. It also
    > >has a custom ribbon which is not needed either.
    > >As the macros and ribbon are stored in the template, I cannot remove
    > >them without editing the template itself which I do not want to do.
    > >So how can I remove the reference to the template so that the ribbon
    > >is not visible when the document is opened.
    > >
    > >
    > >Also as an aside, it means that although it is a .docx file it is
    > >still macro enabled because the template it was based on is maacro
    > >enabled which seems a bit of a potential security threat.

    >
    > Go to the Developer tab and click the Document Template button. In the dialog,
    > click the Attach button in the upper right and choose the Normal.dotm template
    > to replace the document's base template.
    >
    > The macros and custom ribbon will be gone. Also, the document will _not_ be
    > macro-enabled -- a .docx file cannot be macro-enabled by definition -- and there
    > is no security threat.
    >
    > --
    > Regards,
    > Jay Freedman
    > Microsoft Word MVP
    > Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.


    Many Thanks Jay...... your answer solved my problem... cheers.... :)
     
    , Oct 15, 2012
    #9
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Oci-One Kanubi
    Replies:
    0
    Views:
    356
    Oci-One Kanubi
    Aug 2, 2003
  2. Reference anothet template

    , Jul 12, 2006, in forum: Word Programming
    Replies:
    1
    Views:
    93
    Jonathan West
    Jul 12, 2006
  3. Lina

    cross reference

    Lina, Sep 19, 2006, in forum: Word Programming
    Replies:
    4
    Views:
    153
  4. Steven H
    Replies:
    1
    Views:
    101
    Jean-Guy Marcil
    Dec 1, 2006
  5. Jack G

    I hate 'Error! Reference source not found'!

    Jack G, Apr 27, 2007, in forum: Word Programming
    Replies:
    3
    Views:
    369
    Stefan Blom
    Apr 30, 2007
  6. mikewillnot
    Replies:
    2
    Views:
    315
    mikewillnot
    Nov 10, 2007
  7. Jon.NET

    Reference Word Field by Name

    Jon.NET, Jun 10, 2008, in forum: Word Programming
    Replies:
    2
    Views:
    119
    Jon.NET
    Jun 10, 2008
  8. Jennifer Robertson

    How do you reference a table?

    Jennifer Robertson, Mar 9, 2010, in forum: Word Programming
    Replies:
    4
    Views:
    267
    Doug Robbins - Word MVP
    Mar 10, 2010
Loading...