Importing Word tables into Excel

B

Bonsai Bill

I need to import a Word table, and its continuation, into Excel. The table is
tab delimited so cutting and pasting would be fine. I can clean it up
afterwards before using the data. In trying to impliment past postings on
this site I found that the table has vertically merged cells (generates error
5991). The other problem is that it is called "Table 6" but there are many
unnumbered tables in the document preceding it.

I can find tables because they have unique text in headings (e.g. Seq.).
Picking up proper code using the Word macro recorder to find table and then
put selected tables onto clipboard didn't work.

Could someone please provide me with sample code to find the tables, put
them onto the clipboard and paste them into Excel? I am using OfficeXP but
users may have later editions, including Office 2007.

All suggestions would be greatly appreciated!
 
B

Bonsai Bill

Thanks for your input. The site gives a manual way to import files.

I was not completely clear in my original statement. I need to import the
Word data onto a scratch sheet then extract only the columns of data needed
and put those onto another sheet and make calculations, all using VBA. I
would like to set it up so that user is requested to give only the path to
Word file (which I can do) and then see final results. My problem is that I
don't know enough Word VBA coding to
1) use find command to get to the table
2) select the table contents
3) place selected data on clipboard (although I found how to do that from
Help I think)
4) place contents on scratch sheet (I assume that paste can be used but are
there possible problems with that?)

Example code for doing these steps would be greatly appriciated.
 
B

Bonsai Bill

Thanks for the lead. It was of some help but knowing about the site was
probably the most valuable!

After working more with code and file I determined that the table wasn't a
table after all, just tabbed text which became obvious when seeing formatting
codes in Word.

Thanks again for your help.
 

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