Discussion:
Finding MS Word "word" and "paragraph" Styles
(too old to reply)
Trevor Lowing
2005-03-12 13:16:35 UTC
Permalink
I'm trying to export a Word document to XML manually (because I need
something more like DocBook XML -but not exactly DocBook). I think I
have a routine that crawls through the document tree pretty decently
paragraphs, lists, tables ->range.text but I need to identify text
styles and extra attributes for headings, links, bookmarks
bold-italics-superscript-subscript, etc within the paragraph ranges.

One approach I tried was to select the text and "find" the style within
the document and add the XML tagging around the elements (but it forces
me to monkey with modifying the actual document and undoing changes
afterward). I've also tried checking character-by-character
(slooooooow). Any decent ideas?
--
---------------------------------
Trevor Lowing
Satellite Beach, Fl
Jezebel
2005-03-12 22:17:02 UTC
Permalink
Make sure that the document is formatted strictly using named styles; then
the problem goes away, because the named styles translate into XML tags
directly.
Post by Trevor Lowing
I'm trying to export a Word document to XML manually (because I need
something more like DocBook XML -but not exactly DocBook). I think I have
a routine that crawls through the document tree pretty decently
paragraphs, lists, tables ->range.text but I need to identify text styles
and extra attributes for headings, links, bookmarks
bold-italics-superscript-subscript, etc within the paragraph ranges.
One approach I tried was to select the text and "find" the style within
the document and add the XML tagging around the elements (but it forces me
to monkey with modifying the actual document and undoing changes
afterward). I've also tried checking character-by-character (slooooooow).
Any decent ideas?
--
---------------------------------
Trevor Lowing
Satellite Beach, Fl
Loading...