Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
 
Posts: n/a
Default Determine how many times all words are used in a doc

As a writer, I want to see how many times all words are used in a doc,
so I can see if I am overusing some words (and thus phrases as well)

I know how to create a long list of all words, sorted alphabetically,
and I can manually count these, but I want a much quicker way, so I get
a report with, say:

beach = 4 times
bridge = 2 times
broken = 6 times

etc...

Thanks

Matt

  #2   Report Post  
Posted to microsoft.public.word.docmanagement
JoAnn Paules [MVP]
 
Posts: n/a
Default Determine how many times all words are used in a doc

Are you talking about all words or just select words?

--

JoAnn Paules
MVP Microsoft [Publisher]



wrote in message
oups.com...
As a writer, I want to see how many times all words are used in a doc,
so I can see if I am overusing some words (and thus phrases as well)

I know how to create a long list of all words, sorted alphabetically,
and I can manually count these, but I want a much quicker way, so I get
a report with, say:

beach = 4 times
bridge = 2 times
broken = 6 times

etc...

Thanks

Matt



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
 
Posts: n/a
Default Determine how many times all words are used in a doc

All words in the document, listed alphabetically. Some very common
words I am not concerned with, just some less used that I only want to
use once, maybe twice

  #4   Report Post  
Posted to microsoft.public.word.docmanagement
JoAnn Paules [MVP]
 
Posts: n/a
Default Determine how many times all words are used in a doc

I didn't ask that last question quite right. Let me try it again.

Do you need to be able to create a list that will tell how many times each
word is being used or will you only list the ones that you may have overused
(I can't think of another word that fits here, sorry).

--

JoAnn Paules
MVP Microsoft [Publisher]



wrote in message
oups.com...
All words in the document, listed alphabetically. Some very common
words I am not concerned with, just some less used that I only want to
use once, maybe twice



  #5   Report Post  
Posted to microsoft.public.word.docmanagement
 
Posts: n/a
Default Determine how many times all words are used in a doc

I didn't ask that last question quite right. Let me try it again.

Do you need to be able to create a list that will tell how many times
each
word is being used or will you only list the ones that you may have
overused
(I can't think of another word that fits here, sorry).

All the words, I guess, whichever is easier to do. I know there is a Summary feature in Word that I recall fiddling with but I don't know if that can be used for this task.

So, yes, I need to be able to create a list that will tell how many
times *each* word is being used

Thanks, Matt



  #6   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor
 
Posts: n/a
Default Determine how many times all words are used in a doc

If you save a copy of the document as plain text, the Simple Concordance
utility will instantly list all the words in that document with their
frequency. This tool is linked from the downloads page of my web site.

--

Graham Mayor - Word MVP

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


wrote:
As a writer, I want to see how many times all words are used in a doc,
so I can see if I am overusing some words (and thus phrases as well)

I know how to create a long list of all words, sorted alphabetically,
and I can manually count these, but I want a much quicker way, so I
get a report with, say:

beach = 4 times
bridge = 2 times
broken = 6 times

etc...

Thanks

Matt



  #7   Report Post  
Posted to microsoft.public.word.docmanagement
 
Posts: n/a
Default Determine how many times all words are used in a doc

Thanks Graham, probably works a treat -- unfort I am using Mac G4
running OSX. Is there a Unix version? (Know I am asking a lot here)

Thanks

Matt

  #8   Report Post  
Posted to microsoft.public.word.docmanagement
Doug Robbins - Word MVP
 
Posts: n/a
Default Determine how many times all words are used in a doc

Use the following macro (though I am not sure whether it will work on the
Mac)

Sub WordFrequency()



Dim SingleWord As String 'Raw word pulled from doc
Const maxwords = 9000 'Maximum unique words allowed
Dim Words(maxwords) As String 'Array to hold unique words
Dim Freq(maxwords) As Integer 'Frequency counter for Unique
Words
Dim WordNum As Integer 'Number of unique words
Dim ByFreq As Boolean 'Flag for sorting order
Dim ttlwds As Long 'Total words in the document
Dim Excludes As String 'Words to be excluded
Dim Found As Boolean 'Temporary flag
Dim j, k, l, Temp As Integer 'Temporary variables
Dim tword As String '



' Set up excluded words
' Excludes =
"[the][a][of][is][to][for][this][that][by][be][and][are]"
Excludes = ""
Excludes = InputBox$("Enter words that you wish to exclude,
surrounding each word with [ ].", "Excluded Words", "")
' Excludes = Excludes & InputBox$("The following words are excluded:
" & Excludes & ". Enter words that you wish to exclude, surrounding each
word with [ ].", "Excluded Words", "")
' Find out how to sort
ByFreq = True
Ans = InputBox$("Sort by WORD or by FREQ?", "Sort order", "FREQ")
If Ans = "" Then End
If UCase(Ans) = "WORD" Then
ByFreq = False
End If



Selection.HomeKey Unit:=wdStory
System.Cursor = wdCursorWait
WordNum = 0
ttlwds = ActiveDocument.Words.Count
Totalwords = ActiveDocument.Words.Count



' Control the repeat
For Each aword In ActiveDocument.Words
SingleWord = Trim(aword)
If SingleWord "A" Or SingleWord "z" Then SingleWord = ""
'Out of range?
If InStr(Excludes, "[" & SingleWord & "]") Then SingleWord = ""
'On exclude list?
If Len(SingleWord) 0 Then
Found = False
For j = 1 To WordNum
If Words(j) = SingleWord Then
Freq(j) = Freq(j) + 1
Found = True
Exit For
End If
Next j
If Not Found Then
WordNum = WordNum + 1
Words(WordNum) = SingleWord
Freq(WordNum) = 1
End If
If WordNum maxwords - 1 Then
j = MsgBox("The maximum array size has been exceeded.
Increase maxwords.", vbOKOnly)
Exit For
End If
End If
ttlwds = ttlwds - 1
StatusBar = "Remaining: " & ttlwds & " Unique: " & WordNum
Next aword



' Now sort it into word order
For j = 1 To WordNum - 1
k = j
For l = j + 1 To WordNum
If (Not ByFreq And Words(l) Words(k)) Or (ByFreq And
Freq(l) Freq(k)) Then k = l
Next l
If k j Then
tword = Words(j)
Words(j) = Words(k)
Words(k) = tword
Temp = Freq(j)
Freq(j) = Freq(k)
Freq(k) = Temp
End If
StatusBar = "Sorting: " & WordNum - j
Next j



' Now write out the results
tmpName = ActiveDocument.AttachedTemplate.FullName
Documents.Add Template:=tmpName, NewTemplate:=False
Selection.ParagraphFormat.TabStops.ClearAll
With Selection
For j = 1 To WordNum
.TypeText Text:=Words(j) & vbTab & Trim(Str(Freq(j))) &
vbCrLf
Next j
End With
ActiveDocument.Range.Select
Selection.ConvertToTable
Selection.Collapse wdCollapseStart
ActiveDocument.Tables(1).Rows.Add BeforeRow:=Selection.Rows(1)
ActiveDocument.Tables(1).Cell(1, 1).Range.InsertBefore "Word"
ActiveDocument.Tables(1).Cell(1, 2).Range.InsertBefore
"Occurrences"
ActiveDocument.Tables(1).Range.ParagraphFormat.Ali gnment =
wdAlignParagraphCenter
ActiveDocument.Tables(1).Rows.Add
ActiveDocument.Tables(1).Cell(ActiveDocument.Table s(1).Rows.Count,
1).Range.InsertBefore "Total words in Document"
ActiveDocument.Tables(1).Cell(ActiveDocument.Table s(1).Rows.Count,
2).Range.InsertBefore Totalwords
ActiveDocument.Tables(1).Rows.Add
ActiveDocument.Tables(1).Cell(ActiveDocument.Table s(1).Rows.Count,
1).Range.InsertBefore "Number of different words in Document"
ActiveDocument.Tables(1).Cell(ActiveDocument.Table s(1).Rows.Count,
2).Range.InsertBefore Trim(Str(WordNum))
System.Cursor = wdCursorNormal
' j = MsgBox("There were " & Trim(Str(WordNum)) & " different words
", vbOKOnly, "Finished")
Selection.HomeKey wdStory



End Sub


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

wrote in message
oups.com...
Thanks Graham, probably works a treat -- unfort I am using Mac G4
running OSX. Is there a Unix version? (Know I am asking a lot here)

Thanks

Matt



  #9   Report Post  
Posted to microsoft.public.word.docmanagement
 
Posts: n/a
Default Determine how many times all words are used in a doc

Thanks -- I will check it out

--Matt

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
Search for specific words in a document using an external list? Krazykaj Microsoft Word Help 1 September 30th 05 05:38 PM
How can I find if there are doubles in my list of words? Rhen Microsoft Word Help 3 June 9th 05 05:12 AM
How many times are words used in a document. Marker Microsoft Word Help 4 March 9th 05 04:55 AM
Word frequencies Anthea Microsoft Word Help 6 January 10th 05 04:46 AM
Word Count mel Microsoft Word Help 2 December 14th 04 10:17 PM


All times are GMT +1. The time now is 10:28 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"