Sei sulla pagina 1di 2

What happens when I attach a new template to my document?

or How do
I copy content and settings from a template to a document?
Every Word document is based on a template, whether you choose a template explicitly
or not. Quick Reference

You can attach a new template to a document. To do that: Attaching a new template to a
document
in Word 2003 and earlier versions, click Tools > Templates and Add-ins When you attach a new template to a
Word document, nothing happens.
in Word 2007 and Word 2010, on the Developer tab, click Document Template
The new template makes four things
(if the Developer tab is not displayed, click the round Office button, click Word available to the document: macros,
Options, click Popular, and then on the right of the dialog tick "Show Developer AutoTexts/Building Blocks, toolbars and
tab in the Ribbon"). keyboard shortcuts.

However, this may not achieve what you had mind. This page explains what happens
when you attach a new template to a Word document.

If you're not 100% sure of the relationship between Word documents and templates, see What is the relationship between a Word
document and its template? (templaterelations.html) .

1. So, what does happen when you attach a new template to a document?
Nothing.

What? Nothing happens?

That's right: nothing happens to the document when you attach a new template (well, the document stores the fact that it is now
attached to a new template, but that's it).

The document inherited styles, content and page settings from its parent template when it was first created. You're not creating a new
document, so the styles, content and page settings in the newly-attached template will not affect the document at all.

The newly-attached template will sit in the background, and make available the four things that templates make available to
documents: macros, AutoTexts/Building blocks, toolbars/UI customization and keyboard shortcuts.

Those four things sit there waiting to be used, but they're made available to the document. They are in the template: they don't reside
in the document. So attaching a new template makes them available; it doesn't change the document.

2. But that's not what I wanted!!!!!!!


If you want to copy material from template to document, read on. There are ways to copy most things from a template to a document.

2.1 AutoTexts/Building Blocks

2.1.1 AutoTexts in Word 2003 and earlier

AutoText can only exist in a template. A document cannot hold an AutoText. You can copy AutoTexts between templates using Tools >
Templates and Add-ins > Organizer.

2.1.2 Building Blocks in Word 2007 and later

In Word 2007 and Word 2010, AutoTexts were expanded and re-named as Building Blocks. Building Blocks can only exist in a template.

The part of the Organizer that allowed us to copy AutoTexts from one file to another was removed from Word in Word 2007 and has not
been reinstated in Word 2010. The only way to copy a Building Block from one file to another is to insert the content of a Building Block
into a document, then select the content and re-save it as a new Building Block in the new file.

2.2 Macros

You can copy macros to and from documents and templates (although it is generally poor practice in Word to store macros in
documents).

In Word 2003 and earlier versions, use the Organizer at Tools > Templates and Add-ins > Organizer.

In Word 2007 and Word 2010, show the Developer tab, and, on the Developer tab, click Document Template. In the Templates and
Add-ins dialog, click Organizer.

Or, you can use the Visual Basic Editor to export a module as a .bas file, and then import it.

Note that the Organizer lists whole modules. You can't copy an individual macro (a Sub or a Function) using the Organizer. For that,
you have to copy and paste using the Visual Basic Editor.

2.3 Toolbars / UI Customizations

2.3.1 Toolbars (Word 2003 and earlier versions)

You can copy toolbars to and from documents and templates using Tools > Templates and Add-ins > Organizer.

If a control (such as a button) on the toolbar called a macro, then copying the toolbar won't copy the macro. You'll have to do that
separately.

2.3.2 UI Customizations (including Ribbon customizations) (Word 2007 and Word 2010)

There is no way to copy UI customizations from within Word. In theory, you can unzip a Word file and extract the UI customizations;
unzip the destination file; copy the XML into the destination file; and re-zip it. In practice, use the CustomUI Editor [Lene Fredborg, 06-
Jan-2019: The original link that was included here to download the CustomUI Editor was:
http://openxmldeveloper.org/blog/b/openxmldeveloper/archive/2009/08/06/7293.aspx. However, that link is no longer valid. You can
download the CustomUI Editor from a link on this page: https://www.rondebruin.nl/win/s2/win001.htm
(https://www.rondebruin.nl/win/s2/win001.htm) ].

2.4 Keyboard shortcuts

Word provides no in-built way to copy keyboard shortcuts. You can copy keyboard shortcuts using a tool available at the download
page on the Word MVPs site (http://wordmvp.com/Downloads/index.htm) .

2.5 Content

The easy way to copy content from a template to a document is to use File > New to create a new document from the template, then
copy and paste from one document to another.

The slightly harder way is to use File > Open to open the template itself, and then copy and paste from template to document.

2.6 Page Settings

There is no simple way to copy page settings from a template to a document. You'll have to do this manually.

Or, you could open the template and record a macro, and then run the macro in your document. For information on how to do that, see
Creating a macro with no programming experience using the recorder (http://wordmvp.com/FAQs/MacrosVBA/UsingRecorder.htm) on the
Word MVPs site.

2.7 Styles
There are only three ways in which the document and its template can change one another's styles, and they all rely on your doing
something:

You can change a style in a document's parent template. In the Modify Style dialog box,
you tick the Add to Template box.

You can copy styles from the document to its template, or vice versa using the Organizer.
To get to the Organizer:

In Word 2003 and earlier versions, click Tools > Templates and Add‑Ins and then click
Organizer

In Word 2007 and Word 2010, on the Developer tab, click Document Template and then
click Organizer

You can update the document with its template's styles. To do that:

In Word 2003 and earlier versions: Tools > Templates and Add‑Ins; tick the
Automatically Update Document Styles box

In Word 2007 and Word 2010: Developer > Document Template; tick the Automatically
Update Document Styles box

Having ticked that box, immediately go back and un-tick that box. Don't leave the box ticked.

None of these methods works reliably for styles involving bullets or numbering. But see How to safely update a document's styles from
its template without using the Organizer and how to make the Tools + Templates and Add-ins dialog safe)
(http://wordmvp.com/FAQs/MacrosVBA/UpdateStyles.htm) on the Word MVPs site.

Actually, there is a fourth way to copy styles from a template to a document (or between templates, or between documents). Although
it's a bit arcane, it can have its uses.

All AutoTexts and Building Blocks are saved in templates. Oddly, an AutoText or Building Block can hold text in a style that does not
exist in its template.

An AutoText or Building Block can hold formatted text. That is, the AutoText or Building Block knows what style(s) have been applied to
the text. When you insert an AutoText or Building Block, Word will bring along any required styles, creating new ones in the document
if necessary. It works in exactly the same way as copying text: see Why does text change format when I copy it into another
document? (../styles/formatoftextchanges.html) .

For more information

What do Templates and Add-ins store?


(http://wordmvp.com/FAQs/Customization/WhatTemplatesStore.htm) at the Word MVPs site.

What is the relationship between a Word document and its template? (templaterelations.html)

What happens when I send my document to someone else? Will Word mess up my formatting?
(../sharing/willmyformatchange.html)

Why does text change format when I copy it into another document?
(../styles/formatoftextchanges.html)

Related subjects
Topic (../../topics.html) : Templates (../../topic/word/templates.html)

Tags (../tag.html) : Copy and paste (../tag/copy-and-paste.html) , Keyboard shortcuts (../tag/keyboard-shortcuts.html) , Macros
(../tag/macros.html) , Paragraph styles (../tag/paragraph-styles.html) , Templates (../tag/templates.html) , Toolbars (../tag/toolbars.html) , UI
Customization (../tag/ui-customization.html)

Interest (../../interest.html) : For users (../../interest/for-users.html)

Version (../../version.html) : Word 2000 (../../version/word-2000.html) Word 2002 (../../version/word-2002.html) Word 2003
(../../version/word-2003.html) Word 2007 (../../version/word-2007.html) Word 2010 (../../version/word-2010.html)

Created August 2004. Last updated 27 June 2010.

The creator of ShaunaKelly.com, Shauna Kelly, passed away peacefully on Wednesday November 16, 2011 after a long battle with ovarian cancer.
If you are requesting permission to re-use any information on this site, then you may do so with appropriate acknowledgement of her work.
If her words, thoughts or pictures have helped you, or made money for you, then please consider making a donation in her name to WomenCan
(http://www.womencan.org.au/) (previously Women's Cancer Foundation).

Potrebbero piacerti anche