Top Navigational Bar

Search and Replace a Block of Text with Forma
DocumentID: 629492
Revision Date: 29-Feb-96 1:42:44 PM

The information in this document applies to:
WordPerfect® 5.1 for DOS

Problem

Solutions: FYI:
A customer wanted to search and replace a specific block of text containing formatting codes that appeared multiple times in a document. The normal replace feature will not work in a case like this. The customer can write a macro that will search for a unique combination of words that begin the block of text, back up to the beginning of the block, turn Block on, search for a unique combination of words that end the text, delete the Block, and then type the new text. The customer would then have the option to either run the macro as many times as needed, or loop the macro with a {GO} command. The following example shows how to perform this action:

      {DISPLAY OFF}{LABEL}top~{Search}first three words of text{Search}
      {Word Left}{Word Left}{Word Left}{Block}
      {Search}last three words of text{Del}y
      type the new text here with formatting codes if desired
      {GO}top~

Answer:

Details:


Product specifications, packaging, technical support and information (*Specifications*) refer to theUnited States retail English version only. Specifications for other versions may vary. All Specifications, claims, features, representations, and/or comparisons provided are correct to the best of our knowledge of the date of publication, but are subject to change without notice.OUR MAXIMUM AGGREGATE LIABILITY TO YOU AND THAT OF OUR DEALERS AND SUPPLIERS IS LIMITED. IT SHALL NOTEXCEED THE AMOUNT YOU PAID TO ACCESS THE INFORMATION. SEE LEGAL DISCLAIMER.