Peter,
Yes, I am trying to mimic "Generate Index". My client has a book with a large number of index entries. The index is taking about 4 hours to generate, and then it dies with an error message about an invalid character. I don't have the exact error message right now, but apparently this is a known issue with large indexes.
So my goal is to roll my own index generator. Right now I am using an array of objects for the index entries. Each object has two members: entry, which is the index entry itself; and pages, which is an array of page numbers. Once I collect all of the entries in the book, sort them, and sort and remove duplicates from the page numbers, I should be able to write the index.
Rick
... View more