Hi List:
I am using openoffice 1.9.100.
I used loadComponentFromURL to open a remote file in macro. If I don't
set "ReadOnly" argument, the opened file is readonly by default. If I set
"ReadOnly" as False, I got a error dialog with:
basic runtime error: An excpetion occured.
Type: com.sun.star.lang.IllegalArgumentException
Message: URL seems to be an unsupported one..
The strange thing is, if I set "ReadOnly" as True, nothing happens, but I
don't want the file opened in readonly mode.
Here are related codes
Dim loadArgs(2) as New com.sun.star.beans.PropertyValue
loadArgs(1).Name = "MacroExecutionMode"
loadArgs(1).Value = 4
loadArgs(2).Name = "ReadOnly"
loadArgs(2).Value = False
Doc = StarDesktop.loadComponentFromURL(getOOURL(targetQuestion),
"aFrame", com.sun.star.frame.FrameSearchFlag.GLOBAL, loadArgs())
The runtime error occurred in the last line of above codes.
I googled and found someone had same problem, but didn't see any
solution or why this happened.
How to open a remote file in read/write mode? Any suggestions are welcome:)
Thanks
Wen
--
Wen Shen
Software Development
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]