Find retrieve text from a text file through VBA

A

AccessARS

We have a proprietary system that generates daily processing logs in text
files into a specific folder. These log files have a systematic naming
convention i.e “Test_20080206 LOG.TXTâ€, “Test_20080207 LOG.TXT†depending on
the date. I am building a system in Access/VBA that will search for a line
with a specific error message in the most current log thereafter store that
line item into a table for reporting purposes in Access.

Example of error line in log:
“09:51:37 I Processing stopped by user.â€

I can identify the most recent file and point to the location on a daily
basis in vba but can’t seem to find any solid information on opening,
searching and pulling text from the said log file. I’ve heard that there are
methods for going through a text file line by line but have no clue where to
start. If someone can give me a little direction I should be able to pull
things together from there.
Thank you in advance for your assistance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top