Written by Allen Wyatt (last updated October 29, 2020)
This tip applies to Word 2007, 2010, 2013, and 2016
Tim wonders if Find and Replace can be used to search for and locate text boxes. He would like to search for text boxes and replace each of them with a graphic, as he finds this almost impossible to do manually when some text boxes are essentially invisible in his document.
If your text boxes are inline with your text, then you can use Find and Replace to locate and replace them. All you need to do is to display the Replace tab of the Find and Replace dialog box and, in the Find What box, enter ^g. This is the code for find graphics, but Word treats text boxes as of they are graphics when they are inline.
The problem is, of course, that most text boxes are not inline—text wraps around them and they reside on their own layer. For these types of text boxes you must use a macro to do the searching and replacing. The following is an example of one you could use:
Sub ReplaceTextBox() Dim shp As Shape For Each shp In ActiveDocument.Shapes If shp.Type = msoTextBox Then shp.Select shp.Delete Selection.PasteAndFormat (wdPasteDefault) End If Next End Sub
To use the macro, select the graphic you want to use in your replacement and then press Ctrl+C. This places the graphic in the Clipboard. When you run the macro, it is this graphic—the one in the Clipboard—that is pasted into the document in place of each text box.
You should be aware that the macro replaces all of the text boxes in a document with the graphics. If you wanted to selectively replace text boxes, the coding would be a good deal more complex.
Note:
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (2894) applies to Microsoft Word 2007, 2010, 2013, and 2016.
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!
Using Find and Replace you can both find and replace graphics in your document. Replacing graphics selectively is a bit ...
Discover MoreWhen you use the Find and Replace tool in Word, you may want to include what you searched for in the replacement text. ...
Discover MoreIf you want to insert a space between letters and digits in your document, you have a couple of tasks to perform. First, ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
2017-01-16 09:38:49
Eileen
does this also work in PowerPoint or is there an equivalent?
Thanks!
2017-01-14 07:25:35
Ken Endacott
You can use the Object Browser to step through the tables in a document, then if required convert a table to text. These functions are described in:
WordTips “Using the Object Browser”
WordTips “Converting a Table into Text”
2017-01-14 04:56:42
Dave
Can I do this I find to find tables? I sometimes have documents with large amounts of tables and I would like to easily adjust them or convert them as the need arises. What are my options here? Thanks.
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.
Visit the WordTips channel on YouTube
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments