Hi i am developing a customer agreement form where i have Company logo and name on top and rest details in body with terms and condition,
i have created that all sting in with help of string builder and then replace spacific data from database,
now i want to convert ouput string in word file,
i have tried following code but after converting logo and word is not proper format.
- //build the content for the dynamic Word document
- //in HTML alongwith some Office specific style properties.
- var strBody = new StringBuilder();
- strBody.Append(" +
- "xmlns:o='urn:schemas-microsoft-com:office:office' " +
- "xmlns:w='urn:schemas-microsoft-com:office:word'" +
- "xmlns='http://www.w3.org/TR/REC-html40'>" +
- "
Time "); - //The setting specifies document's view after it is downloaded as Print
- //instead of the default Web Layout
- strBody.Append("");
- strBody.Append("");
- strBody.Append("" +
- "");");
- strBody.Append(HtmlCAF);
- strBody.Append("
- //Force this content to be downloaded
- //as a Word document with the name of your choice
- Response.AppendHeader("Content-Type", "application/msword");
- Response.AppendHeader("Content-disposition", "attachment; filename=" + fileName + "");
- Response.Write(strBody.ToString());
please help

Marvin ReidPosted Jan 11, 2023, 8:11 PM
You can take string and convert it into a new word document using the Document Editor. Below you can find code that highlights this, as well as the full example in the documentation.
https://www.leadtools.com/help/sdk/dh/javascript/de/textengine.html
Jefferson S. MottaPosted May 22, 2020, 7:50 AM