| View previous topic :: View next topic |
| Author |
Message |
Lusithania General User

Joined: 04 Feb 2004 Posts: 9 Location: Poland
|
Posted: Tue Feb 10, 2004 1:44 am Post subject: How to get a path where all the templates are kept by user? |
|
|
I have a little problem.
I don't know how to get a path which indicates OpenOffice where the aplication should seek for templates.
This path could be setup and changed by a user in Tools -> Options -> OpenOffice.org -> Paths -> Templates.
I think that there must be some function which will do it.
In MS Office it looks like this:
| Code: |
temp = Options.DefaultFilePath (wdUserTemplatesPath)
temp = temp + "\" + FileName + ".dot"
|
Thank you for help in advance.[/code] |
|
| Back to top |
|
 |
JohnV Administrator

Joined: 07 Mar 2003 Posts: 8995 Location: Lexinton, Kentucky, USA
|
Posted: Tue Feb 10, 2004 6:06 am Post subject: |
|
|
Slight alteration of my code to find the user's default work directory.
| Code: | GlobalScope.BasicLibraries.LoadLibrary("Tools")
TemURL = GetPathSettings("Template") ' "Template" is case sensitive.
Print TemURL |
|
|
| Back to top |
|
 |
Lusithania General User

Joined: 04 Feb 2004 Posts: 9 Location: Poland
|
Posted: Wed Feb 11, 2004 12:21 am Post subject: |
|
|
Thank you very much. It was really helpfull and it worked.
Can you tell me where did you learn such things and where can I find information about all functions which can be used in macros in OOo? But please don't tell me that you use only Developers Guide because I cannot find it useful at all.
Regards
Lusithania |
|
| Back to top |
|
 |
JohnV Administrator

Joined: 07 Mar 2003 Posts: 8995 Location: Lexinton, Kentucky, USA
|
Posted: Wed Feb 11, 2004 5:06 am Post subject: |
|
|
Pure detective work. I knew OO needed the same information you and I were looking for and hoped it used a macro to find it. I then looked through the various other libraries avail in the macro area until I found a likely looking macro. Copied and pasted it as document macro, ran it and worked from there.
I went through several until I found what I was looking for and then had to figure out how to make return the value I wanted. |
|
| Back to top |
|
 |
Lusithania General User

Joined: 04 Feb 2004 Posts: 9 Location: Poland
|
Posted: Wed Feb 11, 2004 6:56 am Post subject: |
|
|
So You must be a good detective or a computer programmer.  |
|
| Back to top |
|
 |
DannyB Moderator


Joined: 02 Apr 2003 Posts: 3991 Location: Lawrence, Kansas, USA
|
|
| Back to top |
|
 |
|