[comp.sys.mac.apps] AutoMac III recursive programming question

bschwart@bbn.com (Beverly I. Schwartz) (05/15/91)

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  <==