markSaunders
Programmer
I have a table that contains several columns (qty can change).
The 4th column contains a field that I wish to sort the table on. I actually want to cut out all rows where the 4th column contains CLOSED and paste this into a new table at the end of the document.
I tried the following code...
Value
Cut
but am not sure how to test the contents (ideally i could check if the cell contains the text rather than equals it
nor can i deduce how to get the row to the clipboard!
any advice would be gratefully received!
mark Mark Saunders
The 4th column contains a field that I wish to sort the table on. I actually want to cut out all rows where the 4th column contains CLOSED and paste this into a new table at the end of the document.
I tried the following code...
Code:
Dim tbl As Table
Set tbl = ActiveDocument.Tables(1).Cell
For lx = tbl.Rows.Count To 1 Step -1
If tbl.Cell(lx, 4).
Code:
= "CLOSED" Then
tbl.Rows(lx).
Code:
Set rng = ActiveDocument.Range
rng.Collapse (wdCollapseEnd)
rng.Paste
End If
Next lx
but am not sure how to test the contents (ideally i could check if the cell contains the text rather than equals it
nor can i deduce how to get the row to the clipboard!
any advice would be gratefully received!
mark Mark Saunders