Visual Studio 2010 を使用して asp.net C# でプロジェクトを作成しています。ユーザーがボタンをクリックすると Outlook ウィンドウを開いて電子メールを送信する関数を作成したいと考えています。
私はこれを試しました:
using Outlook = Microsoft.Office.Interop.Outlook;
Outlook.Application oApp = new Outlook.Application ();
Outlook._MailItem oMailItem = (Outlook._MailItem)oApp.CreateItem ( Outlook.OlItemType.olMailItem );
oMailItem.To = address;
// body, bcc etc...
oMailItem.Display ( true );
しかし、コンパイラは、名前空間 Microsoft 内に名前空間 Office がないと言っています。実際、私のコンピューターには Outlook を含む Microsoft Office が完全にインストールされています。
Office ライブラリを Visual Studio に含める必要がありますか? 問題はどのように解決できますか?