none
How to insert the paragrap based on the xml code by PIA or SDK RRS feed

  • Question

  • For example:

     

    <w:p wsp:rsidR="00674946" wsp:rsidRDefault="00674946" wsp:rsidP="00674946"><w:pPr><w:pStyle w:val="a3"/></w:pPr>
    <w:r><w:t>#7The current version of this paper is maintained on the Web at: </w:t></w:r>
    <w:r><w:br/></w:r><w:r><w:tab/></w:r><w:hlink w:dest="http://www.microsoft.com/whdc/device/input/wheel.mspx">
    <w:r><w:rPr><w:rStyle w:val="a5"/><w:rFonts w:cs="Arial"/></w:rPr><w:t>http://www.microsoft.com/whdc/device/input/wheel.mspx</w:t></w:r></w:hlink>
    </w:p>

     

    Insert a sentence and following a link to the target document?

    - Bruce

    Monday, October 11, 2010 10:57 AM

Answers

  • Hi Bruce,

    If the XML is Word 2003 XML format, then you can use AltChunk to directly import it.

    http://blogs.msdn.com/b/ericwhite/archive/2010/03/11/formats-supported-for-altchunk.aspx

    If not, then you can construct a paragraph and then set the properties (such as font,size etc). To do it, create a Word document, type something, set the different properties and then open this document in the SDK tool which comes with Open XML SDK. The tool will give you the C# code to generate that formatting and paragraph. You can use that code as a base to achieve it.

    Thanks,
    Ankush

     


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Ankush Microsoft Online Community Support
    • Proposed as answer by Ankush_Bhatia Thursday, October 14, 2010 5:57 PM
    • Marked as answer by Bessie Zhao Tuesday, November 9, 2010 9:06 AM
    Thursday, October 14, 2010 5:57 PM