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

How to read a Windows environmentvariable from OO macro ?

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


Joined: 30 May 2005
Posts: 2

PostPosted: Mon May 30, 2005 5:39 am    Post subject: How to read a Windows environmentvariable from OO macro ? Reply with quote

Hi,

I am new to OO basic.

I am trying to read a Windows environment variable from an OO macro (to get the home directory of the program I want to launch from OpenOffice)

Is there a way to do that ?

Alternatively, I could use a Windows registry key if this is easier ?

Thanks for any help !

Kadmael
Question
Back to top
View user's profile Send private message
SergeM
Super User
Super User


Joined: 09 Sep 2003
Posts: 3211
Location: Troyes France

PostPosted: Mon May 30, 2005 9:43 am    Post subject: Reply with quote

See :
Home Directory http://www.oooforum.org/forum/viewtopic.phtml?t=13506&highlight=
How can I get the full path of current open file http://www.oooforum.org/forum/viewtopic.phtml?t=13483&highlight=
Basic BASIC help? :http://www.oooforum.org/forum/viewtopic.phtml?t=5205
_________________
Linux & Windows OOo3.0
UNO & C++ : WIKI
http://wiki.services.openoffice.org/wiki/Using_Cpp_with_the_OOo_SDK
In French
http://wiki.services.openoffice.org/wiki/Documentation/FR/Cpp_Guide
Back to top
View user's profile Send private message Visit poster's website
Kadmael
Newbie
Newbie


Joined: 30 May 2005
Posts: 2

PostPosted: Tue May 31, 2005 1:07 am    Post subject: It works ! Reply with quote

Razz

Thanks a lot : I found exactly the answer I needed !

Access to Windows environment vairaibles is easy through :

environ("WindowsVariable")

I created a macro like :

print environ("WindowsVariable")

And it gave me the variable value.

Again Thanks !
Back to top
View user's profile Send private message
SergeM
Super User
Super User


Joined: 09 Sep 2003
Posts: 3211
Location: Troyes France

PostPosted: Tue May 31, 2005 9:01 am    Post subject: Reply with quote

You are welcome
_________________
Linux & Windows OOo3.0
UNO & C++ : WIKI
http://wiki.services.openoffice.org/wiki/Using_Cpp_with_the_OOo_SDK
In French
http://wiki.services.openoffice.org/wiki/Documentation/FR/Cpp_Guide
Back to top
View user's profile Send private message Visit poster's website
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