Have you ever wanted to update page number fields or a table of contents within Word documents on the server? The Open XML SDK provides functionality that allows you to easily add or remove content within a Word document. However, the SDK does not provide runtime application behaviors such as layout and recalculation. In order to recalculate a table of contents you need to run some kind of layout engine in order to properly determine pages within a document.
Word Automation Services is designed to handle tasks that require application logic, such as file conversion and layout. The Open XML SDK and Office services were designed to work better together. In this demo, I am going to show you how to leverage Word Automation Services to update a table of contents after a document has been modified by the Open XML SDK.
Download source code of demo here:
http://blogs.msdn.com/brian_jones
Link to this comment:
All Comments (0)