0

I've made a WordMl package & using "Range.InsertXML" method to insert but word is removing the styles on inserted paragraph.

How can i preserve the styles inserted from wordml?

Below is the WordMl Package.

 <?xml version="1.0" encoding="UTF-8"?>
<pkg:package xmlns:pkg="http://schemas.microsoft.com/office/2006/xmlPackage">
   <pkg:part pkg:name="/word/document.xml" pkg:contentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml">
      <pkg:xmlData>
         <w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
            <w:body>
               <w:p xmlns:wsp="http://schemas.microsoft.com/office/word/2003/wordml/sp2" wsp:rsidR="" wsp:rsidRPr="" wsp:rsidRDefault="">
                  1537339367146
                  <w:r wsp:rsidRPr="">
                     <w:rPr>
                        <w:color w:val="" />
                        <w:sz w:val="20" />
                     </w:rPr>
                     <w:t xml:space="preserve"> Corey M Abramson, Elena Portacolone </w:t>
                  </w:r>
                  <w:r>
                     <w:rPr>
                        <w:sz w:val="20" />
                        <w:rStyle w:val="sup" />
                     </w:rPr>
                     <w:t xml:space="preserve"> ( 2017 ) </w:t>
                  </w:r>
                  <w:r wsp:rsidRPr="">
                     <w:rPr>
                        <w:color w:val="" />
                        <w:sz w:val="20" />
                     </w:rPr>
                     <w:t xml:space="preserve"> What is new with old? What old age teaches us about inequality and stratification. </w:t>
                  </w:r>

               </w:p>
            </w:body>
         </w:document>
      </pkg:xmlData>
   </pkg:part>
</pkg:package>
4

1 回答 1

0

i have solved this issue by adding styles pkg in ooxml

于 2018-09-24T12:29:06.083 回答