Here you are :
'-----------------------------------------------------------------------------------------------------
Selection.HomeKey wdStory ' go to top
Selection.Find.ClearFormatting
With Selection.Find
.Style = 'somestyle'
.Text = " "
Do
ok = .Execute(, , , , , , True, wdFindStop)
Loop While ok = True
End With
'---------------------------------------------------------------------------------------------------------
I'm going to explain it again :
In certain situations my code work fine, however inside tables or when I
have only a 'enter' or carriage return this macro find allways the same
solution.
thanks
> Hi Antonio,
>
[quoted text clipped - 7 lines]
> "red.sys" & chr(64) & "t-online.de"
> Word 2002, Windows 2000
Helmut Weber - 18 Aug 2005 13:12 GMT
Hi Antonio,
This should cure the problems in tables:
[snip]
Do
ok = .Execute(, , , , , , True, wdFindStop)
If Selection.Information(wdWithInTable) = True Then
Selection.EndKey
End If
Loop While ok = True
[snip]
However, I couldn't reproduce other endless loops.
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000
Antonio Pérez - 19 Aug 2005 11:56 GMT
Thanks Helmut, i'm going to test it
Greetings from Spain
> Hi Antonio,
>
[quoted text clipped - 15 lines]
> "red.sys" & chr(64) & "t-online.de"
> Word 2002, Windows 2000