Thread: html in word
View Single Post
  #2   Report Post  
Posted to microsoft.public.word.formatting.longdocs
Cindy M. Cindy M. is offline
external usenet poster
 
Posts: 2,416
Default html in word

Hi Supriya,

I have HTML code(not file). How can I view the data in the wod document.
For example
HTML code:
html xmlns="http://www.w3.org/1999/xhtml"head/headbodySample HTML
data./body/html

Data should appear in the cell is "Sample HTML data"

Is there any class or Interface in the library to handle that?

You'd have to save it to a separate file (in Notepad, for example). Make
sure the file has the extension *.htm. Use Insert/File in Word to bring it
into Word.

Word requires a converter to incorporate HTML into a Word document with the
"formatting". Otherwise all you get is plain text. And the converter only
triggers when using Insert/File or pasting from the Clipboard.

If this isn't something you can use, and you're programming an applet,
you'll have to parse the HTML yourself and insert it into Word.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)