I have to loop through Word documents in a directory -
the documents all have a name that is five digits, with a three digit extension. The extension can be 001, 002, 003, etc. (Not the .doc extension, but a three digit addition to the name of the document)
For example, right now I am using:
oapp.Selection.InsertFile "C:\" & Batch & "001.doc" - batch being a variable that I get from a recordset.
I need to grab the document with the highest number extension for each batch number. Think I can do this? Any ideas?
Any help is appreciated.
Thanks.
the documents all have a name that is five digits, with a three digit extension. The extension can be 001, 002, 003, etc. (Not the .doc extension, but a three digit addition to the name of the document)
For example, right now I am using:
oapp.Selection.InsertFile "C:\" & Batch & "001.doc" - batch being a variable that I get from a recordset.
I need to grab the document with the highest number extension for each batch number. Think I can do this? Any ideas?
Any help is appreciated.
Thanks.