WordprocessingML fields are an important construct of Open XML markup. Hyperlinks, the TOC, dates, computed values, page references, and much more are represented by fields. You cannot reliably retrieve a list of all hyper-links in a document without understanding fields and their markup. You can retrieve a partial set of fields by iterating through external references, however, in some circumstances, a hyper-link is represented in the field markup only, and there is no external reference.
Return to the Table of Contents of this screen-cast series.
To date, there has not been much in the way of content that explains fields and how to work with them. In this post, I introduce the first video in a two-part series that explains how field markup works. After posting the two videos, I will post some utility code that makes it easier to work with fields. Finally, I will post some code that reliably retrieves all hyper-links in a document.
Video: Open XML WordprocessingML Fields and Hyper-links Deep Dive
Video: Open XML WordprocessingML Fields and Hyper-links Deep Dive - Part 2
I use openxml powertools and I am confronted with a special issue. I have a Control Content field in a word document . The control contains more lines with carriage return. I changed the font to bold. When I start the mailmerge (with use of
power tools) the font changes to defualt font. When I have a control without any CR, it works. The font remains. The problem is with multiline Content Controls.