Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Extracting Data in Word 2003
Is there a way to have word Extract highlighted text in a Document and place
it in a new Word Document? Thanks, |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Extracting Data in Word 2003
Or is it possible to tell word to extract any text that's already highlighted
in a document and paste it in a new document? Thanks, "Marilyn" wrote: Is there a way to have word Extract highlighted text in a Document and place it in a new Word Document? Thanks, |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Extracting Data in Word 2003
I don't see any difference in your two questions.
Try something like: Sub ExtractHightlight() Dim oRng As Word.Range Dim oDoc2 As Word.Document Dim i As Long Set oRng = ActiveDocument.Range Set oDoc2 = Documents.Add i = 1 With oRng.Find .Highlight = True While .Execute oDoc2.Range.InsertAfter "Extract " & i & ": " & oRng.Text & vbCr i = i + 1 Wend End With oDoc2.Activate End Sub Marilyn wrote: Is there a way to have word Extract highlighted text in a Document and place it in a new Word Document? Thanks, |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Extracting Data in Word 2003
Well, the first question asked to highlight then extract text. The second
question asked to extract text that was already highlighted. I appreciate the response and your code works well. Thanks a bunch, "Greg Maxey" wrote: I don't see any difference in your two questions. Try something like: Sub ExtractHightlight() Dim oRng As Word.Range Dim oDoc2 As Word.Document Dim i As Long Set oRng = ActiveDocument.Range Set oDoc2 = Documents.Add i = 1 With oRng.Find .Highlight = True While .Execute oDoc2.Range.InsertAfter "Extract " & i & ": " & oRng.Text & vbCr i = i + 1 Wend End With oDoc2.Activate End Sub Marilyn wrote: Is there a way to have word Extract highlighted text in a Document and place it in a new Word Document? Thanks, |
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Extracting Data in Word 2003
It depends on what you mean by "highlighted."
1. If you mean "selected," then the answer is easy: Just Copy and Paste. 2. If you mean colored with the Highlight tool, then this is almost as easy. a. Ctrl+F to open the Find dialog. b. Click More to expand the dialog. c. Click Format and choose Highlight (leave the "Find what" box blank). d. Check the box for "Highlight all items found." e. Click Find All. f. Click on the title bar of the document to return focus to the document (do not close the Find dialog), and Ctrl+C to copy, then paste into another document. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "Marilyn" wrote in message ... Is there a way to have word Extract highlighted text in a Document and place it in a new Word Document? Thanks, |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
take yet another lesson from wordperfect "reveal codes" | Microsoft Word Help | |||
Can't get Word 2003 to keep data file with mail merge main documen | Mailmerge | |||
I am having difficulty with deleting headers and footers | New Users | |||
Change paper size; Word changes to invalid margins | New Users | |||
Word & WordPerfect | Microsoft Word Help |