#region  读取word
    /// <summary>
    /// 读取word所有文字内容(不包含表格)
    /// </summary>
    /// <returns>word中的字符内容(纯文本)</returns>
    public string ReadAllFromWord()
    {
        Word.ApplicationClass app = null;
        Word.Document doc = null;
        object missing = System.Reflection.Missing.Value;
        object FileName = @"E:\学习试验项目\ReadFromWordDoc\test.doc";
        object readOnly = true;
        object isVisible = false;
        try
        {
            app = new Word.ApplicationClass();
            doc = app.Documents.Open(ref FileName, ref missing, ref readOnly,
                ref missing, ref missing, ref missing, ref missing, ref missing,
                ref missing, ref missing, ref missing, ref isVisible, ref missing,
                ref missing, ref missing, ref missing);            string textString = "";
            //读取全部内容
            textString = doc.Content.Text.Trim();
            //                int ParCount = this.getParCount(doc);//段数
            //                for (int i = 1 ; i <= ParCount ; i++)
            //                {
            //                    textString = textString + doc.Paragraphs[i].Range.Text.Trim();//doc.Content.Text.Trim();//
            //                }
            textString = textString.Replace("\a", "");    //替换空串为空
            textString = textString.Replace("\r", "\n");  //替换回车为回车换行
            return textString;
        }
        catch (Exception ex)
        {
            throw ex;
        }
        finally
        {
            if (doc != null)
            {
                try
                {
                    doc.Close(ref missing, ref missing, ref missing);
                }
                catch
                { }
                doc = null;
            }
            if (app != null)
            {
                try
                {
                    app.Quit(ref missing, ref missing, ref missing);
                }
                catch
                { }
                app = null;
            }
            GC.Collect();
            GC.WaitForPendingFinalizers();        }
    }
    #endregion
--------------------------------------------------------------------------这是读取word内容的方法,
在vs2005里可以运行,
但是在03里就不行了,
有解决的办法吗?
报:未能加载Global文件的错误。