Some time ago the following code was posted to this newsgroup as a way to
hide/display text based on its style.
Sub ShowMessages()
With ActiveDocument
.Styles("Message").Font.Hidden = False
.Styles("Summary").Font.Hidden = True
End With
End Sub
Sub ShowSummaries()
With ActiveDocument
.Styles("Message").Font.Hidden = True
.Styles("Summary").Font.Hidden = False
End With
End Sub
Sub ToggleMessages()
With ActiveDocument
If .Styles("Summary").Font.Hidden = False Then
.Styles("Message").Font.Hidden = False
.Styles("Summary").Font.Hidden = True
Else
.Styles("Message").Font.Hidden = True
.Styles("Summary").Font.Hidden = False
End If
End With
End Sub
I have created a document (attached) that has lines of text that are
alternately formatted using Summary Style or Message Style.
I find that the ShowMessages macro hides all text regardless of style and
ShowSummaries shows all rext regardless of style.
I feel I am doing something fundamentally wrong. Can you offer any
assistance?
Many Thanks
Tony Starr
PS. I am using Word xp
Klaus Linke - 29 Sep 2005 18:23 GMT
Hi Tony,
The attachment didn't make it to the MS news server, but it seems likely
that your "Message" style is based on the "Summary" style?
Regards,
Klaus
> Some time ago the following code was posted to this newsgroup as a way to
> hide/display text based on its style.
[quoted text clipped - 36 lines]
>
> PS. I am using Word xp