FunctionCheckSpell(IncorrectTextasstring)asstringDimWordAsObject,retText$OnErrorResumeNext'建立对象并打开WORDSetWord=CreateObject("Word.Basic")'把需要检查的STRING放到WORDWord.AppShowWord.FileNewWord.InsertIncorrectText'运行WORD拼写检查Word.ToolsSpellingWord.EditSelectAll'取返回值retText=Word.Selection$()CheckSpell=Left$(retText,Len(retText)-1)'关闭文件并回到VB应用Word.FileClose2ShowSetWord=NothingEndFunction->