Use Tools > Options > OpenOffice.org calc > General > "Press enter to
move selection", and set a new value. Close the dialog, and the change
is immediate.
If I use the API, however, I must restart OOo before the change is seen.
For example,
Sub CheckConfigs
Dim nodeArgs(0) As New com.sun.star.beans.PropertyValue
Dim s$
Dim oProvider
DIm oUpdateAccess
REM Properties
nodeArgs(0).Name = "nodePath"
nodeArgs(0).Value = "org.openoffice.Office.Calc/Input"
nodeArgs(0).State = com.sun.star.beans.PropertyState.DEFAULT_VALUE
nodeArgs(0).Handle = -1 'no handle!
REM the required Config Services
s = "com.sun.star.comp.configuration.ConfigurationProvider"
oProvider = createUnoService(s)
s = "com.sun.star.configuration.ConfigurationUpdateAccess"
oUpdateAccess = oProvider.createInstanceWithArguments(s, nodeArgs())
Print "oUpdateAccess.MoveSelectionDirection = " &
oUpdateAccess.MoveSelectionDirection
oUpdateAccess.MoveSelectionDirection = 1
oUpdateAccess.commitChanges()
End Sub
If the MoveSelectionDirection is set to 0 (Down) using the GUI and then
I use the macro to set the direction to 1 (Right), I must restart OOo to
see the change. Well, the macro sees the change if I run the macro a
second time. Is there a suitable method to convince OOo to recognize the
change that is not a "hack"?
--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info: http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]