Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Finding TEXT BOXES in long documents

Is there a way to find all the TEXT BOXES in a long document? I've got a 300+ page doucment with dozens of floating text boxes. What I'd like to be able to do is jump from one to the next. Any way to do this? Or to see them all at once?


Thanks.

iMac / iBook / iPhone, Mac OS X (10.5.2)

Posted on Sep 16, 2013 10:55 PM

Reply
7 replies

Sep 16, 2013 11:41 PM in response to markmal

You can see where they are by going to View (menu) > Show Layout, or by using the keystroke equivalent, shift-command-L.


You won't see them 'all at once,' though, unless they all fit on a single screen.


You can move from one to the next one downstream using the down arrow to move through the text, provided the text boxes are linked to each other.


Regards,

Barry

Sep 17, 2013 9:54 AM in response to Barry

Thanks, although that's not quite what I'm looking for. My problem isn't seeing the text boxes when they're on the page in front of me (which is, I believe, what VIEW LAYOUT does), but FINDING and NAVIGATING to all the text boxes in the document. (I haven't linked the boxes one to another; I can see no reason to do that, unless it's the only way to go from one to the next and doesn't have any other consequences.) It looks like I can use those little up/down arrows at the bottom of the window to jump from page to page, or section to section, or even footnote to footnote. But there's nothing there to jump from text box to text box.

Sep 17, 2013 10:41 AM in response to markmal

May not be able to solve your current challenge of finding individual text boxes. I can help you find them in future documents with the following technique.


For each future text box, make the very last character in the Text Box something you are unlikely to type elsewhere. As a test, I created three Text Box. I chose the infinity symbol (option+5 on U.S. keyboard), selected it, and changed the font color to white.


I then placed the cursor at the beginning of the document and pressed command+F (find). In the Find dialog, I pressed option+5 for the character, and selected Next. Each infinity symbol is briefly highlighted in yellow, and the Text Box boundary becomes unselected, but visible.

Sep 17, 2013 6:19 PM in response to markmal

I had a surge of creativity and have written a Pages service that prompts you to reveal all Text Boxes, or on running the service again, hide previously revealed Text Boxes. It also gives you a count of all Text Boxes in the current document. It is written as an Automator Service with AppleScript.


Steps:

  1. Launch /Applications/Automator
    1. Choose Service
    2. Library menu > Utilities > drag “Run AppleScript” into the workflow window
    3. Service receives no input in Pages (you will have to choose Other... and select Pages icon)
    4. In the workflow window, remove all AppleScript code
    5. Copy and paste the AppleScript source code from below ... into this currently blank workflow window
    6. Automator > File > Save...
      1. I named this Service TextBoxReveal
      2. The file is saved in ~/Library/Services
  2. System Preferences > Keyboard > Keyboard Shortcuts > Services
    1. Scroll down until you see the new service name you gave it.
    2. Service should have left check mark indicating it is enabled.
    3. Optionally, you can click on this entry and can assign a keyboard shortcut
  3. Open your Pages document that has Text Boxes in it
    1. From the Pages > Services menu, your new service should be available
    2. Click the service and an intuitive dialog box will appear
      1. Choosing Reveal will paint a blue dotted stroke around every Text Box
      2. Choosing Hide will do what it says.
      3. Cancel leaves you in your Pages document


Enjoy.


(*
Name:   TextBoxReveal.applescript
Type:   Automator Service
App:    Pages ’09 v4.3
Author: VikingOSX, Apple Support Community
Date:   Sept. 17, 2013

Pages service with user interaction to reveal/hide all document text boxes.
Run once to reveal, run again to hide.
*)

property bxBlue : {0, 0, 65535}
set userCanceled to false

tell application "Pages"
tell document 1
  
     set bxCount to count of text box
  
     try
          set theResult to ¬
          display dialog "Document Text Box Count: " & bxCount ¬
               buttons {"Reveal", "Hide", "Cancel"} ¬
               default button 1 with icon note
     
     -- user pressed Cancel
     on error number -128
          return
     end try
  
     if button returned of theResult is "Reveal" then
          repeat with i from 1 to bxCount
               tell text box i
                    set properties to {stroke type:short dash, stroke color:bxBlue}
               end tell
          end repeat
     else if button returned of theResult is "Hide" then
          repeat with i from 1 to bxCount
               tell text box i
                    set properties to {stroke type:none}
               end tell
          end repeat
     end if
  
end tell
end tell

Sep 20, 2013 4:32 PM in response to markmal

Conscience was bothering me and I have restructured the code to replace the original submission. Same functionality in Pages as previous.



(*
Name:    TextBoxReveal.applescript
Type:    Automator Service
App:     Pages ’09 v4.3
Author:  VikingOSX, Apple Support Community
Date:    Sept. 20, 2013
Version: 1.1


Pages service with user interaction to reveal/hide all document text boxes.
Run once to reveal, run again to hide.
*)

property bxBlue  : {0, 0, 65535}
property bxRed   : {65535, 0, 0}
property bxGrn   : {0, 65535, 0}
property bxBlk   : {0, 0, 0}


tell application "Pages"
tell document 1
  
     set bxCount to count of text box
  
     try
          set theResult to ¬
          display dialog "Document Text Box Count: " & bxCount ¬
               buttons {"Reveal", "Hide", "Cancel"} ¬
               default button 1 with icon note
     
     -- user pressed Cancel
     on error number -128
          return
     end try
     
    if button returned of theResult is "Reveal" then
        set bxProp to {stroke type:short dash, stroke color:bxBlue}
    else if button returned of theResult is "Hide" then
        set bxProp to {stroke type:none}
    end if
     
    repeat with next from 1 to bxCount
        tell text box next
            set properties to bxProp
        end tell
    end repeat
  
end tell
end tell

Finding TEXT BOXES in long documents

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.