使用MS Word API进行拼写检查功能 [英] spell checking function using MS Word API's

查看:93
本文介绍了使用MS Word API进行拼写检查功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在编写一个代码,用于逐字拼写检查文档,但是在最后一行代码之后它继续处理,我没有得到任何响应。



代码如下所示:



Dim oWord As Word.Application = CreateObject(Word.Application)

Dim oDoc As Word.Document = oWord.Documents.Add

Dim itext as string =aavbnf

Dim flag As Boolean = oWord.CheckSpelling(itext)

Hi,
I am writing a code for spell checking a document word by word, but after final line of code it keep processing and i get no response.

code is mentioned below:

Dim oWord As Word.Application = CreateObject("Word.Application")
Dim oDoc As Word.Document = oWord.Documents.Add
Dim itext as string = "aavbnf"
Dim flag As Boolean = oWord.CheckSpelling(itext)

推荐答案

使用C#中Word的拼写检查程序 [ ^ ]你会发现作者如何调用Word并调用它的拼写检查功能。它是旧的和C#,而不是VB,但可以给你一些指导。



你也可以使用OpenOffice,查看这篇文章NetSpell - .NET的拼写检查程序 [ ^ ](拼写检查器,同义词库,连字符.NET(c#,VB):NHunspell [ ^ ])。



--V.Lorz
In Using Word's spellchecker in C#[^] you'll find how the author calls Word and invokes it's spell checking functionality. It is old and C#, not VB, but could give you some guidelines.

You could also use OpenOffice for that, check this article NetSpell - Spell Checker for .NET[^] (Spellchecker, Thesaurus, Hyphenation .NET (c#, VB): NHunspell[^]).

--V.Lorz


这篇关于使用MS Word API进行拼写检查功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆