Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hallo,
I need a script to select a FIle ( not a directory ).
If I use BrowseForFolder with the option to consider files too, it works for folder, and it displays files.
But it doesn't work if I select a file.
How can I select a file browsing for file system ?
This is the script I found searching in qlikview forum that doesn't work for file.
' SCRIPT TO BROWSE THE FOLDER AND SELECT THE FILE NAME
Sub BrowseFolder
Const OverWrite = True
Dim destpath, srcFiles, vpfname
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.BrowseForFolder(0, "Select File", 16384,"Computer")
If objFolder Is Nothing Then
Wscript.Quit
End If
ActiveDocument.Variables("vFileName").SetContent objFolder.title, true
ActiveDocument.Variables("vFolderName").SetContent objFolder.self.path, true
MsgBox "folder: " & objFolder.title & " Path: " & objFolder.self.path
ActiveDocument.Fields("FILENAME").Select objFolder.title
End Sub
Can you help me ?
Thank you.
Hi,
Can you ellaborate a little bit on what you're trying to achieve?
What would you like to do with a file that you select?
How do you know what file you want to select, etc.?
I want to open another qlikview document directly from main document user opens. I want user browses from file system to find the '.qvd' document he wants to open.