I've been working on ease-of-maintenance macros. Where a macro is
performing a series of operations, such as find&replace, for a
variety of strings, it makes double sense to encode the "find"
and "replace" strings in a table document, and have the macro
open the document as a driver.
Here's an example. Suppose I want to fix up a slew of
typographical errors throughout documents. I write a FixTypos
macro, then build a table:
serach search
speradsheet spreadsheet
millillitre millilitre
etc.
Bonus 1: It's a lot easier to update the table than to update the
macro. I can update the table (and change the behaviour of the
macro) while some other user has the template open. Users can be
given ownership of the table, and adapt the function of the macro
to their own ends without paying me extrotionate amounts of money
to edit the macro.
Bonus2: It's a lot easier to test the macro. For Find&Replace
macros, even those that are inserting AutoText as a replacement,
simply copy the table into a document, and run the macro-table
against that document! If the table can't find the AutoText and
"fix" itself, we have REAL problems.
I hope this helps.
From christopher.greaves at pro-mail.com
christopher.greaves at ablelink.org
* 1st 2.00b #6263 * People and Computers
--- PCBoard (R) v15.3 (OS/2) 5
---------------
* Origin: FidoNet: CAP/CANADA Support BBS : 416 287-0234 (1:250/710)
|