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. ...


Noting Table Rows Containing a Character

If you want to have Word highlight rows in a table that contain a certain character, you need to resort to using a macro. ...

Discover More

Determining the Name of the Day of the Week

What day of the week is that date? Sheets can let you know by using the TEXT function to return a weekday name for a ...

Discover More

Inserting a Cross-Reference to an Item in a List

When you create a list using the SEQ field, you may want to create a cross-reference to an item in that field. You can do ...

Discover More

The First and Last Word on Word! Bestselling For Dummies author Dan Gookin puts his usual fun and friendly candor back to work to show you how to navigate Word 2013. Spend more time working and less time trying to figure it all out! Check out Word 2013 For Dummies today!

More WordTips (ribbon)

Keep Your Headings in View

Headings on a table are very important when it comes to understanding what is in the table. This tip explains an easy way ...

Discover More

Picking a Contiguous Range of Table Cells

Creating a table in Word is a relatively simple task. When you want to format or edit information in the table, often the ...

Discover More

Noting Table Rows Containing a Character

If you want to have Word highlight rows in a table that contain a certain character, you need to resort to using a macro. ...

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 two less than 6?

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.