Sub and UNO Action combined


Is it possible to combine a Sub and an UNO action together in a macro as from the GUI this does not seem to be an option, thank you

Please give more information about what you are trying to do. Perhaps this is about a dispatcher command such as “.uno:Cut”. To see a subroutine like that, use the macro recorder in Writer. That is not currently possible in Base, so use the recorded code from Writer in your Base database. Or better yet, look up an example online.

Hi, I have some forms containing multiple table controls and some buttons at the top to navigate to other forms. If the user moves from a table control to a button to open another form, a macro will open the requested form without loading any data if the user did not save the latest change in the table control.
Therefor I d like to change the macro to first save the record and then open the new form.
Hope this makes sense, thks


As noted already by @jimk you can lookup a slot on line → Macro to save record

This seems to work as you want:

document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("")
dispatcher.executeDispatch(document, ".uno:RecSave", "", 0, Array())

You may also want to delve into uno commands. See links in this post → I need documentation of oDispatcher.executeDispatch

Make certain the button to run this is on the form where the record is to be updated.

Thank you gentlemen, much appreciated!

Thank you gentlemen!