Hi Cor,
thank you for your macros.
However, your "FolderPicker" does *not* work either!
(The FilePicker works as reported in my e-mail. It is quite easy to
mix-up "FolderPicker" and "FilePicker".)
not sure whether this is the correct group, if not please advise
which one would be the correct one.
This is the right one.
Good to know, thank you!
Platform is Windows XP SP 3.
The "FolderPicker" service interface "XFolderPicker" has a method
"setDisplayDirectory()" which is supposed to do the following
according to the docs: "Sets the root directory that the FolderPicker
should display. It is not specified which root directory the
FolderPicker chooses if the specified root directory doesn't exist. "
However, this does not work at all. Tried all variations (system file
path, URL, with and without trailing slash, feeding the directory
path exactly like the service returns it).
Actually, using "setDisplayDirectory()" works, as a
"getDisplayDirectory()" thereafter will return the set directory.
However, the dialog does not pick that directory but displays the root.
It should work. Try this one any does for me (mind that lines might
have been broken in the mail):
Yes "FilePicker" works, but "FolderPicker" does not, it seems!
... cut ...
[...]
P.S.: The FilePicker works (including preselecting a directory), but
for the purpose of the application only a directory should be picked,
not a file (the directory could be empty!).
For that purpose, you could use the following:
Function PickMyFolderName (sDocPath$, sFileName$, sTitle$) as String
Dim oFolderPickerDlg
oFolderPickerDlg = createUnoService(
"com.sun.star.ui.dialogs.FolderPicker" )
oFolderPickerDlg.setTitle(sTitle)
If Len(sDocPath) > 0 Then oFolderPickerDlg.SetDisplayDirectory
(ConvertToURL(sDocPath))
If oFolderPickerDlg.execute() > 0 Then
PickMyFolderName = oFolderPickerDlg.getDirectory
End If
End Function
Just copy and pasted your example and ran it (the argument "sFileName$"
would not be necessary for that particular function).
In my case (Windows XP SP3) the dialog comes up, but does not position
on the set directory!
Regards,
---rony
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]