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 driver settings key 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 preferred profile name aHistorySettings.replaceByName( "PickListSize", nSize ) ' commit the changes done aHistorySettings.commitChanges End Sub