Ich versuche, HTML-Datei in MS-Word-Datei (docx) zu konvertieren. Mit Microsoft.Office.Interop.Word kann ich von HTML zu Word konvertieren, aber die Schriftgröße ist nicht gleich für beide HTML-und Word-Format der Datei. Welche Formatierung (Schriftgröße) ich in HTML gemacht habe, ist in Word-Datei verloren. Kann mir jemand helfen, die gleiche Schriftgröße beizubehalten. HierSchriftgröße ist nicht gleich, wenn HTML in Word konvertiert wird mit Microsoft.Office.Interop.Word
ist der Code:
Microsoft.Office.Interop.Word.Document wordDoc = new Microsoft.Office.Interop.Word.Document();
wordDoc = wordApp.Documents.Open(ref filepath, ref confirmconversion, ref readOnly, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing);
object fileFormat = Microsoft.Office.Interop.Word.WdSaveFormat.wdFormatDocumentDefault;
wordDoc.SaveAs(ref saveto, ref fileFormat, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oallowsubstitution, ref oMissing, ref oMissing);
Dank!