Hi,
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?
Regards
Carl Werner
Hi,
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?
Regards
Carl Werner
Carl ,
You can change the default template by running a macro on every machine
hope it helps
Fernand
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.
Hi
Would copying the UserProfile be a good way to get all the settings copied?
http://wiki.documentfoundation.org/Documentation/UserProfile
It might be worth doing a search for how to do a corporate deployment of
LibreOffice or OpenOffice (or a large-scale deployment).
Regards from
Tom
Hi,
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?Regards
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.
when everiting is local , make a "extension" with the macro's to run
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
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.
Hi
There is a folder called "templates" in the user-profile
http://wiki.documentfoundation.org/Documentation/UserProfile
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
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?
Am 03.02.2012 13:46, Carl wrote:
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?
http://wiki.services.openoffice.org/wiki/Documentation/Administration_Guide/Adding_Template_Files
Carl ,
With the joined code you can make the wanted "NewWritterTemplate.ott" working
Hope it helps
Fernand
Sub set_new_writerTemplate()
GlobalScope.BasicLibraries.loadLibrary("myTools")
sNode = "org.openoffice.Setup/Office/Factories/com.sun.star.text.TextDocument"
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/New_WriterTemplate.ott"
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 com.sun.star.beans.PropertyValue
xconfig = createunoservice("com.sun.star.configuration.ConfigurationProvider")
aPropValue.Name = "nodepath"
aPropValue.Value = sNodePath '"org.openoffice.Office.Linguistic"
aArgs(0) = aPropValue
xAccess = xconfig.createinstanceWithArguments("com.sun.star.configuration.ConfigurationUpdateAccess",aArgs())
xAccess.setPropertyValue(sProperty, sValue)
xAccess.commitchanges
bReturn = True
exitErr:
setOOoSetupValue = bReturn
End Function
Function getOOoSetupValue(sNodePath$,sProperty$)
Dim aConfigProvider, oNode, args(0) As new com.sun.star.beans.PropertyValue
aConfigProvider = createUnoService("com.sun.star.configuration.ConfigurationProvider")
args(0).Name = "nodepath"
args(0).Value = sNodePath
oNode = aConfigProvider.createInstanceWithArguments("com.sun.star.configuration.ConfigurationAccess", args())
getOOoSetupValue = oNode.getbyname(sProperty)
End Function