Try removing the "On Error Resume Next" statement and the problem should be pretty apparent.
It seems you are making it more difficult than it is though. That script you copied was meant to be used in a VBS file, while VBA in Access is much more robust. You'll really want to use something like the following:
TransferText Method
Regards,
Ax