diff --git a/oletools/msodde.py b/oletools/msodde.py index c5d752e..fd121b2 100644 --- a/oletools/msodde.py +++ b/oletools/msodde.py @@ -80,7 +80,8 @@ NS_WORD = 'http://schemas.openxmlformats.org/wordprocessingml/2006/main' # XML tag for 'w:instrText' TAG_W_INSTRTEXT = '{%s}instrText' % NS_WORD - +TAG_W_FLDSIMPLE = '{%s}fldSimple' % NS_WORD +TAG_W_INSTRATTR= '{%s}instr' % NS_WORD # === FUNCTIONS ============================================================== @@ -111,6 +112,13 @@ def process_file(filepath): # concatenate the text of the field, if present: if elem.text is not None: text += elem.text + + for elem in root.iter(TAG_W_FLDSIMPLE): + # concatenate the attribute of the field, if present: + if elem.attrib is not None: + text += elem.attrib[TAG_W_INSTRATTR] + + return text