Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

FunctionAccess is for Calc spreadsheet formulas, not for Basic macros.

To call a Basic subroutine, use the dispatcher to execute a macro:/// command.

dispatcher = ctx.ServiceManager.createInstanceWithContext(
    'com.sun.star.frame.DispatchHelper', ctx)
macro_call = ('macro:///Standard.Module1.Macro1("%s")' % url)
dispatcher.executeDispatch(frame, macro_call, "", 0, ())

See my answer at https://stackoverflow.com/a/35777552/5100564 for the complete Python example.