Working with templates
All documents in
OpenOffice.org (OOo) are based on templates. However, Impress is a
little different from other OOo components, in that it starts with
the Presentation Wizard unless you have elected to turn the Wizard
off.
When
you choose File >
New > Presentation
from the menu bar, if the Presentation Wizard is active, the Wizard
offers several choices for a new presentation, one of which is From
template.
If
you have turned the Presentation Wizard off, when you start a new
presentation by choosing File
> New > Presentation
from the menu bar, OOo uses the default presentation template. If
you have not defined your own default template, OOo uses an inbuilt
blank template supplied with the program.
Using
templates supplied with OOo
OOo
comes with five presentation templates. Two are in the Presentations
folder and three are in the Presentation
backgrounds
folder. The difference between them is that “Presentation”
templates include a series of slides with sample titles and topics,
while “Presentation background” templates have only backgrounds
and background objects. Both types have predefined presentation and
graphics styles.
You
can create a new presentation from a previously saved presentation
template by choosing File
> New > Templates and Documents
from the menu bar. This opens the Templates and Documents –
Templates window. To open a new presentation based on a template,
double-click that template’s name in the list.
Using
templates from other sources
If
you have created your own templates, or imported templates from
another location, they are probably stored in the My Templates
folder in the Templates and Documents – Templates window.
Templates installed using the Extension Manager may be installed in
their own folders. You can use them in the same way as the templates
installed with OOo.
See
page 47 for information on importing templates into OOo.
Installing
templates using the Extension Manager
The
Package Manager was introduced in OOo 2.0.4 and renamed the
Extension Manager in OOo 2.1. This feature provides an easy way to
install collections of templates, graphics, macros, or other add-ins
that have been “packaged” into files with a .OXT extension.
After
you download a package, select Tools
> Extension Manager from the menu bar. In the
Extension Manager dialog (Figure 29), click Add.
A
file browser window opens. Find and select the package of templates
you want to install and click Open.
On
the Extension Manager dialog (Figure 30), select the package you
just added and click Enable.
The
slide masters from the templates will now appear in the list of
Available Master Pages in the Tasks Pane (Figure 19).
Setting
a default template
You can set a
custom presentation template to be the default template. You can
reset the default later if you choose.
Setting
a custom template as the default
You
can set any template to be the default, as long as it is in one of
the folders displayed in the Template Management window.
To
set a custom template as the default:
From
the main menu, choose File >
Templates > Organize. The Template Management window
(Figure 33) opens.
In
the box on the left, double-click the
folder containing the template that you want to set as
the default, then select the template.
Click
the Commands button.
From
the drop-down menu, choose
Set As Default Template. The next time that you create a
document by choosing File >
New, the document will be created from this template.
Resetting
the default to OOo’s in-built Default template
To
re-enable OOo’s Default presentation background template as the
default:
From
the main menu, choose File >
Templates > Organize. The Template Management window
(Figure 33) opens.
In
the box on the left, click the Presentation Backgrounds folder.
Click
the Commands button.
From
the drop-down menu, choose
Reset Default Template.
Creating
your own templates
To
create a template from a presentation:
Open
the presentation that you want to use for a template.
From
the main menu, choose File >
Templates > Save. The Templates window opens (see Figure 17).
In
the New template field,
type a name for the new template.
In
the Categories
list, click the folder in which you want to store the template.
This is usually the My Templates folder, unless you have created
other folders.
To
learn more about template folders, see “Organizing templates”
on page 46.
Click
OK. OOo saves the
new template and the Templates window closes.
Modifying
a template
You can edit a
template’s styles and content, and then, if you wish, you can
reapply the template’s styles to documents that were created from
that template.
Note
|
You
can only reapply styles. You cannot reapply content.
|
To edit a template:
From
the main menu, choose File >
Templates > Edit. A standard file browser window
opens.
Find
and select the template that you want to edit, and then click Open.
The selected template opens in Impress.
Edit
the template just as you would any other presentation. To save your
changes, choose File >
Save from the main menu.
The next time that
you open a document that was created from the changed template, the
following message appears.
Click
Yes to apply the
template’s changed styles to the document. Click No
if you never want to apply the template’s changed
styles to the document. Whichever option you choose, the message box
closes and the document opens in OOo.
Caution
|
If
you choose No
in the message box shown in Figure 31,
that message will not appear again the next time you open the
document after changing the template it is based on. You will not
get another chance to update the styles from the template,
although you can use the macro given in the Note below to
re-enable this feature.
|
Note
|
Automatic
updating from a template did not work in OOo2.0.2. This bug was
fixed in OOo 2.0.3. To re-enable updating in files created using
OOo 2.0.2:
Use
Tools > Macros >
Organize Macros > OpenOffice.org Basic.
Select the document from the list, click the +, and select
Standard. If Standard has a + beside it, click that and select a
module.
Name
the macro. For example, you could call it FixDocument. If the
Edit button is active, click it. If the Edit button is
not active, click New, type a module name in the pop-up
dialog, and click OK.
In
the Basic window, enter the following:
Sub FixDocument
TemplateName =
ThisComponent.DocumentInfo.Template
if TemplateName <>
"" then
ThisComponent.DocumentInfo.Template
= TemplateName
end if
End Sub
Click
the Run BASIC
icon, then close the Basic window.
Save
the document.
Next
time you open this document, the update from template feature
will be restored.
|
Organizing
templates
OOo
can only use templates that are in OOo template folders. You can,
however, create new OOo template folders and use them to organize
your templates. For example, you might have separate template
folders for templates for different purposes or projects. You can
also import and export templates.
To
begin, choose File >
Templates > Organize from
the main menu. The Template Management window (Figure 33)
opens.
Note
|
All
the actions made by the Commands button in the Template
Management window can be made as well by right-clicking on the
templates or the folders.
|
Creating
a template folder
To create a
template folder:
In
the Template Management window, click any folder.
Click
the Commands button.
From
the drop-down menu, choose
New. A new folder called Untitled appears.
Type
a name for the new folder, and then press the Enter
key. OOo saves the folder with the name that you entered.
Deleting
a template folder
You
cannot delete the template folders supplied with OOo or installed
using the Extension Manager; you can only delete folders that you
have created.
To
delete a template folder that you have created:
In
the Template Management window, click the folder that you want to
delete.
Click
the Commands button.
From
the drop-down menu, choose
Delete. A dialog appears and asks you to confirm the
delete. Click Yes.
Moving
a template
To
move a template from one template folder to another template folder:
In
the Template Management window, double-click the folder that
contains the template you want to move. A list of all the templates
contained in that folder appears underneath the folder name.
Click
the template that you want to move and drag it to the desired
folder. If you do not have the authority to delete templates from
the source folder, this action copies
the template instead of moving it.
Deleting
a template
You cannot delete
the templates supplied with OOo or installed using the Extension
Manager; you can only delete templates that you have created.
To
delete a template:
In
the Template Management window, double-click the folder that
contains the template you want to delete. A list of all the
templates contained in that folder appears underneath the folder
name.
Click
the template that you want to delete.
Click
the Commands button.
From
the drop-down menu, choose Delete.
A dialog appears and asks you to confirm the deletion.
Click Yes.
Importing
a template
If
the template that you want to use is in a different location, you
must import it into an OOo template folder.
To
import a template into a template folder from another location on
your computer:
In
the Template Management window, click the folder into which you
want to import the template.
Click
the Commands button.
From the drop-down menu, choose Import
Template. A standard file browser window opens.
Find
and select the template that you want to import and click Open.
The file browser window closes and the template appears
in the selected template folder.
Exporting
a template
To
export a template from a template folder to another location:
In
the Template Management window, double-click the folder that
contains the template you want to export. A list of all the
templates contained in that folder appears underneath the folder
name.
Click
the template that you want to export.
Click
the Commands button.
From
the drop-down menu, choose Export
Template. The
Save As window opens.
Find
the folder into which you want to export the template and click
Save. OOo exports
the template to the selected folder, and the Save As window closes.