| View previous topic :: View next topic |
| Author |
Message |
andreasm Power User

Joined: 06 Dec 2003 Posts: 54 Location: South Tyrol
|
Posted: Sat Dec 20, 2003 12:12 pm Post subject: Best place to save configuration parameters |
|
|
Hello,
what is the best place to save configuration parameters for own libraries ?
Is it possible to use the configuration manager ?
Bye
Andreas |
|
| Back to top |
|
 |
DannyB Moderator


Joined: 02 Apr 2003 Posts: 3991 Location: Lawrence, Kansas, USA
|
|
| Back to top |
|
 |
Didier Guest
|
Posted: Sat Dec 20, 2003 11:52 pm Post subject: |
|
|
Here is a sample of code for storing macro settings (here the Language value), it creates an .ini file using the UserConfig path:
| Quote: | Sub SetIniFile(FileName As String)
hFile = FreeFile
oPathSettings = CreateUnoService( "com.sun.star.util.PathSettings" )
sFileURL = oPathSettings.UserConfig & "/" & FileName & ".ini"
sFilename = ConvertFromURL(sFileURL)
Open sFilename for Output Access Write As #hFile
Print #hFile, "[Language]"
Print #hFile, Language
Close #hFile
End Sub |
|
|
| Back to top |
|
 |
|