Manipulating filenames to be stored in an Access table

L

Leonard Priestley

I want to convert emails to text files, place them in a database, and then
operate on the filenames to sort and parse them. The end result will
hopefully be that I can pick up some of the converted emails and embody them
in reports or resource material for meetings.

I have a copy of Mailbag Assistant, which can convert a batch of emails to
individual text files, but I don't know how to then pick up the filenames as
strings in order to work with them. I would appreciate a push in th right
direction.

Leonard Priestley
 
R

RDub

Search Help for the built in VBA command DIR. Here is an outline (air code)
of how to use it to get all of the filenames in one directory.

Filename = Dir("c:\Path\Where your files are\*.*")
Do While Len(Filename) > 0
Debug.print Filename
Filename = Dir
Loop

If you need to find files in subdirectories do a Google search on recursion
and Dir. If you need to search through an entire hard drive worth of
filenames you might want to consider using the Windows API FindFirst,
FindNext which requires lots more code, but is much faster.

Rdub
 
L

Leonard Priestley

Thank you, Bonnie. I need to have a play with that but it looks as if it
will help to get me where I want to be.

Leonard Priestley
 

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