IBM Lotus Symphony
|
Opretter en forekomst af en UNO-service i ProcessServiceManager.
oService = CreateUnoService( UNO-servicenavn )
oIntrospection = CreateUnoService( "com.sun.star.beans.Introspection" )
Følgende kode bruger en service til at åbne en filåbningsdialogboks:
Sub Main
fName = FileOpenDialog ("Vælg en fil")
print "valgt fil: "+fName
End Sub
function FileOpenDialog(titel as String) as String
filepicker = createUnoService("com.sun.star.ui.dialogs.FilePicker")
filepicker.Title = titel
filepicker.execute()
filer = filepicker.getFiles()
FileOpenDialog=filer(0)
End function