Can't save .doc as .xml

What I would like to achieve is to force MS Word not to split specific lines when saving a .doc or .rtf file as .xml. For example, now from something like:

 Something: ***TABLE_NAME.COLUMN_NAME***

      

or

 Something: AAATABLE_NAME.COLUMN_NAMEBBB

      

or something like this I get:

<w:p wsp:rsidR="00537583" wsp:rsidRDefault="00AF6BDF" wsp:rsidP="00537583">
    <w:pPr>
        <w:pStyle w:val="Default"/>
        <w:jc w:val="both"/>
        <w:rPr>
            <w:sz w:val="23"/>
            <w:sz-cs w:val="23"/>
        </w:rPr>
    </w:pPr>
    <w:r>
        <w:rPr>
            <w:sz w:val="23"/>
            <w:sz-cs w:val="23"/>
        </w:rPr>
        <w:t>Something: AAA</w:t>
    </w:r>
    <w:r wsp:rsidR="00537583">
        <w:rPr>
            <w:sz w:val="23"/>
            <w:sz-cs w:val="23"/>
        </w:rPr>
        <w:t>TABLE_NAME.</w:t>
    </w:r>
    <w:r wsp:rsidR="00537583" wsp:rsidRPr="00537583">
        <w:rPr>
            <w:sz w:val="23"/>
            <w:sz-cs w:val="23"/>
        </w:rPr>
        <w:t> COLUMN_NAME</w:t>
    </w:r>
    <w:r wsp:rsidR="00537583">
        <w:rPr>
            <w:sz w:val="23"/>
            <w:sz-cs w:val="23"/>
        </w:rPr>
        <w:t>BBB</w:t>
    </w:r>
</w:p>

      

and what I would like to get for example:

 <w:p wsp:rsidR="00537583" wsp:rsidRDefault="00AF6BDF" wsp:rsidP="00537583">
    <w:pPr>
        <w:pStyle w:val="Default"/>
        <w:jc w:val="both"/>
        <w:rPr>
            <w:sz w:val="23"/>
            <w:sz-cs w:val="23"/>
        </w:rPr>
    </w:pPr>
    <w:r>
        <w:rPr>
            <w:sz w:val="23"/>
            <w:sz-cs w:val="23"/>
        </w:rPr>
        <w:t>Something: AAATABLE_NAME.COLUMN_NAMEBBB</w:t>
    </w:r>
</w:p>

      

I would be grateful for any ideas to help get around this.

+2


source to share


2 answers


Word has the ability to control that RSID records are saved with the document. This is a hidden application option that is only available through the Word object model.

To prevent these IDs from being generated, you can, for example, open the macro editor (Alt + F11) and run the following code in the nearest window:

Application.Options.StoreRSIDOnSave = False

      



Without RSID, all texts with the same formatting will be contained in one run (I think this is what you want).

RSIDs are used by Word to automatically merge documents ; they do not contain important information needed to preserve the layout of the documents, so saving is optional (unless you need to combine documents).

+2


source


Two options of spring if you cannot export it directly:



+3


source







All Articles