2011-10-27 3 views
0

に私はMSワードファイルで動作するようにしようとしているが、私は以下のようなコードを書くとき:DocumentオブジェクトのためのライブラリのC#

Document document = new Document("Sample.doc"); 

を私は次のエラーを取得する:

Error: The type or namespace name 'Document' could not be found (are you missing a using directive or an assembly reference?) 

を知らせますこのデータオブジェクトにはどのライブラリを含めるべきですか?

答えて

1

は、アプリケーション内の参照としてMicrosoft.Office.Interop.Wordを含めると、あなたのクラスでは、書き込み

using Microsoft.Office.Interop.Word 
関連する問題