incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "F C. Costero" <fjcc.apa...@gmail.com>
Subject Re: How update table of contents in document?
Date Fri, 01 Jun 2012 02:29:03 GMT
On Thu, May 31, 2012 at 8:38 AM, Олег Малёваный <deer_oleg@mail.ru> wrote:
> Hi!
> I am developing a script that will generate the document. provided in
> the template "Table of Contents" of the document.
> In development, I use perl and module
> http://search.cpan.org/~jmgdoc/OpenOffice-OODoc-2.125/
> Can I by means of this module, update the "Table of Contents" in a
> document?
> If not, then how can one way to run a macro that will update the table
> of contents with the help of this module or the unix command line?
>
I know nothing about using Perl, but the code to update a table of
contents in OpenOffice Basic could be

oDoc = ThisComponent
oIndexes = oDoc.getDocumentIndexes()
oTableOfCont = oIndexes.getByName("Table of Contents1")
oTableOfCont.update()

I hope that helps.
Francis

Mime
View raw message