Thanks for the quick reply Paul!, unfortunately I have to use only Openxml to extract fields but openxml is not providing proper fieldcode for internal hyperlink like below, that is the reason why i am building fieldcode through code.
Is there a way to trim all hyperlink fieldcode values through word object model?
Code:
<w:hyperlink w:anchor="_Toc165886552" w:history="1" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
<w:r pt14:StyleName="DefaultParagraphFont" pt14:FontName="Arial" pt14:LanguageType="western" xmlns:pt14="http://powertools.codeplex.com/2011">
<w:rPr>
<w:rFonts w:ascii="Arial" w:hAnsi="Arial" w:eastAsiaTheme="minorEastAsia" w:cs="Times" w:eastAsia="Calibri" />
<w:b />
<w:color w:val="0000FF" />
<w:sz w:val="22" />
<w:szCs w:val="24" />
<w:u w:color="000000" />
<w:lang w:val="en-US" w:eastAsia="en-US" w:bidi="ar-SA" />
</w:rPr>
<w:t pt14:TabWidth="0.000">‘Software’</w:t>
</w:r>
</w:hyperlink>