Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
esleditor esleditor is offline
external usenet poster
 
Posts: 1
Default generate a list of key words in a long document

I am editing a manuscript for a learner English book and I need to generate a
list of vocabulary words from the text. I have highlighted all the words. Is
there a way to select, copy and paste just those highlighted words into a new
document? Or is there another way to generate a list of key words?
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default generate a list of key words in a long document

The following macro will extract all the highlighted words in a document and
list them by highlight colour in a new document Strings of highlioghted
words will be treated as one - http://www.gmayor.com/installing_macro.htm

Sub ExtractHiLight()
Dim FirstFind As Boolean
Dim rDcm As Range
Dim lClr As Long ' color index
Dim sCol As String
Dim Doc1 As Document
Dim Doc2 As Document
If ActiveDocument.Content.HighlightColorIndex 0 Then
Set Doc1 = ActiveDocument
Set Doc2 = Documents.Add
Doc1.Activate
For lClr = 1 To 16
FirstFind = True
Select Case lClr
Case 1
sCol = "Black"
Case 2
sCol = "Blue"
Case 3
sCol = "Turquoise"
Case 4
sCol = "Bright green"
Case 5
sCol = "Pink"
Case 6
sCol = "Red"
Case 7
sCol = "Yellow"
Case 8
sCol = "White"
Case 9
sCol = "Dark blue"
Case 10
sCol = "Teal"
Case 11
sCol = "Green"
Case 12
sCol = "Violet"
Case 13
sCol = "Dark red"
Case 14
sCol = "Dark yellow"
Case 15
sCol = "50% gray"
Case 16
sCol = "25% gray"
End Select
Set rDcm = Doc1.Range
With rDcm.Find
.Highlight = True
While .Execute
If rDcm.HighlightColorIndex = lClr Then
If FirstFind Then
Doc2.Range.InsertAfter sCol & vbCr
FirstFind = False
End If
Doc2.Range.InsertAfter vbTab & rDcm.Text & vbCr
End If
Wend
End With
Next
Else
MsgBox "No Highlighting found."
End If
End Sub

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



esleditor wrote:
I am editing a manuscript for a learner English book and I need to
generate a list of vocabulary words from the text. I have highlighted
all the words. Is there a way to select, copy and paste just those
highlighted words into a new document? Or is there another way to
generate a list of key words?



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
DeanH DeanH is offline
external usenet poster
 
Posts: 1,862
Default generate a list of key words in a long document

If you have used the Highlight icon, then simply use the Find function
(Ctrl+F), leave the "Find what" box empty, check the box for "Highlight all
items found in:" (don't be confused , this "highlight" is really "select"),
and have the option as "Main Document", click More, Format, Highlight, then
Find All, Close. Then press Ctrl+C, to copy, then go to your new document,
Ctrl+V to paste.
All the words previously highlighted will paste over.
Hope this helps
DeanH


"esleditor" wrote:

I am editing a manuscript for a learner English book and I need to generate a
list of vocabulary words from the text. I have highlighted all the words. Is
there a way to select, copy and paste just those highlighted words into a new
document? Or is there another way to generate a list of key words?

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
how do i add a comma after each line on a long list of words? Kartik Microsoft Word Help 3 April 24th 23 08:47 AM
How can I get a list of fonts used in a long Word 2003 document? MBD Microsoft Word Help 3 September 22nd 06 02:29 PM
Generate an index automatically for all words in Word, how? C Harland Microsoft Word Help 1 August 31st 05 09:45 PM
How can I tag the same replaceable words in a long document? SecureFred Microsoft Word Help 2 August 26th 05 05:23 PM
how do I generate an index for all the words in the document? profitspublishing Microsoft Word Help 1 February 11th 05 05:40 PM


All times are GMT +1. The time now is 07:41 PM.

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"