How to use .uno dispatch for macros?

Hi,

I’d like to use a dispatch command in my macro, as there doesn’t seem to be an equivalent functionality in the LOBasic API, but the documentation for the dispatch commands are confusing or non-existent. How can I use these?

https://wiki.documentfoundation.org/Development/DispatchCommands

I’ve tried inserting them, but the macro causes a hang. Specifically I’m interested in the ones that insert form controls. I think it requires additional arguments or something, idk.

I’d really like to be able to insert form controls into a document dynamically, instead of having to do each one by hand.

DispCommands.ods
See arguments