In this article, we are glad to show you 3 effective ways to browse by text box in your Word document.
There is the “Select Browse Object” command in Word enabling you to browse only the objects you selected. For example, you can choose to browse by table or page. Unfortunately, there is no built-in function for browsing by text box. Therefore, we will provide you 3 ways to do so.
Method 1: Use “Tab” Key
- Firstly, press “Ctrl+ Home” to go to the start of a document.
- Then find and click on the first text box.
- Next press “Tab” to jump to the next text box.
By the way, this way will also find you shapes and images in the document.
Method 2: Run Macro to Jump from One Text Box to Another
- First and foremost, press “Alt+ F11” to trigger the VBA editor in Word.
- Next click “Normal”.
- Then click “Insert” and select “Module” on its drop-down menu.
- Open the new module by double click.
- Now in the coding area, paste following codes:
Sub BrowseByTextBox() Dim objShape As Shape Dim strBoxText As String Dim strButtonValue As String Dim objDoc As Document Set objDoc = ActiveDocument For Each objShape In objDoc.Shapes If objShape.Type = msoTextBox Then objShape.Select Selection.ShapeRange.TextFrame.TextRange.Select strBoxText = objShape.TextFrame.TextRange.Text strButtonValue = MsgBox("This text box contains: " & vbNewLine _ & strBoxText & vbNewLine & "Is this your desired text box?" _ & vbNewLine, vbYesNo, "Desired Text Box") If strButtonValue = vbYes Then Exit Sub End If End If Next objShape End Sub
- Click the “Run” button on the menu bar or hit “F5” to execute the codes.
Once you start running macro, there will be a message box popping up, such as below:
On the box shows the contents in the current selected text box. You can click “Yes” to stop on it if it’s your desired text box. Otherwise, click “No” to go to the next text box.
Method 3: Find a Specific Text Box
If you set title for text box in document, you can use it in combination with the bellowing macro to locate it immediately.
- First of all, refer to steps in method 2 to install and run a macro.
- Then remember to replace macro with this one:
Sub FindASpecificTextBox() Dim objShape As Shape Dim strBoxTitle As String Dim objInlineShape As InlineShape Dim objDoc As Document Application.ScreenUpdating = False Set objDoc = ActiveDocument strBoxTitle = InputBox("Enter the title of the text box to be found here: ") For Each objShape In objDoc.Shapes If objShape.Type = msoTextBox Then objShape.Select Selection.ShapeRange.TextFrame.TextRange.Select If objShape.Title = strBoxTitle Then Exit Sub End If End If Next objShape For Each objInlineShape In objDoc.InlineShapes If objInlineShape.Type = msoTextBox Then objInlineShape.Select Selection.ShapeRange.TextFrame.TextRange.Select If objInlineShape.Title = strBoxTitle Then Exit Sub End If End If Next objInlineShape Application.ScreenUpdating = True End Sub
- Next in the input box prompting up, enter the title of the text box to be found and click “OK” to proceed. You shall find the target text box in selection.
Cope with Data Loss
Given to the fact that Word is one of the most used software, it’s necessary to know some tricks once Word stops responding. For important corrupt doc, your only choice is to recover it. And to do this, you need carefully choose a third-party tool you can trust.
Vera Chen is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including corrupt xlsx and pdf repair software products. For more information visit www.datanumen.com