Ever since Star Office 9 I have been using Macros that have this code or identical ones with the Symbols changed:
Sub OpenDJIA_History
rem define variables
Dim Doc As Object
Dim File As String
Dim URL As String
rem get access to the document
File = "C:\Users\Doug & Dolores\Dropbox\Fund Data\39Wk Avgs\DJIA History"
URL = ConvertToURL( File + ".ods" )
Doc = StarDesktop.loadComponentFromURL(URL, "_default", 0, Array() )
End Sub
Now all of the sudden when stepping through or running this Macro sub routine I get the following Error Message:
BASIC runtime error.
An exception occurred
Type: com.sun.star.lang.IllegalArgumentExceptionMessage: Unsupported URL
<file:///C:/Users/Doug%20&%20Dolores/Dropbox/Fund%20Data/39Wk%20Avgs/DJIA%20History.ods>: "type detection failed".
Any idea what has happend or how to correct the “loadComponentFromURL” code?