When I convert the HTML content to MSword, a thread aborted error message occurs. Below is the error log:
HttpContext.Current.Response.Clear()
HttpContext.Current.Response.Charset = ""
HttpContext.Current.Response.ContentType = "application/msword"
Dim strFileName As String = "GenerateDocument" + ".doc"
HttpContext.Current.Response.AddHeader("Content-Disposition", "inline;filename=" + strFileName)
Dim strHTMLContent As New StringBuilder()
HttpContext.Current.Response.Write(strHTMLContent)
HttpContext.Current.Response.Flush()
HttpContext.Current.Response.End()