Hello all, I’m new to programming in Basic. I’ve done a fair share in VBA, but I’m not familiar enough with the different functions to replicate what I want in LO.
I’m building a macro in Writer to resize images in a document. The current working macro in VBA uses the “Application.FileDialog(msoFileDialogFolderPicker)” object to allow the user to select the folder where the files to be worked on are stored.
Obviously, you don’t do this the same way in Basic. What is the equivalent?
In the example from the LO help:
Sub ExampleWorkWithAFile
Dim iNumber As Integer
Dim sLine As String
Dim aFile As String
Dim sMsg As String
aFile = "C:\Users\ThisUser\data.txt"
iNumber = Freefile
Open aFile For Output As #iNumber
Print #iNumber, "This is a line of text"
Print #iNumber, "This is another line of text"
Close #iNumber
iNumber = Freefile
Open aFile For Input As iNumber
While Not eof(iNumber)
Line Input #iNumber, sLine
If sLine <>"" Then
sMsg = sMsg & sLine & chr(13)
End If
Wend
Close #iNumber
MsgBox sMsg
End Sub
Where “aFile” is given by a string, I want to define this by having the user navigate to the folder.
Thanks in advance.

