Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-06-2011, 04:53 AM
rajpes rajpes is offline How to filter sentences wth highlighted colour Windows XP How to filter sentences wth highlighted colour Office 2003
Novice
How to filter sentences wth highlighted colour
 
Join Date: Feb 2011
Posts: 5
rajpes is on a distinguished road
Question How to filter sentences wth highlighted colour

Hi i have a word document with many paragraphs containing many sentences.
In some of the paragraphs i have highlighted some sentences with red mark.
Now i don't want to scroll though whole document to read them.
Instead i want some way to read only those sentences by filtering wanted/unwanted things.


Any possible solution?

Thanks
Reply With Quote
  #2  
Old 02-06-2011, 10:54 AM
Kimberly Kimberly is offline How to filter sentences wth highlighted colour Windows 7 How to filter sentences wth highlighted colour Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Posts: 517
Kimberly is on a distinguished road
Default

Make sure Show/Hide is turned on.
Select all then right-click on it and choose Font> Check "Hidden".
Deselect the document text
Click the Replace button
If the More button is displayed, click it
Click in Find What box and click Format > Highlight
Click in Replace With box and click Format > Font > Uncheck Highlight
Replace All
Turn off Show/Hide
Reply With Quote
  #3  
Old 02-06-2011, 01:30 PM
macropod's Avatar
macropod macropod is offline How to filter sentences wth highlighted colour Windows 7 32bit How to filter sentences wth highlighted colour Office 2000
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi rajpes,

Here are two macros to help with the reviewing. The first hides all sentences that have nothing highlighted, the second restores the hidden sentences. With the first macro, even if a single word is highlighted, the whole sentence will be displayed for context.

Code:
Option Explicit
Dim bSH As Boolean, bSA As Boolean
 
Sub ReviewHiLites()
Application.ScreenUpdating = False
Dim RngS As Range, RngW As Range, bHL As Boolean
bSH = ActiveWindow.View.ShowHiddenText
bSA = ActiveWindow.ActivePane.View.ShowAll
For Each RngS In ActiveDocument.Range.Sentences
  With RngS
    bHL = False
    For Each RngW In RngS.Words
      If RngW.HighlightColorIndex <> wdNoHighlight Then
        bHL = True
        Exit For
      End If
    Next RngW
    If bHL = False Then .Font.Hidden = True
  End With
Next RngS
ActiveWindow.View.ShowHiddenText = False
ActiveWindow.ActivePane.View.ShowAll = False
Application.ScreenUpdating = True
End Sub
 
Sub RestoreHiddenText()
Application.ScreenUpdating = False
ActiveWindow.ActivePane.View.ShowAll = bSA
ActiveWindow.View.ShowHiddenText = bSH
ActiveDocument.Range.Font.Hidden = False
Application.ScreenUpdating = True
End Sub
Note: Because the macros toggle Word's 'Hidden text' and 'Show All' display settings, if you run the first macro, you should run the second one before closing the document. Otherwise you might need to re-set these setting manually.

If you need advice on how to install & run macros, see: http://www.gmayor.com/installing_macro.htm
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #4  
Old 02-06-2011, 09:45 PM
rajpes rajpes is offline How to filter sentences wth highlighted colour Windows XP How to filter sentences wth highlighted colour Office 2003
Novice
How to filter sentences wth highlighted colour
 
Join Date: Feb 2011
Posts: 5
rajpes is on a distinguished road
Default

Thanks for you replies.I was wondering if there is a way to remove those hidden text so that all the required( highlighted) sentences are just one below other for the sake of better readability.

Thanks again.
Reply With Quote
  #5  
Old 02-25-2011, 12:43 AM
macropod's Avatar
macropod macropod is offline How to filter sentences wth highlighted colour Windows 7 32bit How to filter sentences wth highlighted colour Office 2000
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by rajpes View Post
Thanks for you replies.I was wondering if there is a way to remove those hidden text so that all the required( highlighted) sentences are just one below other for the sake of better readability.

Thanks again.
Hi rajpes,

I've been away for a few weeks, hence the delay in replying.

Whilst changing the code so that sentences in different paragraphs retain a paragraph's space between them, trying to do that for multiple sentences in the same paragraph will create problems. That's because it would be difficult to keep differentiate any line breaks inserted by the code from any inserted by the user.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
filter, highlight



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sentences and paragraphs keep disappearing in Word XP (2002) at bottom of page urobolus Word 3 08-26-2011 10:02 AM
How to filter sentences wth highlighted colour keep only sentences beginning with: Wind Michael007 Word VBA 3 01-17-2011 04:11 PM
Prevent highlighted only message from opening Rickkimbrell Outlook 2 12-16-2009 07:42 AM
Highlighted Selection on Action Settings mos7sad PowerPoint 0 10-12-2009 07:48 AM
capitalize first letter of sentences norco1 Word 0 06-25-2006 12:37 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:39 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft