forty Newbie

Joined: 26 May 2012 Posts: 1
|
Posted: Sat May 26, 2012 12:41 am Post subject: Delete a row if section inside is hidden |
|
|
In writer document, i have a table with rows
Some rows contain hidden / visible sections
I wanted to delete rows with hidden sections
Is there a way to do that.
The beginning of my code :
| Code: |
Sub deleteRow
dim PysDoc as object, PysTable as object, PysCell as object
dim PysNum as integer
PysDoc = thisComponent
PysTable = PysDoc.TextTables.getByName("Mytable")
for PysNum = ubound(PysTable.CellNames) to lbound(PysTable.CellNames) step -1
PysCell = PysTable.getCellByName(PysTable.CellNames(PysNum))
'I wanted to delete a row if a section inside is not visible
if XXXXXXXXXXXXXXXXX Then PysTable.Rows.removeByIndex(PysNum,1)
next PysNum
End Sub
|
|
|