----------------------------------------
The way to transfer the arguments to the BasicIDEAppear service seem to have changed. Especially the document name
needs to be given in a differen way, than it was before.
Following is the correct code, verified with LibreOffice Writer 4.3.5.2 the currently stable Version from http://www.libreoffice.org
Code: Select all
dim aArgs(5) as New com.sun.star.beans.PropertyValue
aArgs(0).Name="Document": aArgs(0).Value=ThisComponent.GetURL
aArgs(1).Name="LibName": aArgs(1).Value="Standard"
aArgs(2).Name="Name": aArgs(2).Value="Module1"
aArgs(3).Name="Line": aArgs(3).Value=10
aArgs(4).Name="Type": aArgs(4).Value="Module" 'may be Dialog or Module
oFrame = CreateUnoService("com.sun.star.frame.Frame")
oDispatchHelper = createUnoService("com.sun.star.frame.DispatchHelper")
oTemp = oDispatchHelper.ExecuteDispatch(oFrame, ".uno:BasicIDEAppear" ,"" ,0 ,aArgs())position the blinking cursor in line #10 to start editing there. Just that there is no misunderstanding: "The order
of the PropertyValues in the array do not make a difference." Following is an attachment document to
demonstrate this solution. Thanks alot, to all envolved!
P.S. I leave the other tipps in here for further reading.
----------------------------------------
Reading the answers, following is my conclusion:
The correct command to open up the IDE seems to be the following
Code: Select all
oTemp = oDispatchHelper.ExecuteDispatch(oFrame, ".uno:BasicIDEAppear" ,"" ,0 ,aOptions())There is a workaround to generate an error in a subroutine inside of the module to open, which opens the IDE
and a message box with an errormessage. The following code is an example for that.
Code: Select all
Sub OpenIDE
thisComponent.makeError
End SubThanks for you help!