> I had no idea OOo used to be a browser. Learned something new today -- > thanks! :-D
Well, strictly, it was StarOffice, OOo's ancestor - IIRC, we already abandoned the idea of being a browser when we went open source. > I don't have the first clue how to write a macro. I want the path to be > stored in a data field so I can have a form where you click a button and > the selected file opens. I already have a macro for the "open the file" > button that SKS posted somewhere. But I don't know how to get the path in > there in the first place, aside from cutting and pasting it from the File > Selection control, I think something like doing a "setPath" on the file picker object, with the argument being something like "form.getByName( <file_control_name> ).Text" should do. >> Even then, however, the control lacks desirable features such as >> specifying the list of extensions which it should browse for, >> auto-completion, and the like. > > Since the "open file" macro I snagged specifies the program the file needs > to be opened with, this is a problem, since it could be a graphic, PDF or > even an OOo doc. I guess I need to look some more and try to find a macro > that doesn't specify a program, but uses the system default for the file > extension. This sounds as if your dialog browser for executables, in which case it is probably perfectly okay to not have a filter at all. What I was thinking about was a file selection control which should offer to browse, for instance, for *.pdf files only, or something like this. In this case, you would want to specify this "*.pdf" as the property of the file control, so the file picker then would show PDF files only. Ciao Frank -- - Frank Schönheit, Software Engineer [EMAIL PROTECTED] - - Sun Microsystems http://www.sun.com/staroffice - - OpenOffice.org Base http://dba.openoffice.org - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
