S
Steve Wylie
* This post previously appeared in vba.beginners on 6 Jan
but did not attract any replies so I am re-posting here.
The following macro finds Heading 1 styles that occur in
a table. But it doesn't work if an empty cell is in
Heading 1, but contains nothing. How can it be altered
to detect a Heading 1 in a table cell that contains no
text?
Steve Wylie
With Selection.Find
.Format = true
.ClearFormatting
.Style = "Heading 1"
.Text = ""
Do While .Execute
If Selection.Information(wdWithinTable) Then
Exit Do
End If
Loop
End With
but did not attract any replies so I am re-posting here.
The following macro finds Heading 1 styles that occur in
a table. But it doesn't work if an empty cell is in
Heading 1, but contains nothing. How can it be altered
to detect a Heading 1 in a table cell that contains no
text?
Steve Wylie
With Selection.Find
.Format = true
.ClearFormatting
.Style = "Heading 1"
.Text = ""
Do While .Execute
If Selection.Information(wdWithinTable) Then
Exit Do
End If
Loop
End With