OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Spellchecker with vb automation of OO

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
tip2si
Newbie
Newbie


Joined: 08 Aug 2005
Posts: 2

PostPosted: Mon Aug 08, 2005 1:01 pm    Post subject: Spellchecker with vb automation of OO Reply with quote

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
View user's profile Send private message
SergeM
Super User
Super User


Joined: 09 Sep 2003
Posts: 3211
Location: Troyes France

PostPosted: Tue Aug 09, 2005 7:59 am    Post subject: Reply with quote

See :
Problem with terminating soffice.exehttp://www.oooforum.org/forum/viewtopic.phtml?t=5019&start=0
How to close all documents without OpenOffice.org closed ? http://www.oooforum.org/forum/viewtopic.phtml?t=15776&highlight=
_________________
Linux & Windows OOo3.0
UNO & C++ : WIKI
http://wiki.services.openoffice.org/wiki/Using_Cpp_with_the_OOo_SDK
In French
http://wiki.services.openoffice.org/wiki/Documentation/FR/Cpp_Guide
Back to top
View user's profile Send private message Visit poster's website
Cybb20
Super User
Super User


Joined: 02 Mar 2004
Posts: 1569
Location: Frankfurt, Germany

PostPosted: Wed Aug 17, 2005 4:33 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group