Capturing Number list into simple XML format
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 numberstyle from word which i could map to my custom styles (highlighted in red below) in the XML.
How to read the number styles - I / a / i - from the word's number list?
Number list in the Word is as follows:
----------------------------------------------------------------------
I. This is number list level 1
a. This is number list level 2
i. This is number list level 3
ii. This is number list level 3
----------------------------------------------------------------------
Output XML that i am generating:
----------------------------------------------------------------------
<?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">
<data type="list" level="2">This is number list level 2</data>
<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>
----------------------------------------------------------------------
Last edited by nilesh.shinde; December 22nd, 2011 at 09:05 AM..
Reason: small typo error corrected...
|