Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index

 Carl ,

With the joined code you can make the wanted "" working

Hope it helps


Sub set_new_writerTemplate()
sNode = "org.openoffice.Setup/Office/Factories/"
     sProperty = "ooSetupFactoryTemplateFile"
'*****OPGELET***** the file must been in the Template directory ! 'moet in een TEMPLATE-directorie staan, anders werkt het NIET*****
      sValue = "file:///t:/template/tools/"
     setOOoSetupValue(sNode, sProperty, sValue)
 End Sub

 Function setOOoSetupValue(sNodePath$, sProperty$, sValue$) as boolean
 on error goto exitErr
 Dim bReturn as Boolean, xconfig, xAccess
 dim aArgs(0) as  Object
  dim aPropValue as new
xconfig = createunoservice("")
     aPropValue.Name = "nodepath"
     aPropValue.Value = sNodePath '"org.openoffice.Office.Linguistic"
     aArgs(0) = aPropValue
xAccess = xconfig.createinstanceWithArguments("",aArgs())
     xAccess.setPropertyValue(sProperty, sValue)
     bReturn = True
     setOOoSetupValue = bReturn
 End Function
 Function getOOoSetupValue(sNodePath$,sProperty$)
Dim aConfigProvider, oNode, args(0) As new aConfigProvider = createUnoService("")
     args(0).Name = "nodepath"
     args(0).Value = sNodePath
oNode = aConfigProvider.createInstanceWithArguments("", args())
 getOOoSetupValue = oNode.getbyname(sProperty)
 End Function

As far as I understand I should be able to set the default font and font size in the main.xcd file
The only problem is that Im not sure what the format should be... :(

I tried the template way. I created a template and copied it to every machine via a script. It does not seem to get used though. I think I need to tell every installation that it should use this file as the default template. How would this be done? Also in the main.xcd file?

On 25/01/2012 14:20, Tom Davies wrote:
Hi :)
There is a folder called "templates" in the user-profile
but there seem to be other weird places too and i am not sure which is used and whether any of them are not used. Looking in

Tools - Options - Paths

You can see that the templates path is has a few different alternatives rather than just one but did not seem to include the path to the folder in the user-profile!

Aaaargh!!  Is it easy enough to add an extra path?
Regards from
Tom :)

--- On Wed, 25/1/12, Jay Lozier<>  wrote:

From: Jay Lozier<>
Subject: Re: [libreoffice-users] Changing default margins and font for a group of users
Date: Wednesday, 25 January, 2012, 8:06

On 01/25/2012 01:11 AM, Carl wrote:
The user data is saved on a mapped drive on the server and the user profile is on the local PC as part of the user's windows profile.
Yes all these users are using different flavours of Windows
Can you push a template out over your network? I am not sure of the exact location of the template folder, but should be similar for all the Windows machines (I use Linux). I would look for LO in the Program folder and navigate to the template folder. You could have a problem with 32 and 64 bit locations.

On 24/01/2012 16:38, Jay Lozier wrote:
On 01/24/2012 03:39 AM, Carl wrote:

I need to change the default margins and font in Libreoffice Writer and Calc for a group of about 100 users. How can I do this without having to go and do it manually on every PC?


Carl Werner

Where is the user data stored? If on a server, create a new default template and update the appropriate file in each user folder (or alternately change the default template location). If locally, I do not have a good idea.

Also, what OS's are involved, I assume Windows.

-- Jay Lozier

-- For unsubscribe instructions e-mail to: Problems?
Posting guidelines + more:
List archive:
All messages sent to this list will be publicly archived and cannot be deleted

For unsubscribe instructions e-mail to:
Posting guidelines + more:
List archive:
All messages sent to this list will be publicly archived and cannot be deleted


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.