D
DarrylR
I Googled this topic last night and discovered that many people have
encountered this problem. However, I didn't find any references to an easy
solution (or, oddly enough, a product). I'm trying to do it from a VSTO
solution created in C# .NET using the primary interop assemblies.
I'm attempting to translate html that incorporates standard formatting tags
(e.g. <b/>,<u/>,<i/>,<sub>,and <sup>), lists (e.g. ul), etc. to something
that can be inserted using the InsertXML method (similar to the code found
at http://blogs.officezealot.com/chris/archive/2003/11/06/1253.aspx below).
Original Sub:
Private Sub InsertWordML()
Dim sXML As String
sXML = "<wordDocument
xmlns='http://schemas.microsoft.com/office/word/2003/wordml'><body>" & _
"<p><r><t xml:space='preserve'>Example of WordML and InsertXML
run at </t></r>" & _
"</p><p/><p/></body></wordDocument>"
'Insert WordML
Selection.InsertXML (sXML)
End Sub
What I'd like to do:
Private Sub InsertWordML()
Dim sXML As String
sXML = "<wordDocument
xmlns='http://schemas.microsoft.com/office/word/2003/wordml'
xmlns:ht='http://www.w3.org/TR/REC-html40'>" &_
"<body><p><r><t xml:space='preserve'><ht:u>Example <ht:b>of
WordML</ht:b> and InsertXML</ht:u></t></r>" &_
"</p><p/><p/></body></wordDocument>"
'Insert WordML
Selection.InsertXML (sXML)
End Sub
I found some references to SpreadsheetML accepting HTML using the following
syntax:
<ssata ss:Type='String'
xmlns='http://www.w3.org/TR/REC-html40'>hi<U>there</U> everyone</ssata>.
Is there a WordML equivalent syntax?
Thanks in advance,
Darryl R.
encountered this problem. However, I didn't find any references to an easy
solution (or, oddly enough, a product). I'm trying to do it from a VSTO
solution created in C# .NET using the primary interop assemblies.
I'm attempting to translate html that incorporates standard formatting tags
(e.g. <b/>,<u/>,<i/>,<sub>,and <sup>), lists (e.g. ul), etc. to something
that can be inserted using the InsertXML method (similar to the code found
at http://blogs.officezealot.com/chris/archive/2003/11/06/1253.aspx below).
Original Sub:
Private Sub InsertWordML()
Dim sXML As String
sXML = "<wordDocument
xmlns='http://schemas.microsoft.com/office/word/2003/wordml'><body>" & _
"<p><r><t xml:space='preserve'>Example of WordML and InsertXML
run at </t></r>" & _
"</p><p/><p/></body></wordDocument>"
'Insert WordML
Selection.InsertXML (sXML)
End Sub
What I'd like to do:
Private Sub InsertWordML()
Dim sXML As String
sXML = "<wordDocument
xmlns='http://schemas.microsoft.com/office/word/2003/wordml'
xmlns:ht='http://www.w3.org/TR/REC-html40'>" &_
"<body><p><r><t xml:space='preserve'><ht:u>Example <ht:b>of
WordML</ht:b> and InsertXML</ht:u></t></r>" &_
"</p><p/><p/></body></wordDocument>"
'Insert WordML
Selection.InsertXML (sXML)
End Sub
I found some references to SpreadsheetML accepting HTML using the following
syntax:
<ssata ss:Type='String'
xmlns='http://www.w3.org/TR/REC-html40'>hi<U>there</U> everyone</ssata>.
Is there a WordML equivalent syntax?
Thanks in advance,
Darryl R.