Can I have a macro to apply a user-defined format?
If I record a macro, it records what appears to be an index into the list of formats:
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "NumberFormatValue"
args1(0).Value = 117
dispatcher.executeDispatch(document, ".uno:NumberFormatValue", "", 0, args1())
If I run the macro in another spreadsheet, it does not work, as the user-defined format is not there. Note that I’d like to have macros for many formats, often on the fly, and using formulas is not a solution.