Additionally, I've noticed that if I open the ftp file directly by typing it in the URL box (in 1.1.4) the document will open read/write, but with 1.9.100 it opens readonly, which says to me that either some program setting is different (and I haven't found one which controls this, like a security setting or something like that) or the program has changed.
thanks again,
Matthew L. Avizinis


Hello,
I am writing a macro in which I open other Writer text documents via ftp either in a new frame or same frame as the currently open document. I am using beta 1.9.100. I am using currently loadComponentFromURL() and there are problems with opening the new document in read/write mode, that is they tend to open read only (btw, this wasn't an issue in 1.1.4 and it has been suggested to me the perhaps it is now due to permissions issues that are not addressed in the macro. Also I did not rewrite the macro much for the new beta except to clean up a couple lines that do things that are apparently fixed in the new version). My question is, what, if any, methods are there to load/open files other than with loadComponentFromURL()? And, if so, please give me example code, if possible. I have looked through the SDK1.1 and haven't seen anything, but there is so much material and there really isn't a good search mechanism to go through it all and maybe I've missed something.


Here is the function code snippet edited for brevity:

Sub navigateToTargetQuestion ()
If ((nextType = TYPE_QUESTION) OR (nextType = TYPE_FACT_PATTERN)) Then
' need to add error checking for invalid questions
Dim remoteBeforeUserName as String
Dim targetURL as String
Dim Doc as Object
Dim Dummy()
' save the current question before navigating to a new question
saveCurrentQuestion()
'show the URL of the target question for debug-only purposes
MsgBox "targetURL: " + Chr(13) + getOOURL(targetQuestion)


' open the question (hopefully, in read/write mode)
' format of URL ftp://username:[EMAIL PROTECTED]/path-to-file
Doc = StarDesktop.loadComponentFromURL(getOOURL(targetQuestion), "gleimFrame", com.sun.star.frame.FrameSearchFlag.GLOBAL, Dummy())
If IsNull(Doc) Then
'display various errors
MsgBox "Something is wrong"
End If
End If 'currentType = (question or fact pattern)
End Sub 'navigateToQuestion


Secondly and secondarily, if I create new regular Writer text documents with a new extension, e.g. filename.gleim, how do I set up the association within Oo such that whenever a file with that extension is opened it will be recognized as of type .odt?

Help is appreciated.
Matthew L. Avizinis <mailto:[EMAIL PROTECTED]>
Gleim Publications, Inc. <http://www.gleim.com>



Reply via email to