Try the following code. You can save the file names in an array in order to save the names to process afterwards:

 
Dim fso As New Scripting.FileSystemObject 
Dim fld As Folder 
Dim fil As File 
Dim sFileNames() As String
Dim lCntr as Long
 
lCntr = 1
Set fld = fso.GetFolder("C:\Temp") 
For Each fil In fld.Files 
     Redim Preserve sFileNames(lCntr)
     sFileNames(lcntr) = fil.name
     lCntr = lCntr + 1
Next 
 
Set fil = Nothing 
Set fld = Nothing 
Set fso = Nothing
You will need to add a reference to the Scripting library in MS Project, Microsoft Scripting Runtime, which is file C:\WINDOWS\system32\scrrun.dll.