Is there any way to find a cell (or range of cells) in an active word document based on it's border I have not been able to come up with a solution to this yet.
Thanks for your help.
Visual Studio Tools for Office
There's no way to "find" cell borders. You need to loop through all cells in all tables and check the OutsideLineStyle property. Here's a VBA code snippet to get you started
Dim tbl As Word.Table
Dim cel As Word.Cell
Set tbl = ActiveDocument.Tables(1)
For Each cel In tbl.Range.Cells
If cel.Borders.OutsideLineStyle = wdLineStyleDouble Then
MsgBox cel.Range.Text
End If
Next
Heading 1 |
Heading 2 |
Heading 3 |
Contents 1a |
Contents 2a |
Contents 3a |
Contents 1b |
Contents 2b |
Contents 3b |
Contents 1c |
Contents 2c |
Contents 3c |
Total 1 |
Total 2 |
Total 3 |