469,647 Members | 1,797 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,647 developers. It's quick & easy.

correct a misspelled word automatically with most matching word using Msword.dll

Hello all,
i need to correct a misspelled word automatically with a most matching word by using MS word.dll in vb.net 2005, i m getting the checkspelling window with the below code but i need the word has to be corrected without asking for suggestions...................
Can any one help me on this....................



Imports word = Microsoft.Office.Interop.Word

Dim word_server As New word.Application
word_server.Visible = False
Dim doc As word.Document = word_server.Documents.Add()
Dim rng As word.Range
rng = doc.Range()

rng.Text = "flder"

doc.Activate()
doc.CheckSpelling()

Dim chars() As Char = {CType(vbCr, Char), CType(vbLf, Char)}
MsgBox(doc.Range().Text.Trim(chars))

doc.Close(SaveChanges:=False)
word_server.Quit()
Jul 25 '08 #1
0 925

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Sam | last post: by
5 posts views Thread by Fazer | last post: by
1 post views Thread by Morris | last post: by
12 posts views Thread by Cheval | last post: by
6 posts views Thread by cyusman | last post: by
reply views Thread by =?Utf-8?B?S2ltIFM=?= | last post: by
1 post views Thread by =?Utf-8?B?S2ltIFM=?= | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.