Selective Text Frame Export


Advertisements

Sometimes, you might not want to export the whole document but only the text in selected text frames. InDesign makes it easy and offers you choices into the formats that you can export. We will explore two methods here, one is by using the Export command and the second by running scripts.

Exporting Text From a Frame Using the Export Command

We have used the Export command earlier to export files as PDFs. When you want to export just the text from a text frame, make sure the text cursor is inside the text frame and go to the File menu and click Export… You will now have a few additional choices.

Adding Additional Choice

The three main formats for exporting text are Text Only (.txt), Rich Text Format (.rtf) and Adobe InDesign Tagged Text (.txt). Text Only is a simple text format devoid of any formatting. It just exports the plain text. Rich Text Format allows for basic formatting and can be read by many word processors such as Microsoft Word.

Adobe InDesign Tagged Text format allows you to export the text with all the available InDesign formatting embedded in it. But it can only be read by other InDesign programs and not by any other word processor. This is useful if you are exporting text to work on another workstation with InDesign installed.

Exporting Text Using Scripts

InDesign is a very flexible program and its functionality can be extended by small snippets of code called scripts which are custom written to enhance the program’s functionality. InDesign can read scripts written in JavaScript (.jsx; Windows and Mac), AppleScript (.scpt or .as; Mac only) or Visual Basic scripts (.vbs; Windows only).

InDesign comes with some built-in scripts, which can be accessed by going to the Window menu, then to the Utilities submenu and selecting Scripts. This opens the Scripts panel, which lists all the available scripts on the computer.

There are two levels of scripts in the Scripts panel − Application and User. Application lists all the scripts that come with InDesign out of the box. It contains sample scripts in JavaScript along with VBScript (if on Windows) or AppleScript (if on the Mac). User lists all scripts that are installed by the user. You can locate these scripts on your hard drive by right-clicking on either the script or the parent folder and selecting Reveal in Explorer on Windows or Reveal in Finder on the Mac.

Reveal In Finder

For exporting all the text from text frames, expand the Samples folder under the JavaScript folder, which is under Application and scroll down till you see the script named ExportAllStories.jsx. Double-click to run the script. This will open a dialog box asking you to select the export text format.

Exporting Text

As described earlier, select the desired format according to your needs and click OK to select a destination to save the file. The script works in the background and saves the exported file in the specified destination.

Advertisements