Never mind VBA. Use a series of queries to get where you want to go.
Step 1) open the Query Designer and add the static text file. Close the dialog box. Double-click on the star (*) in the top of the field list to select all fields, and then add a new field to the QBE grid, called perhaps TestStr, as follows:
Code:
TestString: left(<static file>.<string name>,4) + mid(<static file>.<string name>,17,32)
Save the query as perhaps qryTSSub.
2) now do the exact same thing with the input text file, in a new query. Select * and then add a new field with the same info as before, but replacing the file name as appropriate. Save the query as perhaps qryITSub.
3) make a 3rd query. In the "Queries" tab of the input dialog box, select first the qryTSSub and then the qryITSub. Join the two new fields with an inner join.
Before you do anything else, run the query to make sure it gives you the correct results. Assuming it does,
4) make that 3rd query into a make-table (or append, as appropriate) query. If the select query yields incorrect results, you'll need to do some troubleshooting before changing the query type.
Good luck,
Sam