{description} {excerpt}Processes the XHTML string and inserts it at the end of the specified Word document as formatted text using the document's Normal style as the default font. Returns the last [Element|Element] inserted into the document.{excerpt} {signature:C#} public SoftArtisans.OfficeWriter.WordWriter.Element InsertHTML(System.String xhtml, SoftArtisans.OfficeWriter.WordWriter.Document doc) {signature}{signature:vb.net} Public Function InsertHTML(ByVal xhtml As String, ByVal doc As SoftArtisans.OfficeWriter.WordWriter.Document) As SoftArtisans.OfficeWriter.WordWriter.Element {signature} {parameters} {param:xhtml}A well\-formed fragment of an xhtml document.{param} {param:doc}a WordWriter document object into which content will be inserted.{param} {returns}The last Element inserted into the document.{returns} {example}{code:csharp|title=C#} //--- Create a new WordWriter document. WordApplication wApp = new WordApplication(); Document doc = wApp.Create(); //--- Create the HTMLToWord object. HTMLToWord h2w = new HTMLToWord(); //--- The XHTML to insert into the WordWriter document. string xhtml = "<h1>Greetings</h1><p><b>Hello</b>, <i>world</i>!</p>"; //--- Insert the XHTML at the end of the WordWriter document. Element lastInsertedElement = h2w.InsertHTML(xhtml, doc); {code} {code:vb.net|title=vb.net} '--- Create a new WordWriter document. Dim wApp As New WordApplication() Dim doc As Document = wApp.Create() '--- Create the HTMLToWord object. Dim h2w As New HTMLToWord() '--- The XHTML to insert into the WordWriter document. Dim xhtml As String = "<h1>Greetings</h1><p><b>Hello</b>, <i>world</i>!</p>" '--- Insert the XHTML at the end of the WordWriter document. Dim lastInsertedElement As Element = h2w.InsertHTML(xhtml, doc) {code} {example} |