Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Import Multiple word files into excel

Status
Not open for further replies.

VBAnewguy

MIS
Jan 28, 2003
41
0
0
US
Hey guys,

I haven't tried something like this before, was hoping someone could lend some advice.

I have 500+ resumes in a folder that I want to import into a spreadsheet.

Right now I am manually importing each one, then running a macro to parse the data into the correct colums (Col A = name, col b = phone #, etc)

The problem is, importing 500+ word docs manually is going to take forever, there must be a way around this with VBA.

I would like to write a macro that will import all of the docs, then run my script to put the data intot the correct columns

Any advice?

 
oops, meant to mention, the link above was the closest thing I could find by searching, thanks in advance for any advice.
 
I fI understand correct, you HAVE the code for doing whatever it is you want to do within Excel. Correct?

If so, then it all depends on where your files are. If they are well organized, you could use Dir function to go through all the Word docs in a folder. For more powerful functionality, use a FileSystemobject to bring in your files.

Gerry
 
Use Dir function for well organized folders with files.

Use FileSystemObject for mor efunctionality.

Yes, you can automate this.

Gerry
 
Thanks guys,

I have code to import ONE word doc into excel, and I have a macro that reads each line (in the imported document) and parses it correctly.

Do you guys happen to have an example of the Dir function in use? In the meantime I will play around withit, I should be able to figure it out, trial & error usually works for me!

Thanks again for your help on this,
 
In its simplest form:
Code:
Sub DemoDIR()
Dim mFile
mFile = Dir("c:\temp\*.doc")
Do While mFile <> ""
    ' this just displays the name of  each file
    ' ending wiith .doc
    ' replace this with your code to send it to excel
    MsgBox mFile
     ' go to next entry, that is, the next file ending with .doc
    mFile = Dir
Loop
End Sub

Gerry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top