C# で HTML コンテンツを含む Word 文書を作成したいと考えています。ただし、次のコードは、コンテンツを HTML 形式ではなくテキストとして表示します...
これが私のコードです:
Microsoft.Office.Interop.Word.Application app = new Microsoft.Office.Interop.Word.Application();
app.Visible=true;
object template = Missing.Value;
object newTemplate = Missing.Value;
object documentType = Missing.Value;
object visible = true; //Show the doc while we work.
_Document doc = app.Documents.Add(ref template,
ref newTemplate,
ref documentType,
ref visible);
doc.Words.First.InsertBefore ("<html><body>HTML content here!</body></html>");