S
Steven Lee
Hi,
We have a legacy template (Word 2000) that uses paragraph styles in tables
(as that was the only way you could have table styles in 2000.). We also
have code that processes documents and looks for styles. In this case the
style is TFN (Table Footnote). If there is text w/i the cell tagged as TFN
then Selection.Find.Style = "TFN" will find the cell. However, if the celll
is empty (but the end of cell marker is tagged as "TFN") then selection.find
will not find the para/cell.
Is there any way to find "empty" paragraphs w/i tables using selection.find?
I can use:
Dim tblRng As Range
Dim tbl As Table
Dim para As Paragraph
For Each tbl In ActiveDocument.Tables
Set tblRng = tbl.Range
For Each para In tblRng.Paragraphs
If para.Style = "TFN" Then
para.Range.Select
MsgBox para.Style
End If
Next para
Next tbl
But this is rather more complicated than simply running a selection.find on
the "TFN" style. I'm trying to avoid having to hunt through several hundred
macros to replace all of our legacy code.
Thanks in advance!
Steve
We have a legacy template (Word 2000) that uses paragraph styles in tables
(as that was the only way you could have table styles in 2000.). We also
have code that processes documents and looks for styles. In this case the
style is TFN (Table Footnote). If there is text w/i the cell tagged as TFN
then Selection.Find.Style = "TFN" will find the cell. However, if the celll
is empty (but the end of cell marker is tagged as "TFN") then selection.find
will not find the para/cell.
Is there any way to find "empty" paragraphs w/i tables using selection.find?
I can use:
Dim tblRng As Range
Dim tbl As Table
Dim para As Paragraph
For Each tbl In ActiveDocument.Tables
Set tblRng = tbl.Range
For Each para In tblRng.Paragraphs
If para.Style = "TFN" Then
para.Range.Select
MsgBox para.Style
End If
Next para
Next tbl
But this is rather more complicated than simply running a selection.find on
the "TFN" style. I'm trying to avoid having to hunt through several hundred
macros to replace all of our legacy code.
Thanks in advance!
Steve