I had a very nice macro assigned to a toolbar-button to open my OO-basic macro 'Module1' in 1 click.
Now after updating OO 2.4 to 3.0.1 it doesn't work anymore
It opens the macro editor, but not Module1.
Does anyone know why?
Code: Select all
sub sOpenMacroEditor 'Assigned to a button to speed up opening the macro editor in this code.
'to assign it to a button: ooCalc/Tools/Customize/ToolBars/Add.../OpenOffice.org Macros/ThisFilename/Standard/Module1/sOpenMacroEditor/Add
dim aOptions(5) as New com.sun.star.beans.PropertyValue
aOptions(0).Name="LibName": aOptions(0).Value="Standard" 'Name of library
aOptions(1).Name="Name": aOptions(1).Value="Module1" 'Name from Module or Dialog
aOptions(2).Name="Line": aOptions(2).Value=440 'Linenumber to set the cursor. NOTE: I which I could go to the last cursor or a marker...
aOptions(3).Name="Type": aOptions(3).Value="Module" 'Module or Dialog
aTemp=split(ConvertFromURL(ThisComponent.GetURL),"\")
aTemp=split(aTemp(uBound(aTemp)),".") 'Get filename
aOptions(4).Name="Document": aOptions(4).Value=aTemp(0) 'Name of the document = filename without extention
oFrame = CreateUnoService("com.sun.star.frame.Frame")
oDispatchHelper = createUnoService("com.sun.star.frame.DispatchHelper")
oTemp = oDispatchHelper.ExecuteDispatch(oFrame, ".uno:BasicIDEAppear" ,"" ,0 ,aOptions())
end sub