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

Macro to set dictionary locale in OO.o

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





PostPosted: Tue May 27, 2003 6:40 am    Post subject: Macro to set dictionary locale in OO.o Reply with quote

I've properly installed the French dictionary files to the OpenOffice installation directory. For the auto-spellcheck, I'd like to be able to set the language setting for the document using a macro -- later based on user input. However, what I've got so far claims that the vDict object variable is not being set. Any ideas?

Code:

Sub SetDictionary
   
   Dim vDict as object
   Dim aLocale As New com.sun.star.lang.Locale

   aLocale.Language = "fr"
   aLocale.Country = "FR"
   vDict = createUnoService("com.sun.star.linguistic2.XDictionary")
   vDict.setLocale(aLocale)

   Msgbox "success"
End Sub
Back to top
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