1.引用word库
2.1
try
{
object oMissing = System.Reflection.Missing.Value;
//创建Word对象和临时文档
Microsoft.Office.Interop.Word._Application wdApp = new Microsoft.Office.Interop.Word.Application();
Microsoft.Office.Interop.Word._Document wdDoc = wdApp.Documents.Add(ref oMissing, ref oMissing, ref oMissing, ref oMissing);
//声明IDataObject存放从剪贴板返回的数据
IDataObject iData;
//定位Word窗口,使之不可见
wdApp.WindowState = 0;
wdApp.Top = -3000;
//复制输入框的文字到剪贴板
Clipboard.SetDataObject(txtWord.Text);
//对临时文档进行拼写或者语法检查
wdDoc.Content.Paste();
wdDoc.Activate();
object ignoreUppercase = true;