Copying All Tables to a New Document

by Allen Wyatt
(last updated September 5, 2019)


Tables are a great way to present many types of information. In fact, I've seen some documents that consist almost entirely of tables. If you do a lot of work with tables, you may (at some point) want to copy all the tables from one document to a brand new document. This could be helpful if you have tabular information that needs to be available in the new document, but you don't need the rest of the information from the original document.

The easiest way to do this type of copying is by using a macro. Fortunately, all the tables in a document are made available to VBA through the Tables collection. That means you can step through each item in the collection (each item will be an individual table) and then copy it.

Sub CopyTables()
    Dim Source As Document
    Dim Target As Document
    Dim tbl As Table
    Dim tr As Range

    Set Source = ActiveDocument
    Set Target = Documents.Add

    For Each tbl In Source.Tables
        Set tr = Target.Range
        tr.Collapse wdCollapseEnd
        tr.FormattedText = tbl.Range.FormattedText
        tr.Collapse wdCollapseEnd
        tr.Text = vbCrLf
End Sub

The macro, once run, creates a brand new document (Target) and copies the tables from the original document (Source) into the new one. (The source document is whatever document was active when you ran the macro.) The macro places a blank line between each table in the Target document. If you don't want the blank line, then remove or comment out the line just before the Next statement.


If you would like to know how to use the macros described on this page (or on any other page on the WordTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (13338) applies to Microsoft Word 2007, 2010, and 2013.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...


Turning Off Automatic Numbered Lists

Type what Word thinks is a numbered list, and it will helpfully format the text to match what it thinks your numbered ...

Discover More

Printing More Than One Copy

Need to print more than a single copy of a worksheet? You can do it easily by using the controls in the Print dialog box.

Discover More

Removing Return Addresses

Word allows you to print return addresses on your envelopes. You may run across a scenario where the return address is ...

Discover More

Learning Made Easy! Quickly teach yourself how to format, publish, and share your content using Word 2013. With Step by Step, you set the pace, building and practicing the skills you need, just when you need them! Check out Microsoft Word 2013 Step by Step today!

More WordTips (ribbon)

Formatting an ASCII Table with Spaces

When you get a text file from a program other than Word, tabular information may be formatted with nothing but spaces in ...

Discover More

Jumping to the Ends of Table Rows

Need to jump from one end of a table row to another? Word provides a couple of handy shortcuts that can make this type of ...

Discover More

Blank Page Printing after Table at End of Document

When you print, do you get an extra blank page printed at the end of the document? It could be because of the final ...

Discover More

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.


If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 6 - 4?

2017-11-22 06:16:16


I want to copy a table from a word document into a sheet as follow:
each new line in the word should be copy to the new line in the sheet, but
if any cell in the word line contains ^p (paragraph mark) then 2 new lines should be added.


2016-03-02 17:07:10


Thanks for the help. It saved me a lot of time.

2016-01-28 04:49:55


Hello Allen

This macro is really helping me with a report I need to do for a project. The report consists of tables and associated sales text and is given to a customer.

Afterwards the tables will be used by another department who do not need the text so this helps me give them just that.

However is there an amendment i can make to change the target from a new blank word document to an existing world file (which would have a title and formatting in place).

I have tried replacing 'Documents.Add' with 'tmpName = ActiveDocument.AttachedTemplate.FullName
Documents.Add Template:=tmpName, NewTemplate:=True' but I don't think I am adding it in correctly are you able to explain how I could add this function?

Many Thanks

2014-12-16 23:41:12

Ram Ashish

Hello Allen

It is very useful macro but it copying tables only.It will be great if it copying table title and note and source.

thanks and regards
Ram Ashish

2014-12-15 09:05:33

Philip Ulanowsky

Hello, Allen, and Christmas greetings to you and your family.

I really like the idea of copying all the tables to another document. In my proposal work, I sometimes end up copying tables from a source document, into which someone has just cut-and- pasted them from who knows where; placing them in a black doc for style stripping (Clear all, Ctrl w/space and Q, and Alt+Ctrl_u); then pasting them into the target and applying a custom table style.

As you know, Word tables, especially very long ones, can carry with them all (and can even disable application of custom styles from the QAT, as occasionally happens to me, sometimes even after stripping; who knows where Word's coding hides the key to that little gremlin!).

Your macro would be additionally useful, therefore, if, after copying all the tables to a new document, it would perform the stripping operations. This could be, perhaps, a separate macro, but a one-shot sweep would be great.

Best wishes,

This Site

Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.

Newest Tips

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.