Extract Containing






This “Extract” script checks each paragraph in the front AppleWorks word processing document, copying into a new document any that contain a particular string.



This is one of 40 scripts in the Enhancement Pack for AppleWorks.


The “Extract Containing” menu item is in the “Word Processing” sub-menu of AppleWorks Scripts Menu.

Open the document to be searched.
Select the “Extract Containing” menu item.
Enter the text to find.
Click OK.
Every paragraph that contains the search string is copied to a new document.

Extract Conatining performs a similar, though much more limited, function as the UNIX grep command.

A future version of this script might allow wildcards in the search and include page numbers in the output. Please make any suggestions.

This script is unlocked so you can view the code. Below is the central instruction (for AppleWorks 6):

set matches to every paragraph in text body of front document where it contains matchString

Operates on the front document, which must be a word processing document.

This script works with AppleWorks 6 and AppleWorks 5.

Only registered users are permitted to edit the supplied files.

This script is included in the Enhancement Pack for AppleWorks, not supplied separately.

© 2000 BareFeetWare