Copy table column from multiple word files into excel

M

ml_thompson

I have hundreds of word files in a folder. Each file contains a table with
two columns. I want to copy the right most column from each word file into 1
excel worksheet, but opening each word file individually and copy/pasting
will take me forever. Does anyone have code the will open each file in the
folder, copy the column and past it into the next availble column in an excel
worksheet?

Thanks,
ml
 
J

Jonathan West

ml_thompson said:
I have hundreds of word files in a folder. Each file contains a table with
two columns. I want to copy the right most column from each word file
into 1
excel worksheet, but opening each word file individually and copy/pasting
will take me forever. Does anyone have code the will open each file in
the
folder, copy the column and past it into the next availble column in an
excel
worksheet?

Thanks,
ml

You can probably adapt the code in this article

Find & ReplaceAll on a batch of documents in the same folder
http://www.word.mvps.org/FAQs/MacrosVBA/BatchFR.htm

Instead of the find-replace code in the innermost part of the loop, put in
your copy-column-and-paste-to-Excel code.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 

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