Earlier I reported that someone on the Writer forum found that the message you used to get when opening a document linked to a template, asking if you wanted to "apply your current styles" (after the styles in the template were changed), no longer appears in OOo2.0.2, and there seems to be no way to have the document's styles update if you want it to. I mentioned this on the developers' list and got the reply below. (I'll post this to the Forum as well.)

Many thanks to Mathias!

-- Jean

---------------------
The problem lies in documents created with OOo2.0.2. A fix will be available for 2.0.3. You will have to fix documents created with 2.0.2 though because the fix only can prevent the creation of further documents containing the error. Fortunately you can fix your documents already now and get the updating procedure back. Please do it in the following way:

Load the document you want to fix, execute the following macro on it:

Sub FixDocument
  TemplateName = ThisComponent.DocumentInfo.Template
  if TemplateName <> "" then
    ThisComponent.DocumentInfo.Template = TemplateName
  end if
End Sub

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

This strange looking macro will set an internal switch in the document meta data that enables the template update procedure. BTW: the same macro will re-enable the update procedure in case you have switched it off by answering the question "do you want to update your styles" with "No".

You can execute this macro on every document if you want (e.g. by
assigning it to the "OnLoad" event on application level), if the
document is not based on a template it will not be modified by this macro.

Best regards,
Mathias

Reply via email to