How to re-enable update of template styles?

From Apache OpenOffice Wiki
< Documentation‎ | FAQ‎ | Writer‎ | FormattingPagesAndDocuments
Revision as of 13:24, 23 October 2008 by Ufi (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


How to re-enable update of template styles?


If you change anything in a template, the next time you open a file created from that template, you are asked if you want to update the styles in your document. If you select "No", then you are never asked this question again for that document. (Documents created in OOo2.0.2 also have this problem, due to a bug that has been fixed in later versions of OOo.)

To re-enable the update function:

  1. Open the document you want to fix in OpenOffice.org
  2. Use Tools > Macros > Organize Dialogs > Modules and select the document from the list and Standard module or use Tools > Macros > Organize Macros >OpenOffice.org BASIC and select the document from the list and Standard module.
  3. Click New.
  4. Name the macro. For example, you could call it FixDocument.
  5. Click the Edit button and enter the following in the IDE.
Sub FixDocument
  TemplateName = ThisComponent.DocumentInfo.Template
  if TemplateName <> "" then
    ThisComponent.DocumentInfo.Template = TemplateName
  end if
End Sub
  1. Click the Run icon.
  2. Finallly save the document.

Next time when you open this document you will have the update from template feature back.

Personal tools