How to find the Pages and the Table of Contents?

Java, C++, C#, Delphi... - Using the UNO bridges
Post Reply
Cruzader1986
Posts: 3
Joined: Wed Jan 21, 2009 4:36 am

How to find the Pages and the Table of Contents?

Post by Cruzader1986 »

How can I find the pages and the toc inside the document object? Thanks :D
OOo 3.0.X on Ms Windows XP
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: How to find the Pages and the Table of Contents?

Post by acknak »

I expect that you're going to need to be just a little more specific to have a chance of getting a meaningful answer.

What are you trying to do?

How are you trying to do it?
AOO4/LO5 • Linux • Fedora 23
Cruzader1986
Posts: 3
Joined: Wed Jan 21, 2009 4:36 am

Re: How to find the Pages and the Table of Contents?

Post by Cruzader1986 »

Oh, I'm using c#.
I already got the TOC with this code

XIndexAccess xindex = ((XDocumentIndexesSupplier)tdoc).getDocumentIndexes();
XTextContent toc = (XTextContent)xindex.getByIndex(0).Value;

But I need to export/save now the toc into a new file. I tried inserting it on a blank document but i always get an error. Help plz
OOo 3.0.X on Ms Windows XP
Post Reply