Results 1 to 8 of 8
  1. #1
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Saving Word documents in XML format? (Word 2002)

    That's a real good question. I don't know if Word 2002 has improved that much on 2000's XML support (which is half-baked). Hopefully, others will have more on this. Keep searching MSDN and the net.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Saving Word documents in XML format? (Word 2002)

    I will be interested to hear whether this works:

    Export a Word Document to XML
    Kevin McDowell
    Microsoft Corporation
    May 2001
    Applies to: Microsoft

  3. #3
    2 Star Lounger
    Join Date
    Nov 2001
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Saving Word documents in XML format? (Word 2002)

    Well, I gave this a go and it works...almost.

    It seems to parse most of the Word objects into XML, however, it doesn't handle the Track Changes functionality of Word. It also ignores various tags (Bold, Italic etc..) Some of this stuff can be improved upon, however it may be difficult to handle the Track Changes as this is stored in binary format so will therefore be more difficult to access. Can somebody advise on this?

    Essentially, what I require is a tool that can convert a Word document into XML including all formatting attributes, Track Changes info, Comments, Insertions & Deletions etc...

    Any ideas? I still can't quite believe Microsoft didn't build this into Word 2002.

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Saving Word documents in XML format? (Word 2002)

    I find that strange because if you open a document containing tracked changes, choose File

  5. #5
    2 Star Lounger
    Join Date
    Nov 2001
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Saving Word documents in XML format? (Word 2002)

    Interesting, I hadn't noticed that before.

    I gathered all of the tracking and history info. was stored in binary and not accessible using VBA. Can somebody correct me on this?

    If all of the Word info. required to recreate a document is accessible using VBA, then maybe it wouldn't be so difficult to amend the Word to XML converter mentioned in one of the other posts. Which again makes me wonder why Microsoft didn't build this functionality into Word in the first place.

  6. #6
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Saving Word documents in XML format? (Word 2002)

    If you poke around in the properties of the Revision object, you will find most of what would be needed. What does the XML output for a short Word document look like, anyway? Can you post a sample?

  7. #7
    2 Star Lounger
    Join Date
    Nov 2001
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Saving Word documents in XML format? (Word 2002)

    Is it possible to save a Word document in XML whilst preserving all of the tracking, formatting, style info. etc...

    I know a lot of this information is stored in binary, so can one access this and store it as XML?

    Chris
    Attached Files Attached Files

  8. #8
    2 Star Lounger
    Join Date
    Nov 2001
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Saving Word documents in XML format? (Word 2002)

    Sure...

    This is the output I received when I ran a Word file through the Word 2 XML converted featured in MSDN...

    I intend to go ahead and start developing a fully functional Word 2 XML converter. This will mean extending the current one featured in MSDN.

    Before proceeding, however, I would be really grateful for any feedback people could give me on what I should look out for when trying to parse the Word document into XML. My aim is to create something that will parse both ways:

    i) Word 2 XML
    ii) XML 2 Word

    Any advice on potential gotchas, any tips, anything advice at all! would be much appreciated [img]/forums/images/smilies/smile.gif[/img]

    Thanks,

    Chris

    P.S I have uploaded the xml file as a .txt file.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •