Я хочу конвертировать .docx файл в .html.Я работаю в C #.Мой код такой:
Microsoft.Office.Interop.Word.Application word = new Microsoft.Office.Interop.Word.Application();
Microsoft.Office.Interop.Word.Document wordDoc = new Microsoft.Office.Interop.Word.Document();
Object oMissing = System.Reflection.Missing.Value;
wordDoc = word.Documents.Add(ref oMissing, ref oMissing, ref oMissing, ref oMissing);
word.Visible = false;
Object filepath = @"C:\Users\John\Desktop\begin.docx";
Object confirmconversion = System.Reflection.Missing.Value;
Object readOnly = false;
Object saveto = @"C:\Users\John\Desktop\result.html";
Object oallowsubstitution = System.Reflection.Missing.Value;
wordDoc = word.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);
object fileFormat = WdSaveFormat.wdFormatHTML;
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);
Проблема в том, что это не включает верхний и нижний колонтитулы.Их нет в файле результатов .html.Как я могу включить их в результат?