macro
New in version 0.11.11.
basic sub-package
Contents
- class ooodev.macro.MacroLoader[source]
Context Manager for Macro execution
New in version 0.11.11.
- __init__()[source]
Context Manager for Macro execution
This context manager is used in a running instance of office.
The context manager can be overridden to return the current loader (
Lo.loader_current
) of the Lo class. To override the context manager, set the environment variableODEV_MACRO_LOADER_OVERRIDE
to1
. Overriding is useful for testing, debugging and when you want to run a macro script outside of a running instance of office.Example
from ooodev.macro.macro_loader import MacroLoader def show_tab_dialog(*args, **kwargs): with MacroLoader(): dlg = MultiSyntaxController(model=MultiSyntaxModel(), view=MultiSyntaxView()) dlg.start()
New in version 0.11.11.
Changed in version 0.11.14: Added override functionality