Using standard dialog to choose directory [closed]
I know it's possible to get a fuul file path using standard file dialog but how to get a directory path?
TY for your help
First time here? Check out the FAQ!
I know it's possible to get a fuul file path using standard file dialog but how to get a directory path?
TY for your help
Hello @cedlemaitre,
to get a directory path, you could use the System FolderPicker and pass its result to ConvertFromURL():
Function selectFolder(strTitle as String, strInitPath as String) as String
REM Opens the FolderPicker dialog and returns the URL of the selected Folder.
Dim oFolderPicker : oFolderPicker = CreateUnoService( "com.sun.star.ui.dialogs.FolderPicker" )
oFolderPicker.setTitle( strTitle )
oFolderPicker.setDisplayDirectory( strInitPath )
If oFolderPicker.execute() = 1 Then selectFolder = oFolderPicker.getDirectory()
End Function
'strPath = ConvertFromURL( selectFolder( "TITLE", "" ) )
Asked: 2017-11-21 10:50:32 +0100
Seen: 627 times
Last updated: Nov 21 '17
How do I export a chart in an image format from LibreOffice Calc? [closed]
Are there plans for a "papercut" project for libreoffice [closed]
Is it normal for Calc goal seek to take very long? [closed]
Please refine "Search" in Calc - implement functions in Gnumeric [closed]
LibreOffice Calc will not link to external data via internet [closed]
Is there a LibreOffice .odt, .ods viewer for Android? [closed]
Why is Calc so much slower at opening/saving files than MS-Office? (win7 x64) [closed]