English:

The Free and Open Productivity Suite
New: Apache OpenOffice 4.1.1 released!
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 | Website Feedback | Contact Us | Donate | Thanks

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