Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-29-2016, 09:01 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
Unhappy Ctrl+F entire bodies of text?


I've got documents with big, unorganized piles of text. So I often use Ctrl+F to find keywords to cut and paste sentences and paragraphs that have those keywords. It's just to better organize things into individual files.

It doesn't take a lot of effort to do something like 'Ctrl+F, select all instances of the word 'future,' make those all bold and red (to make them easier to track down in the pile), and then manually cut and paste each of those bodies of text into a new file.

But I was wondering, is there a way to make 'select all' highlight not just the word I search, but the entire body of text that word is in? That way all I gotta do is cut and paste all those bodies at once?

I've apparently got Word 2003 still, so let me know if I need a newer version to do this. Thanks to anyone who can help.
Reply With Quote
  #2  
Old 07-30-2016, 01:57 PM
Charles Kenyon Charles Kenyon is offline Ctrl+F entire bodies of text? Windows 8 Ctrl+F entire bodies of text? Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,454
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

I do not know how to do what you want, but Word 2003 will be able to do it as well as any later versions.
Reply With Quote
  #3  
Old 07-30-2016, 08:58 PM
gmayor's Avatar
gmayor gmayor is offline Ctrl+F entire bodies of text? Windows 10 Ctrl+F entire bodies of text? Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,137
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Define 'entire body of text that the word is in'.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #4  
Old 07-31-2016, 12:12 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 gmayor View Post
Define 'entire body of text that the word is in'.
Sure :]

For example if I Ctrl+F the word 'city,' the locations of that word would be on a single sentence, in some cases two, in some cases an entire paragraph.

As in: 'I went to the city.' I want to take the whole sentence, even if it's just by itself.

Or: 'I went to the city. There was a ton of traffic.' I want both sentences, as a body of text.

Or a paragraph; it would take the whole thing. Basically, any size body of text that contains the word city, I want highlighted so I can just cut and paste it elsewhere. Kind of like a triple-click, except you're highlighting multiple bodies instead of just one.
Reply With Quote
  #5  
Old 07-31-2016, 02:26 AM
gmayor's Avatar
gmayor gmayor is offline Ctrl+F entire bodies of text? Windows 10 Ctrl+F entire bodies of text? Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,137
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

What you ask is not possible manually, and a macro cannot make those sorts of decisions. You would have to tell the macro what you wanted to do with each found term. I don't see any macro solution being more viable than simply searching for city and deciding what parts to select manually.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #6  
Old 07-31-2016, 03:41 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 gmayor View Post
What you ask is not possible manually, and a macro cannot make those sorts of decisions. You would have to tell the macro what you wanted to do with each found term. I don't see any macro solution being more viable than simply searching for city and deciding what parts to select manually.
Ah, okay

Well at least now I know it's not possible. Thank you for answering :]

Btw, I don't suppose there's any other kind of program out there that could do something like this?
Reply With Quote
  #7  
Old 07-31-2016, 12:53 PM
Charles Kenyon Charles Kenyon is offline Ctrl+F entire bodies of text? Windows 8 Ctrl+F entire bodies of text? Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,454
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Let me get this straight. You want a computer program to read your mind and do what you want? I think that is at least 20 years out.
Reply With Quote
  #8  
Old 07-31-2016, 03:50 PM
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 Charles Kenyon View Post
Let me get this straight. You want a computer program to read your mind and do what you want? I think that is at least 20 years out.
That would be pretty convenient, thanks ;{D

Nah, just something that could highlight bodies of text containing the words I specify.
Reply With Quote
  #9  
Old 07-31-2016, 04:56 PM
Charles Kenyon Charles Kenyon is offline Ctrl+F entire bodies of text? Windows 8 Ctrl+F entire bodies of text? Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,454
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Quote:
Jjust something that could highlight bodies of text containing the words I specify.
The thing is, you are not specifying. A vba solution to select the sentence or paragraph could be done. The procedure cannot decide which for you.
Reply With Quote
  #10  
Old 07-31-2016, 05:55 PM
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 Charles Kenyon View Post
The thing is, you are not specifying. A vba solution to select the sentence or paragraph could be done. The procedure cannot decide which for you.
Yeah I don't know how to make something like that. Sounds cool though! :{D

I guess when I said program I meant a word processor like MS Word. Like maybe one that could do what Word can't.

I emailed some people who might be able to answer my question. Maybe someone here could help me before they reply back: Can WordPerfect do something like this? I've never used that, so I dunno. If you know any word processors with cool tricks and features, I'd appreciate anyone sharing the names so I can look them up :]
Reply With Quote
  #11  
Old 08-01-2016, 06:17 AM
Charles Kenyon Charles Kenyon is offline Ctrl+F entire bodies of text? Windows 8 Ctrl+F entire bodies of text? Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,454
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Again, you are asking for mind reading from a computer program. If you cannot specify what area you want selected, do not expect the program to guess.

AFAIK, there are no mind-reading computer programs.
Reply With Quote
  #12  
Old 08-01-2016, 02:10 PM
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 Charles Kenyon View Post
Again, you are asking for mind reading from a computer program. If you cannot specify what area you want selected, do not expect the program to guess.

AFAIK, there are no mind-reading computer programs.
I'll try again :3

Here's what I'm asking: When I Ctrl+F to highlight every instance of the word 'Office' for example. I was wondering. If there is a program. That has the option to also highlight the words around each 'Office' it finds. The sentence it's in, or the paragraph that its in. It'll highlight all of them.

The specification is Office. And, the option to 'grab everything around each Office in the entire document.' Again, like a bunch of triple clicks all at once, targeting our specified word.

So after doing this, you'd have not just every instance of 'Office' highlighted, but the entire sentences and paragraphs that have Office in them would be highlighted. Nothing else; if it's a sentence or paragraph that doesn't have Office, it doesn't get highlighted

If MSWord can't do this, that's cool. I was just curious if anyone knew of other options. Or if its just the way it is, I'd like to know if there's simply no way any program could do this. Which I hope isn't the case, because this feature would save me so much time <3
Reply With Quote
  #13  
Old 08-01-2016, 06:39 PM
Guessed's Avatar
Guessed Guessed is offline Ctrl+F entire bodies of text? Windows 10 Ctrl+F entire bodies of text? Office 2013
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,158
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #14  
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
  #15  
Old 08-01-2016, 08:20 PM
Charles Kenyon Charles Kenyon is offline Ctrl+F entire bodies of text? Windows 8 Ctrl+F entire bodies of text? Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,454
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

And a different macro could handle sentences, but the macro can't decide, by itself, which you want unless you give it more criteria.
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 09:14 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