My macro has
Dim mArgs(3) as New com.sun.star.beans.PropertyValue
…
mArgs(0).Name = “ReadOnly”
mArgs(0).Value = False
mArgs(1).Name = “MacroExecutionMode”
mArgs(1).Value = 4
mArgs(2).Name = “AsTemplate”
mArgs(2).Value = False
mArgs(3).Name = “Hidden”
mArgs(3).Value = False
…
oDoc = StarDesktop.LoadComponentFromUrl(sInitUrl, “MyName”, 0, mArgs())
That last line keeps giving me:
BASIC runtime error.
An exception occurred
Type: com.sun.star.lang.IllegalArgumentException
Message: Unsupported URL <file:///L:/QMS%20Documents/Working/(QF)%20Management%20Review.odt>: “type detection failed”.
I’ve verified that the URL exists. L: is a mapped drive. The %20’s are spaces. The URL was generated by the FilePicker (“com.sun.star.ui.dialogs.FilePicker”)
Is there a better way to go about this?