| View previous topic :: View next topic |
| Author |
Message |
tip2si Newbie

Joined: 08 Aug 2005 Posts: 2
|
Posted: Mon Aug 08, 2005 1:01 pm Post subject: Spellchecker with vb automation of OO |
|
|
I want to implement a spellchecker functionality in a VB6 appl. What ist wrong in this code:
....
Set oOO = CreateObject("com.sun.star.ServiceManager")
Set oSpell = oOO.createInstance("com.sun.star.linguistic2.SpellChecker")
Set oHyphen = oOO.createInstance("com.sun.star.linguistic2.Hyphenator")
The following line failed with err 438
Set aLocal = oHyphen.Locale("de", "DE", "")
Set xSpellWord = oSpell.spell("nähmlich", aLocal, aEmptyProps)
...
2nd question:
Set oOO = Nothing doesn't finish the task of soffice, how is this done?
Thanks Peter |
|
| Back to top |
|
 |
SergeM Super User

Joined: 09 Sep 2003 Posts: 3211 Location: Troyes France
|
|
| Back to top |
|
 |
Cybb20 Super User


Joined: 02 Mar 2004 Posts: 1569 Location: Frankfurt, Germany
|
Posted: Wed Aug 17, 2005 4:33 pm Post subject: |
|
|
Set aLocal = oHyphen.Locale("de", "DE", "") fails because oHyphen simply has no method named Locale (in fact there is no Locale method throughout the whole API).
I guess you wanted to use the struct Locale which has three fields, but then you need to define this field before with something like:
Dim locale as new com.sun.star.lang.Locale
locale.Language = "de"
locale.Country = "DE"
locale.Variant = ""
And then you can use it.
Christian _________________ - Knowledge is Power - |
|
| Back to top |
|
 |
|