|
Download
COLSRCHR.ZIP (Rev. 02/24/06; 16,703 bytes)
Compatible with WP versions
9,10,11,12,X3 |
Contains two macros:
Column searcher.wcm (v1.01) - A macro that finds text or
symbols in just the current column of a table --
it will skip searching any other columns. You can also replace
any items found.
Tips etc.
You can force the macro to start
searching at the top of a specific column by replacing the PosTableColumnTop
command at about line 46 with, for example, PosTableCell ("B1").
The latter command would force the macro to search the second
column of the current table. (Macros can be opened like any other
WordPerfect document. Make your changes and click the Save &
Compile button on the macro toolbar.
The code or technique may be
useful in other macros.
Column search
- color rows.wcm (v1.0)
- Based on code in the above macro, this macro finds user-specified
text in just the current column of a WordPerfect table
(it will skip searching any other column). It then colors any
row that contains the item specified in a pop-up dialog with
a specified color "fill".
See the redlined User Modification Area at the top of the macro's code to set
your preferences. (Macros can be opened like any other WordPerfect
document. Make your changes and click the Save & Compile
button on the macro toolbar.
Tips etc.
You can make several copies of
this macro, each with a slightly different name and different
default values for color, etc. See the User Modification Area.
You can redact (i.e., black out)
rows for printing purposes (the underlying data is unaffected)
by setting all three RGB color values to 0 (zero) and the shade
to 100 percent, in the User Modification Area.
Related tip:
A macro posted by Roy "lemoto"
Lewis on WordPerfect Universe
removes any row which does not contain a specified string of
characters (here, for example, the string is "DAB").
Perhaps the code will be useful to use as a starting point for
similar tasks.
BE SURE to also indicate the
specific table and cell in your own document in the PosTableCell()
command below, which is set (for this example) for Table C, Cell
C1.
Application(wp;"WordPerfect";Default!)
vCheckText = "DAB"
PosTableCell("Table C.C1")
While(NOT ?TableLastCell)
SelectWord
RowOut
PosTableCellDown ()
EndWhile
SelectWord
RowOut:
If(StrPos(?SelectedText; vCheckText) =0)
TableDeleteRow
PosTableCellUp
EndIf
SelectMode(Off!)
Return
|