Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Marilyn Marilyn is offline
external usenet poster
 
Posts: 110
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Marilyn Marilyn is offline
external usenet poster
 
Posts: 110
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Greg Maxey Greg Maxey is offline
external usenet poster
 
Posts: 171
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Marilyn Marilyn is offline
external usenet poster
 
Posts: 110
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
take yet another lesson from wordperfect "reveal codes" wordperfect is superior Microsoft Word Help 5 May 11th 09 07:58 PM
Can't get Word 2003 to keep data file with mail merge main documen Yourcareercoach Mailmerge 9 August 10th 06 12:19 PM
I am having difficulty with deleting headers and footers LHD New Users 5 July 24th 06 01:44 AM
Change paper size; Word changes to invalid margins OhioTech New Users 10 July 6th 06 02:00 PM
Word & WordPerfect MrsMac Microsoft Word Help 5 June 10th 06 03:14 AM


All times are GMT +1. The time now is 06:07 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"