Cedric Bosdonnat wrote: > Hi Christoph, Oliver, > > Christoph Neumann a écrit : > >> The property is "MacroExecutionMode": >> >> PropertyValue[] DocArgs = new PropertyValue[1]; >> PropertyValue DocArg = new PropertyValue(); >> DocArg.Name = "MacroExecutionMode"; >> DocArg.Value = new Short( >> com.sun.star.document.MacroExecMode.ALWAYS_EXECUTE_NO_WARN); >> DocArgs[0] = DocArg; >> >> >> so you can: >> >> loadComponentFromURL(DocURL, "MyDoc", "_blank", DocArgs); > > I'm already using it: the macro first opens a Basic dialog and then > changes the value of some User TextFields. The Basic dialog is correctly > shown and I can trace the macro. But the ThisComponent.getTextFields() > returns no field at all instead of 4 or 5 contained in the document. > > I'm currently using the MacroExecMode.USE_CONFIG value, I'll try with > ALWAYS_EXECUTE_NO_WARN to see if it changes something. Unfortunately the execution of global macros currently is prevented by the "UpdateDocMode" parameter. I think that needs some reconsideration but for now we have to live with it. So either provide this parameter or put your macro into the template.
Ciao, Mathias -- Mathias Bauer - OpenOffice.org Application Framework Project Lead Please reply to the list only, [EMAIL PROTECTED] is a spam sink. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
