Setting the focus to a dialog invoked by a WSH script
I invoke a dialog to select some files as follows:
Set fso = CreateObject("Scripting.FileSystemObject")
Set objWord = CreateObject("Word.Application")
Set WshShell = CreateObject("WScript.Shell")
.Title = "Select the files to process...."
.AllowMultiSelect = True
'Show only the desired file types
.Filters.Add "All Files", "*.rtf"
(... stuff happens....)*
But the dialog is often obscured by open folder windows, such as that containing the script I launch. How can I ensure that the dialog for selecting files will appear in the foreground?
Sign in to comment