1

Say a Word Table Of Contents has 8 lines in it, generated by a Table of Contents field in the normal way.

Is it possible, using C# and Microsoft Open XML, to determine how many lines (in this case 8) are in a Table of Contents field in an existing Word document?

I have not found any obvious properties that would give this information.

Thanks,

Jimmy

Jimmy
  • 23
  • 5
  • I don't have an OpenXml at hand, but looking at raw xml of word document I would say it should be possible. – Jay Nyxed Jun 17 '20 at 21:11
  • I don't think you can do that. There are methods related to lines but it's limited to scope of entire document. You may manually count the number of paragraph in document => sdt => sdtContent => p, but I won't count on it. – HardcoreGamer Jun 19 '20 at 09:55

0 Answers0