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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • progvar
    New Member
    • Feb 2008
    • 40

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

    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 vSpellAlternati ves As Object
    'Dim oRet As SODispatchInter ceptor
    Dim args()
    Set oSM = CreateObject("c om.sun.star.Ser viceManager")
    Set aLocale = oSM.Bridge_GetS truct("com.sun. star.lang.Local e")
    Set vSpeller = oSM.CreateInsta nce("com.sun.st ar.linguistic2. SpellChecker")
    Set oPropertyValue = oSM.Bridge_GetS truct("com.sun. star.beans.Prop ertyValue")
    aLocale.Languag e = "en"
    aLocale.Country = "US"
    sWord = "Healthy"
    Set vReturn = vSpeller.SPELL( sWord, aLocale, args())
    MsgBox Join(vReturn.ge talternatives() , vbCrLf)

    thanks in advance
    varinder
Working...