您现在的位置是: 软件 > 开发者网络 > 程序方舟 > 开发专栏 > VB开发 > 正文
·速成电脑精英(包分配)白领高薪一族从这里开始



-Java套接字编程(下)
-MediaStudio Pro 6.5教程
-三款卸载软件最新试用
-基于Visual C++的Winsock API研究

VB 中调用 Word 拼写检查
2001-09-25· ·--··vbeden

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
Show

Set Word = Nothing
End Function


【责任编辑:方舟】
【发表评论】【关闭窗口】
■ 相关内容
 Word2000 中的层和矢量
 如何在Office中创建公式?
 Word2000特殊符号的输入
 让WORD工作效率大增的“独门密技”
 用VB创建复杂表格
 怎样在VB中控制Word
感谢 访问天极网,如果您觉得该文章涉及版权问题,请看这里!