Using the SDK I\'m building Word documents that contain reports. These documents need to have TOC. Does anybody have a complete solution that I can follow in order to unders
Have a look at Fourth and Final Screen-Cast in Series on Adding/Updating the TOC in OpenXML WordprocessingML Documents by Eric White.
Hope that helps!
UPDATE:
According FAQ from MSDN Forums I see that this feature is not supported:
8) How to generate TOC (table of contents) in Word document?
Open XML SDK 2.0 does not have this feature supported. But you can generate a small TOC through Word app, and reflect the TOC parts with Document Reflector component in Open XML SDK Productivity Tool to see how to generate a TOC programmatically. For more detailed information, please refer to:
MSDN forum thread: Generating Table of Contents and Applying a Custom Style,
MSDN forum thread: How can i Create dir for word document.
UPDATE 2
Based on our comments below I could propose to use this scenario:
All of that look a bit tricky, but I hope that helps.