none
How to capture word's number-list RRS feed

  • Question

  • I am working on a small snippet in Word VBA (MS Word 2003) that should be capable of capturing the number list and convert it into simple XML format.

    I also have generated most of the XML however i am not able to read the values for the number-style from word's numbered list which i could map to my custom style names (highlighted using underlined text in the XML shown in the end of this post).

    How do i read the number styles - I / a / i - from the word's number list?

    I have attached the screen grab for the number-list in Word which i am trying to read using VBA.

     

    Screen grab of the number-list from the word document:
    --------------------------------------------------------------------------


    --------------------------------------------------------------------------

     

    Output XML that is generated so far is as below (current output is without the numberstyle attribute shown below):
    --------------------------------------------------------------------------------------------------------------------------------------------------
    <?xml version="1.0" encoding="UTF-8"?>
    <root>
        <section type="list" level="1" listtype="3" numberstyle="roman-big">
            <data type="list" level="1">This is number list level 1</data>
            <section type="list" level="2" listtype="3" numberstyle="alpha-small">
                <section type="list" level="3" listtype="3" numberstyle="roman-small">
                    <data type="list" level="3">This is number list level 3</data>
                    <data type="list" level="3">This is number list level 3</data>
                </section>
            </section>
        </section>
    </root>
    --------------------------------------------------------------------------------------------------------------------------------------------------

     

    Thanks in advance

    Tuesday, December 27, 2011 5:38 AM