Word Document creation in ASP.net using VS2003

V

Venance

Can I insert HTML tags in between XML tags and the send the XML to a
Word document object that I've created in my VB.net code? Example,

Dim sXML As String
sXML = "<wordDocument
xmlns='http://schemas.microsoft.com/office/word/2003/wordml'><body>" &
_
"<p><r><t xml:space='preserve'><font face='Arial,
Helvetica, sans-serif'>Example of WordML and InsertXML run
at</font></t></r>" & _
"<r><rPr><b/></rPr><t>" & Now() &
"</t></r></p><p/><p/></body></wordDocument>"

Will word be able to process the <strong> html tag and bold the text
that's in between?



Venance
 
C

Cindy M -WordMVP-

Hi Venance,
Can I insert HTML tags in between XML tags and the send the XML to a
Word document object that I've created in my VB.net code? Example,

Dim sXML As String
sXML = "<wordDocument
xmlns='http://schemas.microsoft.com/office/word/2003/wordml'><body>" &
_
"<p><r><t xml:space='preserve'><font face='Arial,
Helvetica, sans-serif'>Example of WordML and InsertXML run
at</font></t></r>" & _
"<r><rPr><b/></rPr><t>" & Now() &
"</t></r></p><p/><p/></body></wordDocument>"

Will word be able to process the <strong> html tag and bold the text
that's in between?
No, Word won't interpret HTML tags it encoungers in a <t></t> tag. It
will print them literally, as part of the text. Formatting commands have
to be "translated" into WordML formatting tags.

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 :)
 

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