Hi Dave,
one method would be to check,
whether there is hidden text at all.
Public Sub test5056()
Dim l As Long
Dim rTmp As Range
Set rTmp = Selection.Cells(1).Range
rTmp.End = rTmp.End - 1
Application.ScreenUpdating = False
ActiveWindow.View.ShowHiddenText = True
l = 1
' ------
With rTmp.Find
.Font.Hidden = True
If Not .Execute Then
ActiveWindow.View.ShowHiddenText = True
Exit Sub
End If
End With
' ------
With rTmp
While .Characters(l).Font.Hidden = False
l = l + 1
Wend
.Characters(l).Font.Hidden = False
End With
ActiveWindow.View.ShowHiddenText = False
Application.ScreenUpdating = True
End Sub
As Tony told us in the previous thread,
a range has a property TextRetrievalMode,
which could be useful, too, if you prefer
a solution without using
ActiveWindow.View.ShowHiddenText.
Which I had used anyway,
if I had known about it.

Signature
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
Helmut Weber - 11 Feb 2006 23:27 GMT
Hmm..., one of these days,
If Not .Execute Then
ActiveWindow.View.ShowHiddenText = false
' which is what you want, probably
Exit Sub
End If
HW
Dave Neve - 12 Feb 2006 08:22 GMT
Hi
I took out
rTmp.End = rTmp.End - 1
which made the macro jump a line down to reveal the wrong words (one cell
down) and I even managed to 'convert' your macro again to get it to work on
'words' as well as characters.
Unfortunately, I have to admit that I can't really follow the logic of this
macro with all its true and falses, hide and show and the conditions set
inside one another.
But thanks a million
Dave Neve
> Hmm..., one of these days,
>
[quoted text clipped - 5 lines]
>
> HW
Helmut Weber - 12 Feb 2006 11:50 GMT
Hi Dave,
1st:
create a range and set it to the cell
2nd:
move the range's end one character to the left
so that the end-of-cell mark is not included,
which is always a good idea for a couple of reasons
3rd:
show hidden text
4th:
check whether there is hidden text at all
search in the range for hidden text
if not .execute means:
if no hidden text was found
then hide hidden text and exit
if hidden text was found then
5th
set up a counter and check character by character
as long as the character with the number of the
counter is not hidden.
If checking character by character finds a hidden
character, then the loop ends.
6th: The font of the actual character is set to not hidden
end
FAR BETTER would be to use TextRetrievalMode ("thanks Tony")
Use a sample paragraph and forget about cells first:
The quick brown fox jumps over the lazy dog¶
Sub HideEverySecondWord()
Dim rTmp As Range
Dim lCnt As Long
Set rTmp = Selection.Paragraphs(1).Range
lCnt = 0
With rTmp
.TextRetrievalMode.IncludeHiddenText = True
For lCnt = 2 To .Words.Count Step 2
.Words(lCnt).Font.Hidden = True
Next
End With
End Sub
' -----------------------------------------
Sub ShowFirstHiddenWord()
Dim rTmp As Range
Set rTmp = Selection.Paragraphs(1).Range
With rTmp
.TextRetrievalMode.IncludeHiddenText = True
With .Find
.Font.Hidden = True
.MatchWholeWord = True
If .Execute Then
rTmp.Words(1).Font.Hidden = False
End If
End With
End With
The difficulty seems to be,
that there are so many ways to do it.

Signature
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"