1

既存のDocXワード文書をMicrosoft.Office.Interop.Word.Documentに変換またはタイプキャストしたい。

static DocX g_document;
....
....
function DoSomething()
{
    g_document = DocX.Load(@"C:\Users\RetailWrite.docx");
    Microsoft.Office.Interop.Word.Application wordApp = new  Microsoft.Office.Interop.Word.Application();
    Microsoft.Office.Interop.Word.Document doc = wordApp.Documents.Add(g_document); // Here i m getting error
}

次に、カーストを再入力してMicrosoft.Office.Interop.WordをDocXドキュメントに戻します。どうすればいいのですか?

4

0 に答える 0