469,649 Members | 1,199 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

how to make a spell check program in vb using openoffice word

40
hi
i am getting probleum in converting a spell check progrma made in vb 6.0 and Ms-office Word into OpenOffice Word

when i made spell check program in Ms-Word and vb 6.0 it works fine
but i use the following code to make spell check program on OpenOffice and vb 6.0 it shows error "OBJECT REQUIRED" on line Set vReturn = vSpeller.SPELL(sWord, aLocale, args()) when correct spelling is stored in sWord variable

in previous program when a correct spelling came it skip that word and go to next word
i also want to how to create a custum dictionary in openOffice like Ms-Office Custom.dic

Dim sWord As String
Dim vReturn As Object
Dim i As Integer
Dim aLocale As Object
Dim oSM As Object
Dim oPropertyValue As Object
Dim emptyArgs As Object
Dim vSpeller As Variant
Dim vSpellAlternatives As Object
'Dim oRet As SODispatchInterceptor
Dim args()
Set oSM = CreateObject("com.sun.star.ServiceManager")
Set aLocale = oSM.Bridge_GetStruct("com.sun.star.lang.Locale")
Set vSpeller = oSM.CreateInstance("com.sun.star.linguistic2.Spell Checker")
Set oPropertyValue = oSM.Bridge_GetStruct("com.sun.star.beans.PropertyV alue")
aLocale.Language = "en"
aLocale.Country = "US"
sWord = "Healthy"
Set vReturn = vSpeller.SPELL(sWord, aLocale, args())
MsgBox Join(vReturn.getalternatives(), vbCrLf)

thanks in advance
varinder
Mar 13 '09 #1
0 2824

Post your reply

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

Similar topics

4 posts views Thread by Vish | last post: by
3 posts views Thread by Vish | last post: by
8 posts views Thread by Joe | last post: by
9 posts views Thread by John Zenger | last post: by
3 posts views Thread by John Wright | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.