| View previous topic :: View next topic |
| Author |
Message |
PeteS General User

Joined: 12 Feb 2005 Posts: 43
|
Posted: Thu Apr 28, 2005 1:31 pm Post subject: PickFolder Problems |
|
|
Someone wrote the PickFolder function which allows the user to select a directory from a nice tree dialog. The code is as follows (note the cFolder argument):
| Code: |
Function PickFolder( cFolder )
oFolderPickerDlg = createUnoService( "com.sun.star.ui.dialogs.FolderPicker" )
If Len( cFolder ) > 0 Then
oFolderPickerDlg.setDisplayDirectory( ConvertToURL( cFolder ) )
EndIf
oFolderPickerDlg.execute()
cPickedFolder = oFolderPickerDlg.getDirectory()
PickFolder = ConvertFromURL( cPickedFolder )
End Function
|
Here is how I use the function:
| Code: |
Sub SpecifyServerPath
cFolder = PickFolder( "K:\" )
End Sub
|
I can not get it to start from a directory of my choosing. Even though I pass "K:\", it always starts from "My Computer". What am I missing? |
|
| Back to top |
|
 |
probe1 Moderator


Joined: 18 Aug 2004 Posts: 2465 Location: Chonburi Thailand Asia
|
Posted: Thu Apr 28, 2005 2:36 pm Post subject: Re: PickFolder Problems |
|
|
| PeteS wrote: | | Someone wrote the PickFolder function which allows the user to select a directory from a nice tree dialog. |
This code example is from DannyB
http://www.oooforum.org/forum/viewtopic.phtml?t=9797
Posted: Mon Jun 14, 2004 4:43 pm Post subject: Folder Picker and File Picker
wfm.
Your "K:\" is a network drive? connected? Maybe, try a "k:\" (small) or supply the UNC?
Sorry, I'm not running windows _________________ Cheers
Winfried
My Macros
DateTime2 extension: insert date, time or timestamp, formatted to your needs |
|
| Back to top |
|
 |
|