Returning to a rather old thread, which I haven't had time to deal with until now.

On 21 Jan 2009, T. J. Frazier wrote:
... the given example code, to re-enable template updating, doesn't work under 3.0.0 ...

In 0210WG3, the cautionary note, about killing updates if you say "No" to the "Update Styles" message, has been entirely omitted. That is rather a pity, since (a) the kill still happens under 3.0.0, and (b) those "how to add a subroutine" instructions are beautiful.

You are right, and I will be restoring that note in all relevant places of the V3 books as I find time.

Of course, Andre has given us an easy way to reestablish the updating, by reassigning the template to the document. Adding a note to mention that is probably a good idea.

Andre's method works for Writer, but not for Calc, Impress, or Draw -- or is limited; the "Assign template (current document) choice does not appear, though the "Assign template (folder) choice is there.

So in the Calc, Impress, and Draw Guides I will need to include code.

In the unlikely event that you want to include code, the following (borrowed from the TC) works under 3.0.0, exactly according to the 2.x directions:

Sub FixDocV3
   'set UpdateFromTemplate
oDocSettings = ThisComponent.createInstance( "com.sun.star.document.Settings" ) oDocSettings.UpdateFromTemplate = True End Sub 'FixDocV3

Thanks!

--Jean

Reply via email to