This worked for me in VBA in MS Word--dunno if that helps you though. InputDirectory is a public variable (i.e. "c:\"

.
Sub GetInputFileNames()
Dim FName As String
Dim FType As String
FType = "*.doc"
FName = Dir(InputDirectory & FType)
Do Until FName = ""
I = I + 1
ReDim Preserve FNames(1 To I)
FNames(I) = FName
FName = Dir
Loop
FNamesSize = UBound(FNames)
End Sub