How to fix :“Not Enough Stack Memory” when trying to load() with OfficeDatabaseDocument UNO service

I try to familiarize myself with the usage of Macro and UNO API on LibreOffice Base, i tried to open my .odb file with the UNO OfficeDatabaseDocument (DOC here : LibreOffice: OfficeDatabaseDocument Service Reference ) to play with UNO and learn to use them.

Function MyClubOfficeDatabaseDocument()
  Dim MyClubURL(0) As New
  MyClubURL(0).Name = "Chemin d'accès vers la base de donnée MyClub"
  MyClubURL(0).Value = "/Users/faisalsalhi/Desktop/MyClub/MyClub.odb"

  MyClubOfficeDatabaseDocument = CreateUnoService("")
End Function

I tried to execute this macro inside my odb file.


In past have only used for verification of document type looked at.

A much simpler manner to open a document:

TargetURL = convertToURL(fileLocation)
TestDoc = StarDesktop.loadComponentFromURL(TargetURL, "_blank", 0, Array())

where fileLocation is your file such as:

fileLocation = "/Users/faisalsalhi/Desktop/MyClub/MyClub.odb"