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

Best place to save configuration parameters

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


Joined: 06 Dec 2003
Posts: 54
Location: South Tyrol

PostPosted: Sat Dec 20, 2003 12:12 pm    Post subject: Best place to save configuration parameters Reply with quote

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
View user's profile Send private message
DannyB
Moderator
Moderator


Joined: 02 Apr 2003
Posts: 3991
Location: Lawrence, Kansas, USA

PostPosted: Sat Dec 20, 2003 9:44 pm    Post subject: Reply with quote

I very much wish the configuration manager could be used. Alas, the documentation says it can't be used to create your own nodes.

A very similar question was discussed before.
http://www.oooforum.org/forum/viewtopic.php?t=3707

The trick was basically to get one of the paths from PathSettings, and then save documents into that path.
_________________
Want to make OOo Drawings like the colored flower design to the left?
Back to top
View user's profile Send private message
Didier
Guest





PostPosted: Sat Dec 20, 2003 11:52 pm    Post subject: Reply with quote

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
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