using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.Net.Mail;
using System.Net.Mime;
using System.IO;
using System.Text.RegularExpressions;
using System.Reflection;
using System.Runtime.InteropServices;
using Microsoft.Office.Interop.Word;
.........
.........
Microsoft.Office.Interop.Word.Application word = null;
            Microsoft.Office.Interop.Word.Document doc = null;
            try {
                word = new Microsoft.Office.Interop.Word.Application();
                object fileName = "D:\\我的資料\\OurWorks\\每日早會_Blank.doc";
                object falseValue = false;
                object trueValue = true;
                word.Visible = true;
                word.Activate();
                doc = word.Documents.Open(ref fileName, ref missing, ref trueValue, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);
                doc.Activate();
            } catch (Exception ex) {MessageBox.Show(ex.ToString());}我在运行上面的程序代码总是出现下面的错误,请问高手原因何在阿?System.InvalidCastException: Unable to cast COM object of type 'Word.ApplicationClass' to interface type 'Word._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{00020970-0000-0000-C000-000000000046}' failed due to the following error: 程式庫未登錄。 (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)).
   at Word.ApplicationClass.get_Documents()
   at SendMailCom.CSendMail.TCSC_Converter(String asInput) in C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\SendMailCom\SendMailCom\SendMail.cs:line 296