Such as, the file types/extensions (*.jpg, *.png etc) that would be available as filters. ![]() Formatting the Dialogīefore opening the file picker dialog, we need to provide some informations for the dialog. The object ucb a.k.a Universal Content Broker provides a way to access various contents via UCP (Universal Content Providers). Ucb = createUnoService(".SimpleFileAccess") ("Tools")įile_dialog = CreateUnoService(".dialogs.FilePicker") These two service will provide necessary handles to open a file selection dialog.ĭeclare and create two objects to these services. To open a file selection dialog, use FilePicker service of module .dialogs and SimpleFileAccess service of module. ' open file picker dialog here and return the path of the chosen file Lets define a function which can be used from any macro to open a file picker dialog. ![]() opening an OpenOffice, LibreOffice workbook, importing a text/csv file etc. ![]() This tutorial will show how to open a file selection dialog in LibreOffice, OpenOffice using Macro.įile selection dialog is used to select single/multiple file(s) in various automation activities e.g.
0 Comments
Leave a Reply. |