How to use .uno dispatch for macros?


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?

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.

See arguments