I use to write documents in two different languages and have to adopt the language settings accordingly and rather frequently (Tools > Options... > Language Settings > Languages > Default languages for this document (For this document only)). I tried to record this into two macros, but all I got was this (which does nothing):
Code: Select all
sub SetEnglich
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
rem dispatcher.executeDispatch(document, ".uno:OptionsTreeDialog", "", 0, Array())
end sub
Thanks,
Andreas
PS: OpenOffice 2.4, Microsoft XP