Mathias Bauer wrote:
Tam wrote:
sub Letterhead
dim mProps(0) as new com.sun.star.beans.PropertyValue
mProps(0).Name = "AsTemplate"
mProps(0).Value = true
oDesk = createUNOService("com.sun.star.frame.Desktop")
oDesk.loadComponentFromUrl("D:\OOo_Templates\Letterhead.odt","_blank",
0, mProps()
end sub
I admit I don't know what any of this means -- I further admit that I
don't *want* to know what any of this means. I just want to hit my
keys and write my letter. :-)
After some niggling, the final error message I get is that the URL
seems to be an unsupported one. It occurs to me that I'm using
OOo-Dev 2.0 -- I guess there might have been some changes since 2001? :-)
Could some kind soul please tell me what's wrong?
The message says it all: the URL is unsupported, mainly because it isn't
a URL at all. Don't use system file names, you have to provide a valid
URL: "file:///d:/OOo_Templates/Letterhead.odt" should work for you.
Best regards,
Mathias
Hi, Mathias -- I tried that and it still isn't working. I *can* put
"file:///d:/OOo_Templates/" in a browser and get a list of the
templates in that directory, but this line in the macro:
oDesk.loadComponentFromUrl("file:///d:/OOo_Templates/Letterhead.odt","_blank",
0, mProps()
leads to this error message:
BASIC runtime error.
An exception occurred
Type: com.sun.star.lang.IllegalArgumentException
Message: URL seems to be an unsupported one..
Sorry. :-)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]