
Converting a Selection/Range Object to HTML
Try using the HTMLProject object of the Word.Document
something like
objDoc.HTMLProject.Open msoHTMLProjectOpenTextView
Set objHTML = objDoc.HTMLProject
objDoc.Range.Text = objHTML.HTMLProjectItems(1).Text
This should take the rich text in the objDoc document, open an HTMLProject
with xml converted from the rich text, and put that xml back into the word
document, for you to parse for the relevant html. Might be what you need.
minime2323
Quote:
> Does anyone know of a way of converting a Selection (or Range) object
> to a usable HTML string. I need to retain (as closely as possible) the
> original formatting that the selection has.
> I'm stumped...
> Thanks
> John Armstrong-Prior