Professional Documents
Culture Documents
BUCS IT Training
TABLE OF CONTENTS
WHAT ARE TEMPLATES?..................................................................................................................... 1
HOW CAN TEMPLATES BE USED? .................................................................................................... 1
PRODUCING A TEMPLATE................................................................................................................... 1
USING TEMPLATES ............................................................................................................................... 2
TEMPLATES DIALOG BOX ................................................................................................................... 3
A SELECTION OF THE TEMPLATES AVAILABLE FROM THE WEB............................................. 3
TEMPLATES AVAILABLE WITHIN WORD.......................................................................................... 4
ATTACH A DIFFERENT TEMPLATE TO THE ACTIVE DOCUMENT............................................... 6
HINTS & TIPS FOR TEMPLATES ......................................................................................................... 7
CUSTOMISING TEMPLATES ................................................................................................................ 7
NORMAL.DOT........................................................................................................................................ 10
PROBLEMS CHANGING THE FILE TYPE FROM "DOCUMENT TEMPLATE" TO "WORD
DOCUMENT."......................................................................................................................................... 10
WHAT ARE MACROS?......................................................................................................................... 11
HOW CAN THEY BE USED? ............................................................................................................... 11
PRODUCING A MACRO FROM SCRATCH ....................................................................................... 11
EXAMPLE EXERCISE - MACRO TO GIVE FANCY EFFECTS TO TEXT....................................... 13
RUNNING A MACRO ............................................................................................................................ 14
TO DELETE A MACRO......................................................................................................................... 14
ADDING MACROS TO THE TOOL BAR ............................................................................................ 14
TO DELETE A CUSTOMIZED TOOLBAR .......................................................................................... 16
ADDING A COMMAND OR OTHER ITEM TO A MENU ................................................................... 16
RENAMING STYLES, AUTOTEXT ENTRIES, MACROS, AND TOOLBARS................................. 16
VIEWING THE MACRO CODE............................................................................................................. 17
INCORPORATING FILL-IN OR MESSAGE BOXES INTO A MACRO ............................................ 17
TIPS FOR RECORDING A MACRO .................................................................................................... 20
TROUBLESHOOTING MACROS......................................................................................................... 21
HELP ........................................................................................................................................... 23
Styles
Page format & margin settings
Fonts
Formatting
Customised menus, formatting & shortcut keys
Macros
Boilerplate text & graphics
Auto Text
So that all the above can be applied automatically to all documents of the same type,
Word provides some standard templates for you but you can also create your own.
What is Boilerplate Text?
Boilerplate text is a section of text that will occur many times throughout a document, and
which may be subject to several changes before it reaches the final version. It may be
added and edited as an AutoText entry, inserted into the document or template as an
AutoText field, and is easily updated as a field whenever the text changes.
Producing a Template
1. Choose File - New and open a blank page.
2. Use File Page Setup to set up the required page type.
3. Type in the text which you want to appear in the template and format it
appropriately.
4. Add any headers or footers including page numbers.
5. Insert index and contents, logos and pictures as appropriate.
6. Save the template using File Save As.
7. Document Type should be set to Document Template. Word will add a .DOT
extension to the file and save it into the Templates folder.
If you want to create custom tabs for your templates in the New dialog box, you will need
to create subfolders in the Templates folder and save your templates into these new
subfolders. The names you give your subfolders will appear as new tabs.
N.B. If you save a template in a different location, the template will not appear in the New
dialog box.
3. Format the memo header as you wish, using colours and adding the
University logo at the top.
4. Save the template using File Save As.
5. Document Type should be set to Document Template. Word will add a
.DOT extension to the file and save it to the Templates folder.
6. Click on File - New and you will see an icon for your new memo template.
Using Templates
Click on File New to see the choice of templates available in the New Document
Task Pane.
Under the heading New Click Blank document for a blank page.
Click From existing document to create a copy of that document.
N.B. Although web options are available, within the University, you should be using
Dreamweaver if you want to create a web page.
Under the heading Templates In the Search online for box, enter the type of
publication you would like a template for, e.g. party invitation.
Click Templates on Office online to see the full range of online templates
available form the Microsoft website.
Click On my computer to open the Templates dialog box.
To create your own version of any of these templates, select "template" as the document
type when you open the template, then make any changes you require, rename and
resave the template.
You can also copy individual styles from one template to another by clicking
Organizer.
Tip
To use styles from the newly attached template, select the Automatically update
document styles check box in the Templates and Add-Ins dialog box. Word adds the
styles from the template to the document. If styles in the document and template have the
same names, Word updates the document styles to match the template styles.
Using Styles
To preview how your document will look with the different styles, click Document
under Preview.
To see a sample document with styles from the selected template, click Example.
To see a list of the styles used in the selected template, click Style samples.
Using Tables
Often the information in a template needs to be kept in columns or needs to be lined up.
Use tables instead of tabs as they are easier to manipulate and update.
Using Fields
Make use of automated fields for information such as date and time, numbering, indexes
or fill-in boxes.
Customising Templates
Changing an Existing Template
1. Choose File - New and click on the template you wish to change.
2. Select Create New Template in the bottom right hand corner.
3. Make any changes you wish to make to the template.
4. Now save the template giving it a new name. Notice that the option to Save as
type defaults to Document Template.
2. Click Organizer, and then click the tab for the items you want to copy.
3. To copy items to or from a different template or file, click Close File to close the
active document and its attached template or to close the Normal template. Then
click Open File, and open the template or file you want.
4. Click the items you want to copy in either list and then click Copy.
To select a range of items, hold down SHIFT and click the first and last items. To
select nonadjacent items, hold down CTRL as you click each item.
Note If you copy toolbars to which you've assigned custom macros, you must also copy
the macros.
2. Click Organizer and then click the tab for the items you want to delete.
3. To delete items from a different template or file, click Close File to close the active
document and its attached template or to close the Normal template. Then click
Open File, and open the template or file you want.
Tip
To select a range of items, hold down SHIFT and click the first and last items. To select
nonadjacent items, hold down CTRL as you click each item.
Changing the template that's attached to a document either by modifying the currently
attached template or by attaching a different template has the following effects:
Macros, AutoText entries and custom toolbar and command settings in a modified
template are available for use in any document based on the template, including
existing documents. If you attach a different template to a document, items stored
in the newly attached template are then available to the document.
To make Word update styles in an existing document to match the styles in its
attached template, first open the document. On the Tools menu, click Templates
and Add-Ins, and then select the Automatically update document styles check
box. If the document text is formatted with styles that have the same names as
styles in the attached template, Word updates the text formatting to match the
template's style formats.
If you change the boilerplate text and graphics in a template or change document
formats, for example, page margins and page size, headers and footers or the
number of columns per page, these changes affect only new documents that you
subsequently base on the template. Existing documents based on the template
aren't affected.
If the file you are saving is a document, not a template, the problem could be the Concept
Virus, a macro virus that prevents you from saving a file as any file type other than
Document Template.
5. Select whether to store the Macro in all documents or only in the document you are
working with.
6. In the Description text box, type a brief explanation of what the new macro will do.
7. Having made the appropriate selections in this dialog box, click on OK to begin
recording the macro.
2. At the bottom of your screen, REC on the Status Bar will appear emboldened.
N.B. In Word, you cannot use the mouse to select text when recording a macro.
To Delete a Macro
Go to the Tools menu and select Macro - Macros.
Select the macro you want and click on the right hand button marked Delete.
2. Give the Toolbar a name. You can choose whether to make it available to all
documents or just the one you are currently working on.
3. Next go to the Commands tab.
4. From the list on the left, choose Macros.
6. With the dialog box still displayed, right mouse click over the new toolbar.
7. Now you can change the name which is displayed for the Macro by editing it in the
Name box
8. Select Change Button Image to put an icon on your toolbar.
9. Close the dialog box.
10. You can now drag and drop the new toolbar onto any one of your existing toolbars.
You can make further changes to your toolbar by selecting Tools
Customise or by right clicking over your toolbar.
1. If the menu is on a toolbar, show the toolbar that contains the menu you want to
add a command or other item to.
2. On the Tools menu, click Customize and then click the Commands tab.
4. Drag the command you want from the Commands box over the menu. When the
menu displays a list of menu commands, point to the location where you want the
command to appear on the menu on the toolbar and then release the mouse.
If you don't see the command you want under a particular category, click All
Commands in the Categories box.
5. Click Close.
If you open a macro in the Visual Basic Editor you can make corrections, remove
unnecessary steps, rename or copy individual macros, or add instructions that you cannot
record in Word.
The name of the macro is shown immediately after the word Sub.
The executing code for the macro is written between the lines beginning Sub and End
Sub. You should only add new code between these lines.
Any text which is preceded by an apostrophe is not executable but is a comment (for
example your description of what the macro does).
If you have Visual Basic Help installed, you can place the cursor in the middle of any word
in the code that you are unsure of and press F1 to display the associated Help topic.
N.B. Help for Microsoft Visual Basic has to be specially installed from the Microsoft Office
2000 Professional CD. Contact your Departmental Supporter about this.
Return to Word by clicking on the Microsoft Word button on the Task Bar, or
alternatively click on the Word icon on the Standard toolbar.
Example
1. Choose Tools - Macro - Macros to display the Macro dialog box.
2. Select the MyName macro and click on the right hand button marked Edit.
You are now in the Macro code.
3. At the top of the procedure, after the last comment line and before the first
executable line, type the following line of code:
MyInput = InputBox(What is your name?)
4. Modify the next line so that, instead of having your name in quotes at the end, it
reads as follows:
Selection.TypeText Text:= MyInput
5. Return to Word by clicking on the Microsoft Word button on the Task Bar, or
alternatively click on the Word icon on the Standard toolbar.
If you run the macro again an input box is produced to allow any person using the macro
to enter their own name.
Example
1. Choose Tools - Macro - Macros to display the Macro dialog box.
2. Select the MyName macro and click on the right hand button marked Edit.
You are now in the Macro code.
3. Create a blank line before the End Sub line in the code and type:
MsgBox Great Name, vbExclamation
4. Return to Word by clicking on the Microsoft Word button on the Task Bar, or
alternatively click on the Word icon on the Standard toolbar.
If you run the macro again a message box is produced after you enter your name.
In both the above examples, any text within the quotation marks may be
customised by you.
Examples
MyInput = InputBox (Prompt:= "What is your name?", Title: = "User Input Required",
Default: = "Lydia")
In this example we have also added the default entry of Lydia which will automatically
appear in the InputBox.
Macro to Add Path and File Name to the Title Bar of a Document
This macro is available on the Microsoft Product Support pages. You can copy the macro
directly from Knowledge Base article number Q209194.
To use this macro you will need to modify the default FileSave command by following the
steps below.
1. Open a new Word document.
2. From the Tools menu, select Macro Macros.
3. In the box labeled Macros In, select Word Commands.
4. From the Macro Name list, select FileSave.
6. Click Create.
7. In the Visual Basic Editor, add the following macro code to the end of the FileSave
macro, so that the finished macro will look like this:
Sub FileSave ()
'
' FileSave Macro
' Saves the active document or template and adds the path
' and file name to document title bar.
ActiveDocument.Save
With ActiveDocument
.ActiveWindow.Caption = .Path + "\" + .ActiveWindow.Document.Name
End With
End Sub
8. From the File menu, select Close and Return to Microsoft Word.
http://www.microsoft.com/uk/office/
A macro you record may not run properly in every situation. If the macro cannot run, Word
displays an error message. Some macros depend on certain options or settings in Word.
For example, a macro that searches for hidden text won't run properly if hidden text isn't
displayed.
A macro virus is a type of computer virus that's stored in a macro within a document,
template, or add-in. When you open such a document or perform an action that triggers a
macro virus, the macro virus might be activated, transmitted to your computer and stored
in your Normal or global template. From that point on, every document you open could be
automatically "infected" with the macro virus and if other people open these infected
documents, the macro virus is transmitted to their computers.
The macros in the project are disabled message when you run a macro
Sometimes, when you try to run the macro in a document, you may receive a message to
say that the macros in the project are disabled. This occurs when the macro security level
in Word has been set to High (which it is by default). To enable the macros to run, you
need to close the document and change the macro security level to Medium.
Changes in Word 2003 may affect the way your Word 2000 macros run. For example,
Templates are located in a different place on your computer, according to whether you are
using Word 2000 or Word 2003.
Microsoft Word offers the following levels of security to reduce the chances that macro
viruses will infect your documents, templates or add-ins. To set the level of security, go to
Tools Macro Security.
High You can run only macros that have been digitally signed and that you confirm
are from a trusted source. A digital signature causes Word to display a certificate
on your computer which verifies that the macro has come from a trusted source.
Unsigned macros are automatically disabled, and Word opens the document
without any warning.
Low If you are sure that all the documents and add-ins you open are safe, you can
select this option. It turns off macro virus protection in Word. At this security level,
macros are always enabled when you open documents.
When you open a template or load an add-in that was already installed when you installed
Word 2000, macros within the file are automatically enabled. You can make Word warn
you about previously installed templates and add-ins by deselecting the box on the
Trusted Sources tab.
You can obtain help from this fantastic and free service by contacting
them in one of the following ways.
Go to www.bath.ac.uk/bucs/problem
Now you have attended a course, you may phone up in advance to book a
session with a Helpdesk adviser on a one-to-one basis. They are not able
to offer you a training session, but will answer specific questions and give
help with problems you have encountered in the course of using the
software.
BUCS IT Training