Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-02-2016, 07:36 AM
grumblid grumblid is offline Ctrl+F entire bodies of text? Windows 7 64bit Ctrl+F entire bodies of text? Office 2003
Novice
Ctrl+F entire bodies of text?
 
Join Date: Jul 2016
Posts: 25
grumblid is on a distinguished road
Default


Quote:
Originally Posted by Guessed View Post
Try a macro like this to highlight any paragraphs that contain the string provided by the user.
Code:
Sub HighlightHits()
  Dim aPara As Paragraph, sFind As String
  sFind = LCase(InputBox("What are we looking for today?", "Finder", "Office"))
  ActiveDocument.Range.HighlightColorIndex = wdNoHighlight
  For Each aPara In ActiveDocument.Paragraphs
    If InStr(LCase(aPara.Range.Text), sFind) > 0 Then
      aPara.Range.HighlightColorIndex = wdDarkYellow
    End If
  Next aPara
End Sub
Thank you, this is almost exactly what I had in mind! You are awesome~

I take the blame though, because I forgot that highlight was a thing you can do on Word, and I used that term here when I should've said 'select.' I apologize

Is it possible to make a macro that does just as the one you posted does, except instead of highlighting those areas it 'selects' them, allowing you to use 'cut' and 'copy' on all those areas at once? That's what I've been after all this time ^ ^'
Reply With Quote
Reply

Tags
bodies, ctrl+f, text



Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook 2007 not downloading message bodies automatically Mr Davo Outlook 3 02-09-2014 09:23 PM
Scrolling text for entire presentation rtully87 PowerPoint 0 11-07-2013 09:28 AM
Continuous scrolling text for entire presentation rtully87 PowerPoint 0 10-25-2013 08:37 AM
Editing Text through your entire presentation macVSpc PowerPointSD PowerPoint 1 12-06-2012 08:42 AM
Moving Entire Text Sleeper Word 2 01-10-2010 04:40 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:23 PM.


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