Calc Guide

Updating a spreadsheet from a changed template
The next time you open a spreadsheet that was created from the changed template,
the following message appears.
Figure 108: Update styles message
Click Update Styles to apply the template’s changed styles to the spreadsheet. Click
Keep Old Styles if you do not want to apply the template’s changed styles to the
spreadsheet (but see Caution notice below).
Caution
If you choose Keep Old Styles in the message box shown in Figure 108,
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
To re-enable updating from a template:
1) Use Tools > Macros > Organize Macros > OpenOffice.org
Basic. Select the document from the list, click the expansion symbol
(+ or triangle), and select Standard. If Standard has an expansion
symbol beside it, click that and select a module.
2) If the Edit button is active, click it. If the Edit button is not active,
click New.
3) In the Basic window, enter the following:
Sub FixDocV3
' set UpdateFromTemplate
oDocSettings = ThisComponent.createInstance( _
"com.sun.star.document.Settings" )
oDocSettings.UpdateFromTemplate = True
End Sub 'FixDocV3
4) Click the Run BASIC icon, then close the Basic window.
5) Save the document.
Next time when you open this document you will have the update from
template feature back.
112 OpenOffice.org 3.3 Calc Guide