Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Other Office > Word VBA
|
Word VBA Discuss using VBA to program Word.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Word VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 22nd, 2011, 09:01 AM
Registered User
 
Join Date: Dec 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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...





Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending xml format through email, format issue!!! abhishekkashyap27 ASP.NET 2.0 Professional 0 December 14th, 2010 07:35 AM
Format Number Dink Classic ASP Databases 2 January 23rd, 2007 01:40 AM
Number Format - Need Help! bridog39 Access 7 November 14th, 2005 02:50 PM
Format Number hcweb Classic ASP Basics 4 October 27th, 2004 11:23 AM
format number tgopal Javascript 2 April 30th, 2004 03:44 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.