Combining tables from within a document and across multiple docs.

R

Ruby Tuesday

I have about 100 doc files. Each word doc file has at least 1 table(at most
3 tables) and some text outside the table(don't care about this).

All the table has 5 cols and varied number of rows. The widht of the table
is not consistant, some larger and some smaller but all has 5 columns.

How do I combine those tables in a file using scripts?

Thanks
 
D

Doug Robbins - Word MVP - DELETE UPPERCASE CHARACT

To learn how to access all of the files in a directory, see the article
“Find & ReplaceAll on a batch of documents in the same folder” at:

http://word.mvps.org/FAQs/MacrosVBA/BatchFR.htm

I think I would dim a range object, set a range to the .Range of each table
in each document, convert that range to text, then use InsertAfter to Insert
it after the .Range of a new document. After you have all of the tables
converted to text in that new document, I would select everything and
convert it back to a table. That should work around the problem of the
differing table widths

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
 
R

Ruby Tuesday

Hi Doug, thanks for the prompt reply.
I think I would dim a range object, set a range to the .Range of each table
in each document, convert that range to text, then use InsertAfter to Insert
it after the .Range of a new document. After you have all of the tables
converted to text in that new document, I would select everything and
convert it back to a table. That should work around the problem of the
differing table widths

Forgive my little knowledge of VBA, can we just tell VBA to grab all tables
in all files and merge them together?

Thanks



"Doug Robbins - Word MVP - DELETE UPPERCASE CHARACTERS FROM EMAIL ADDRESS"
 
D

Doug Robbins - Word MVP - DELETE UPPERCASE CHARACT

That is basically what I am suggesting. However, you must use the correct
syntax.

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
 
R

Ruby Tuesday

Tow more issues ... one of the column is an image object, and one of other
column contain multi-line text cells. How would you do that in VBA for
automation.

My intention is to combined all into one big word table, then pop them to
either access or any rdbms.

Thanks.

"Doug Robbins - Word MVP - DELETE UPPERCASE CHARACTERS FROM EMAIL ADDRESS"
 

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