Dim objShell, success, i, t
cnt = 0

Set objShell = CreateObject("WScript.Shell")

directory = inputbox("Enter Directory")

' -- Open Notepad & wait until is active
objShell.Run "notepad"
Do Until Success = True
    Success = objShell.AppActivate("Notepad")
    Wscript.Sleep 100
Loop

Set fso  = CreateObject("Scripting.FileSystemObject")
Set Fldr = fso.GetFolder(directory)

' -- Get all files in the folder and put them on array
For Each File In Fldr.Files
   cnt = cnt + 1
   Redim Preserve arFiles(cnt)
   Set arFiles(cnt) = File
next

' -- Output the array
For i = 1 to cnt
   objShell.SendKeys arFiles(i)
   objShell.SendKeys "{ENTER}"
Next
