To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=79852
User cd changed the following: What |Old value |New value ================================================================================ Assigned to|cd |cbrunet -------------------------------------------------------------------------------- Status|STARTED |NEW -------------------------------------------------------------------------------- Target milestone|OOo 2.4 |--- -------------------------------------------------------------------------------- ------- Additional comments from [EMAIL PROTECTED] Wed Dec 5 12:32:54 +0000 2007 ------- cd->cbrunet: It's not a bug but a feature. You have to provide more information to loadComponentFromURL to enable the execution of macros. The default handling of loadComponentFromURL disables the execution of macros for the loaded document. As your add-on uses a Basic macro that's exactly your problem. The following Basic script provides the needed information to enable macro execution. Your example works with a "Medium" macro security with my Office. REM ***** BASIC ***** Sub Main Dim oDoc Dim sPath$ Dim a(2) As New com.sun.star.beans.PropertyValue a(0).Name = "AsTemplate" a(0).Value = true a(1).Name = "MacroExecutionMode" a(1).Value = com.sun.star.document.MacroExecMode.USE_CONFIG a(2).Name = "InteractionHandler" a(2).Value = CreateUnoService( "com.sun.star.task.InteractionHandler" ) sPath$ = "file:///D:/DocTemplate.ott" oDoc = StarDesktop.LoadComponentFromUrl(sPath$, "_blank" , 0, a()) End Sub We recommend to use the dispatch API to load documents. The dispatch API is used by the menu and toolbar functions which guarantees that it provides the "right" properties to loadComponentFromURL. --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]