On Thu, May 31, 2012 at 8:38 AM, Олег Малёваный <[email protected]> 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

Reply via email to