Nested Fields

Home Forums WordprocessingML Nested Fields

Tagged: 

This topic contains 2 replies, has 2 voices, and was last updated by  Manu_TR 7 years, 11 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #4087

    Manu_TR
    Participant

    Hello,

    Is there a way to identify the end of Nested field code? because we usually find the nested field codes inside TOCs field which has been very difficult for us to programmatically identify its end.

    please help!

    Thanks,
    Manu

    #4088

    Eric White
    Keymaster

    Hi Manu,

    Whenever dealing with fields, and certainly nested fields, I use the FieldRetriever.cs module in Open-Xml-PowerTools. This module retrieves (in nested form) all fields in a DOCX. Further, auxiliary information is in the data structures returned by FieldRetriever, such as object references to the various markup elements in the main document part. You can use those object references to alter / query the document.

    The FieldRetriever module serves two purposes – it provides nicely packaged functionality to C# developers to understand the fields in a document, including nested fields. Further, it provides a reference implementation regarding the correct approach for retrieving the instrText and the representation of fields in a document.

    Please watch screen-casts #14 and #15 in the following series:

    Introduction to WordprocessingML

    Cheers, Eric

    #4102

    Manu_TR
    Participant

    Thanks Eric this was very helpful!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.