[docx ] HotwordStyle in the middle of text RRS feed

  • Question

  • Hi,

    I am applying xslt transformations to document.xml (docx file), in order to obtain different file formats (latex + xhtml + ecc...).

    When processing the text I see that every now and then the following text tag (italian version) appears:

    <w:t xml:space="preserve">HotwordStyle=BookDefault; _tipo=Normale; _destinazione=destinazione; </w:t>

    The sentence is treated as text, hence it appears also inside the transformed output.

    Is there something I can do (before applying the xslt) to avoid the presence of  this HotwordStyle sentence ?


    Thanks in advance



    Thursday, January 19, 2012 2:18 PM


All replies

  • Hi Elena,


    Thanks for posting in the MSDN Forum.


    Would you please clarify the mean of “document.xml”? I’m not sure about whether the document.xml is a Word Xml file or the Document Part of docx file.


    Have a good day,



    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us
    Monday, January 23, 2012 6:33 AM
  • Hello Elena

    Do these files have anything in common? Did they all originate from a special program? Or were they originally created in a different word processor (such as Word Perfect)?

    This doesn't sound like anything I've ever encountered in Word before, which makes me think it's something that comes from outside Word and may be "hidden" in the files you're processing. What surrounds this <w:t> element?

    Cindy Meister, VSTO/Word MVP
    Monday, January 23, 2012 8:47 AM
  • Hi Cindy and Tom,

    Thanks for your reply:

    - The document.xml is the main file inside the Word 2007 .docx packages (opening the file one finds four directories, one of which is "word" -> inside there are the xml files of the .docx and document.xml is the main one).

    - The file was originally written in .doc format and then saved as .docx.

    - The complete node structure surrouding this <w:t> is the following:

    <w:r w:rsidRPr="00364AEF">
       <w:rFonts w:ascii="Times New Roman" w:eastAsia="Meiryo"    w:hAnsi="Times New Roman" w:cs="Times New Roman"/>        
       <w:spacing w:val="6"/>
       <w:sz w:val="22"/>
       <w:szCs w:val="24"/>
          <w:rPrChange w:id="1941" w:author="Elena" w:date="2011-11-29T16:55:00Z">
               <w:rFonts w:asciiTheme="majorHAnsi" w:hAnsiTheme="majorHAnsi"/>
              <w:sz w:val="22"/>
              <w:vertAlign w:val="superscript"/>
     <w:t xml:space="preserve">HotwordStyle=BookDefault; _tipo=Normale; _destinazione=destinazione; </w:t>

    My code ignores all the block except the <w:t> node that is treated as text.



    Monday, January 23, 2012 9:55 AM
  • Hi Elena

    If you open the document and display the "non-printing characters", more specifically the hidden text, this text should show up. To explicitly see hidden text: Word Options/Display and activate the checkbox next to "Hidden text".

    In WordOpenXML, this setting is represented by the element <w:vanish>

    See also

    You'll find an example that demonstrates how to deal with hidden text here:

    Cindy Meister, VSTO/Word MVP
    • Proposed as answer by 许阳(无锡) Tuesday, January 24, 2012 4:13 AM
    • Marked as answer by 许阳(无锡) Friday, January 27, 2012 7:15 AM
    Monday, January 23, 2012 10:24 AM
  • Many thanks Cindy !

    That solved the issue. By eliminating hidden text and custom hidden xml the node has disappeared !



    Monday, January 23, 2012 11:22 AM