Hello, The following code returns the directory where soffice.exe is:
Sub Benutzerverzeichnis() aService = CreateUnoService("com.sun.star.util.PathSubstitution") sUserPath = ConvertFromURL(aService.substituteVariables("$(prog)", true)) InputBox ("Ihr aktuelles OpenOffice.org-Benutzerverzeichnis ist:", "Benutzerverzeichnis", sUserPath) End Sub Unfortunately, this does not always reliable, because under OOo 3.3.0 (Win7 32Bit) I get: C:\Program Files\OpenOffice.org 3\Basis\program However, the soffice.exe is here: C:\Program Files\OpenOffice.org 3\program How can I reliably determine the location of soffice.exe? Note: The above code works imho correctly for AOO 4.1.1 (only tested with a server-installation) but I need a code that works for OOo 3.2.1 to AOO 4.1.1 (and, if it's possible, all LO-Versions). Greetings, Jörg --------------------------------------------------------------------- To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org For additional commands, e-mail: api-h...@openoffice.apache.org