Map a Word document as HTML.

T

Thanks_in_advance

Hi!

At work, I was asked to develop something in VBA that could "read" a Word
Document and save it as

Html file. I think I saw something that saves a word document automatically
as an Html file, but that seems to introduce a lot of garbage in the Html.

What I need is to write my own Html according to the text characteristics:
For example, while

I'm scanning the whole document, if there's a bold statement I would have to
write

<STRONG>SomeStatement</STRONG> in the Html file.

Another example: If a paragraph style is called SomeOtherStyle (instead of
Normal, for example), I would have to make a reference to that in the Html
text.
Something like: <P style="SomeOtherStlye">This paragraph's style name is
SomeOtherStyle</P>
(Note :Other people will be in charge for making those styles available. My
job is only to "map" the content of a Word document to an Html file).

Maybe something like: "How can I scan the whole document until it reaches
the end?" would be a great starting point.

Thanks in advance.
 
W

Word Heretic

G'day "Thanks_in_advance"

Word 2003 can save as XML which you could then provide a schema for
'hiding' most of the garbage to produce something like what you
describe.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Thanks_in_advance reckoned:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top