这应该是ole的内容,更多的我不知道 vb调用word的字符检查的例子 Function CheckSpell(IncorrectText as string) as string Dim Word As Object, retText$ On Error Resume Next ' 建立对象并打开 WORD Set Word = CreateObject("Word.Basic") ' 把需要检查的 STRING 放到 WORD Word.AppShow Word.FileNew Word.Insert IncorrectText' 运行 WORD 拼写检查 Word.ToolsSpelling Word.EditSelectAll' 取返回值 retText = Word.Selection$() CheckSpell = Left$(retText, Len(retText) - 1)'关闭文件并回到 VB 应用 Word.FileClose 2 ShowSet Word = Nothing End Function 希望对你有帮助!
vb调用word的字符检查的例子
Function CheckSpell(IncorrectText as string) as string
Dim Word As Object, retText$
On Error Resume Next
' 建立对象并打开 WORD
Set Word = CreateObject("Word.Basic")
' 把需要检查的 STRING 放到 WORD
Word.AppShow
Word.FileNew
Word.Insert IncorrectText' 运行 WORD 拼写检查
Word.ToolsSpelling
Word.EditSelectAll' 取返回值
retText = Word.Selection$()
CheckSpell = Left$(retText, Len(retText) - 1)'关闭文件并回到 VB 应用
Word.FileClose 2
ShowSet Word = Nothing
End Function
希望对你有帮助!
你查一下MSDN,在索引里输入JRO,有不少解释