Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!samsung!olivea!apple!bbn.com!bschwart From: bschwart@bbn.com (Beverly I. Schwartz) Newsgroups: comp.sys.mac.apps Subject: AutoMac III recursive programming question Message-ID: <64194@bbn.BBN.COM> Date: 15 May 91 16:45:17 GMT Sender: news@bbn.com Reply-To: bschwart@BBN.COM (Beverly I. Schwartz) Organization: Bolt Beranek and Newman Inc., Cambridge MA Lines: 21 I am using AutoMac III with Microsoft Word V4. I am trying to create an automatic utility which searches for paragraphes that have a predetermined marker, and then apply a particular style to those paragraphs. I would like this to be automatic. What I've done is set up one macro which finds the marker and then calls a second macro. The second macro sets the style, finds the next occurence of the marker, and calls itself. Unfortunately, this sets up an infinite loop which cannot be terminated. I put a popup with a cancel button in the second macro, but this requires hitting return for every iteration. The only other way I can think of doing this is to place some large number of iterations in the second macro with a cancel dialog at the end. This is on the inelegant and tedious style. Anybody out there with experience programming AutoMac III, that can suggest a more elegant solution? Please send responses to bschwart@bbn.com. -Bev Schwartz ==> Beverly Schwartz BBN Corporation <== ==> e-mail: bschwart@bbn.com Cambridge, Massachusetts 02138 <==