Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15
REM  *****  BASIC  *****

Option Explicit

Sub Main
        ChangePickListSize( 10 )
End Sub

Sub ChangePickListSize( nSize as Integer )
        ' access the global configuration provider
        Dim aConfigProvider As Object
        aConfigProvider = createUnoService( "com.sun.star.configuration.ConfigurationProvider" )
        
        ' create an access object for the history node
        Dim aHistorySettings As Object
        Dim aParams(0) As new com.sun.star.beans.PropertyValue
        aParams(0).Name = "nodepath"
        aParams(0).Value = "/org.openoffice.Office.Common/History"
        aHistorySettings = aConfigProvider.createInstanceWithArguments( _
                "com.sun.star.configuration.ConfigurationUpdateAccess", _
                aParams() )
        
        ' set the pick list size
        aHistorySettings.replaceByName( "PickListSize", nSize )
        
        ' commit the changes done
        aHistorySettings.commitChanges
End Sub

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.