Render using Range.InsertFile

Litty Joseph 1 Reputation point
2021-11-02T09:01:16.653+00:00

Hi Team,

I am using below code to insert an html file into a word document. After saving and opening the doc its showing some junk characters for some specific texts. Please see the screenshots of temp3_htm and temp_docx .

string htmlFile = @"C:\Users\admin\Desktop\Temp_3.htm";
para1.Range.InsertFile(htmlFile, System.Type.Missing, System.Type.Missing, System.Type.Missing, false);

//Save the document
object filename = @"C:\Users\admin\Desktop\temp.docx";
document.SaveAs2(ref filename);

I am seeing this issue with names start with "EN -" ("E N -") or starts with a Japanese characters.(eg. "テスト" . )
Could you please check this?

145793-temp3-htm.jpg

145763-code.txt

145727-temp-docx.jpg

Word Management
Word Management
Word: A family of Microsoft word processing software products for creating web, email, and print documents.Management: The act or process of organizing, handling, directing or controlling something.
891 questions
{count} votes