Parse Directory Filenames
Add a Dim arr as Variant, then use split() to get the parts of the
string:
arr = split(f2.name, ",")
Range("A" & i).Value = arr(0)
Range("B" & i).Value = arr(1)
Range("C" & i).Value = arr(2)
If InStr(arr(4), "Ltr") 0 Then
Range("D" & i).Value = "Letter"
ElseIf InStr(arr(4), "Pro") 0 Then
Range("D" & i).Value = "Progress Note"
End If
|