[.Net] Microsoft.Office.Interop.Word 讀取內容

只是想簡單的查一下pdf內容是否有關鍵字, 可用word元件

using System;
using Word = Microsoft.Office.Interop.Word;

namespace MailProcess.Utility
{
    class WordTool : IDisposable
    {
        private static readonly Word.Application app = new Word.Application();
        private readonly Word.Document doc = null;

        #region constructor
        public WordTool(string path)
        {
            doc = app.Documents.Open(path);
        }
        #endregion

        #region property
        public string Text
        {
            get { return (doc != null) ? doc.Content.Text : string.Empty; }
        }

        public Word.Document Document
        {
            get { return doc; }
        }
        #endregion

        #region Method
        /// <summary>
        /// 是否包含
        /// </summary>
        /// <param name="find"></param>
        /// <returns></returns>
        public bool Contains(string find)
        {
            return Text.Contains(find);
        }

        public void Dispose()
        {
            if (doc != null)
                doc.Close(false);/*
            if (app != null)
                app.Quit();*/
        }
        #endregion
    }
}

Taiwan is a country. 臺灣是我的國家