Preventing a Frame when Converting a Table to Text

Written by Allen Wyatt (last updated November 7, 2022)
This tip applies to Word 2007, 2010, 2013, and 2016


4

When Peg has a table with the text wrapping set for Around, and then she converts the table to text, that text ends up being in a frame. She doesn't want it in a frame; she just wants it as plain, in-line with text. Peg wonders if there is a setting to prevent the converted table from ending up in a frame.

There is no setting that controls this behavior. Word does it because it doesn't know where to put the table text relative to the regular document text, so it places it in a frame. The only way around this manually is to change the text wrapping so that the table is inline, and then do the conversion to text. You could automate this a bit by using a simple macro:

Sub ConvertTable1()
    If Selection.Information(wdWithInTable) Then
        Selection.Tables(1).Rows.WrapAroundText = False
        Selection.Rows.ConvertToText Separator:=wdSeparateByTabs, _
          NestedTables:= True
    Else
        MsgBox "Insertion point must be in a table."
    End If
End Sub

Of course, if you choose to go the "macro route," you could use the macro to convert the table to text (which would place it in a frame) and then delete the frame. Here's the way to do that:

Sub ConvertTable2()
    If Selection.Information(wdWithInTable) Then
        Selection.Rows.ConvertToText Separator:=wdSeparateByTabs, _
          NestedTables:= True
        ActiveDocument.Frames.Delete
    Else
        MsgBox "Insertion point must be in a table."
    End If
End Sub

Either macro produces the same result. All you need to do is make sure the insertion point is within the table and then run the macro.

Note:

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 (2358) applies to Microsoft Word 2007, 2010, 2013, and 2016.

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

MORE FROM ALLEN

Getting User Input in a Dialog Box

Want to grab some interactive input from a user in your macro? The best way to do that is with the InputBox function, ...

Discover More

Getting the Name of the Parent Workbook

If you need to insert into a cell the name of the workbook in which a worksheet is contained, you can use the CELL ...

Discover More

Removing Dashes from ISBN Numbers

ISBN numbers are used to denote a unique identifier for a published book. If you remove the dashes included in an ISBN, ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More WordTips (ribbon)

Selecting a Column or Row in a Table

Selecting rows and columns in tables is a common task. Because of this, Word provides a couple of ways you can accomplish ...

Discover More

Seeing the Height of a Row

Want to see the exact height of a row? This tip provides a quick and precise way that you can see that height.

Discover More

Formatting an ASCII Table with Tabs

If you get a document from a coworker that has tabs used to line up tabular information, you might want to change that ...

Discover More
Subscribe

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

View most recent newsletter.

Comments

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}] (all 7 characters, in the sequence shown) 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 four less than 7?

2017-02-06 11:14:07

Jim Swindle

Note to the other Jim:
To create your first macro in Word, open a blank document. Click View, Macros, Record Macro.
Keep the default macro name. Store in "All Documents (Normal.dotm)."
Click OK. Make a trivial change, such as typing one letter. Click View, Macros, Stop Recording. Then, to paste any macro found here into your Normal.dotm file, click View, Macros,
View Macros. Select the one you just created (probably Macro1). Click Edit. That opens a Visual Basic code window. Back on the internet, on this page or another, select the macro to copy. If on Windows, right-click and copy. Then, in the Visual Basic code window, click on the line after the existing macro. If on Windows, right-click and Paste. Then click Save. Then close that window.


2017-02-06 10:09:39

Jennifer Thomas

Beware of non-inline tables for other reasons, though - like non-repeating header rows at the top, paragraph marks in between tables that cannot be deleted, rows that won't respond to 'don't break across pages' settings, etc.. Our best practice is to always use tables inline, especially if they are complex structure - just to avoid those sort of unexpected and hard to diagnose issues.


2017-02-06 08:50:19

Peg

Thank you! Was hoping, of course, to find a setting but it's nearly as good to know there isn't one.


2017-02-04 09:14:06

Jim

Question:

I can type (or OCR) the program offered, but where, exactly, is it saved? How do I get it to execute?
Twenty years ago when I was making macros in Lotus 1-2-3 to automate my students' grades, I just stored them in an area on the worksheet in which they were needed.
If I remember right, cell A1 contained "0/" and cells
A2...A(whatever)
contained the macro which automatically ran when opening the spreadsheet.

I suppose I could get off my duff and find the answer in the Excel macro book. Thanks for tool! Been looking forward to reading it more, but the same question initially popped up.

Aside:

For complex programs, I copy the image off the screen and run it through an OCR program.
Ha!
No typos!

More?
My brilliant chemical engineer nephew says Lotus can handle very large determinants that are beyond Excel's capabilities. Well Al, I gotta tell you that since I retired from 49 years of teaching math and science, I thankfully do NOT need to deal with determinants (a GREAT name for my wife's honey-do list).
Bye.


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.

Videos
Subscribe

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.