Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Word count
I am using Word 2000 Professional, and know how to get the standard word
count. However, I understand that Word counts everything between the spaces as a word. I am in an industry that counts words differently. I need to know if there is a way to adjust Word to count words as my industry does, which is every 6 characters (letters, spaces, etc.) as one word. Can anyone help me out? Thank you. |
#2
|
|||
|
|||
There's no way to adjust the word count as such -- but why not just take the
character count and divide by six? "Danny" wrote in message ... I am using Word 2000 Professional, and know how to get the standard word count. However, I understand that Word counts everything between the spaces as a word. I am in an industry that counts words differently. I need to know if there is a way to adjust Word to count words as my industry does, which is every 6 characters (letters, spaces, etc.) as one word. Can anyone help me out? Thank you. |
#3
|
|||
|
|||
The following macro uses a wildcard replacement to replace every six
characters with themselves The number of replacements is the count and it is displayed in the status bar at the bottom of the Word screen when the macro is run. If there's a way to capture that count, for insertion in the document I don't know it so I have cross posted to the vba group to take counsel from the more experienced vba programmers who lurk there Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = "?{6}" .Replacement.Text = "^&" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchAllWordForms = False .MatchSoundsLike = False .MatchWildcards = True End With Selection.Find.Execute replace:=wdReplaceAll End Sub -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Danny wrote: I am using Word 2000 Professional, and know how to get the standard word count. However, I understand that Word counts everything between the spaces as a word. I am in an industry that counts words differently. I need to know if there is a way to adjust Word to count words as my industry does, which is every 6 characters (letters, spaces, etc.) as one word. Can anyone help me out? Thank you. |
#4
|
|||
|
|||
You could use this field { = { NUMCHARS }/6 } except that unfortunately
NUMCHARS does not include spaces. So you may need Graham's macro. -- 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. "Danny" wrote in message ... I am using Word 2000 Professional, and know how to get the standard word count. However, I understand that Word counts everything between the spaces as a word. I am in an industry that counts words differently. I need to know if there is a way to adjust Word to count words as my industry does, which is every 6 characters (letters, spaces, etc.) as one word. Can anyone help me out? Thank you. |
#5
|
|||
|
|||
The talented chaps in the vba group came up with a simpler solution, which
has not been cross posted back here. Though mine still works -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Suzanne S. Barnhill wrote: You could use this field { = { NUMCHARS }/6 } except that unfortunately NUMCHARS does not include spaces. So you may need Graham's macro. "Danny" wrote in message ... I am using Word 2000 Professional, and know how to get the standard word count. However, I understand that Word counts everything between the spaces as a word. I am in an industry that counts words differently. I need to know if there is a way to adjust Word to count words as my industry does, which is every 6 characters (letters, spaces, etc.) as one word. Can anyone help me out? Thank you. |
#6
|
|||
|
|||
Given that the link to the vba group has been broken and that the OP may not
know how to find it, the final macro, by team effort is: Sub SpecWordCount() Dim charCnt As Long Dim lineCnt As Long Dim specWordCnt As Integer charCnt = ActiveDocument.Characters.Count lineCnt = ActiveDocument.ComputeStatistics(wdStatisticLines) specWordCnt = (charCnt - lineCnt) \ 6 MsgBox "There are " & specWordCnt & " word units in this document." End Sub I take no credit for the outcome -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Suzanne S. Barnhill wrote: You could use this field { = { NUMCHARS }/6 } except that unfortunately NUMCHARS does not include spaces. So you may need Graham's macro. "Danny" wrote in message ... I am using Word 2000 Professional, and know how to get the standard word count. However, I understand that Word counts everything between the spaces as a word. I am in an industry that counts words differently. I need to know if there is a way to adjust Word to count words as my industry does, which is every 6 characters (letters, spaces, etc.) as one word. Can anyone help me out? Thank you. |
#7
|
|||
|
|||
Thank you. This post seems to be the most helpful from what I've seen so
far. I don't know VBA, and forgot what little VB I learned 2 years ago. As far as this post goes, unfortunately the start of each, "chapter," has that word, and the chapter number at the head of it, followed by a blank line. This would skew the count a bit, but I think it would still give a more accurate count than what I've been using. Your help is appreciated. Thank you again. Danny "Jezebel" wrote: There's no way to adjust the word count as such -- but why not just take the character count and divide by six? "Danny" wrote in message ... I am using Word 2000 Professional, and know how to get the standard word count. However, I understand that Word counts everything between the spaces as a word. I am in an industry that counts words differently. I need to know if there is a way to adjust Word to count words as my industry does, which is every 6 characters (letters, spaces, etc.) as one word. Can anyone help me out? Thank you. |
#8
|
|||
|
|||
Hi Graham,
You could do this with a simple field, coded as: {={numchars}/6} Cheers "Graham Mayor" wrote in message ... The following macro uses a wildcard replacement to replace every six characters with themselves The number of replacements is the count and it is displayed in the status bar at the bottom of the Word screen when the macro is run. If there's a way to capture that count, for insertion in the document I don't know it so I have cross posted to the vba group to take counsel from the more experienced vba programmers who lurk there Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = "?{6}" .Replacement.Text = "^&" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchAllWordForms = False .MatchSoundsLike = False .MatchWildcards = True End With Selection.Find.Execute replace:=wdReplaceAll End Sub -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Danny wrote: I am using Word 2000 Professional, and know how to get the standard word count. However, I understand that Word counts everything between the spaces as a word. I am in an industry that counts words differently. I need to know if there is a way to adjust Word to count words as my industry does, which is every 6 characters (letters, spaces, etc.) as one word. Can anyone help me out? Thank you. |
#9
|
|||
|
|||
Macropod,
I don't think numchar counts spaces. If I remember correctly the OP wanted to include spaces in the count. |
#10
|
|||
|
|||
Hi Suzanne,
If you want to count spaces also, you could use: {=({NUMCHARS }+{NUMWORDS })/6 } This, of course, would include para & line breaks in the count too. That's because the formula assumes that there is a space before or after each word, but this doesn't necessarily apply at para ends or lines ended with a line break. Cheers "Suzanne S. Barnhill" wrote in message ... You could use this field { = { NUMCHARS }/6 } except that unfortunately NUMCHARS does not include spaces. So you may need Graham's macro. -- 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. "Danny" wrote in message ... I am using Word 2000 Professional, and know how to get the standard word count. However, I understand that Word counts everything between the spaces as a word. I am in an industry that counts words differently. I need to know if there is a way to adjust Word to count words as my industry does, which is every 6 characters (letters, spaces, etc.) as one word. Can anyone help me out? Thank you. |
#11
|
|||
|
|||
Hi Greg,
In that case, see the reply I just posted to Suzanne Barnhill on the same topic. Cheers "Greg" wrote in message ups.com... Macropod, I don't think numchar counts spaces. If I remember correctly the OP wanted to include spaces in the count. |
#12
|
|||
|
|||
Sounds like the best simple solution.
-- 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. "macropod" wrote in message ... Hi Suzanne, If you want to count spaces also, you could use: {=({NUMCHARS }+{NUMWORDS })/6 } This, of course, would include para & line breaks in the count too. That's because the formula assumes that there is a space before or after each word, but this doesn't necessarily apply at para ends or lines ended with a line break. Cheers "Suzanne S. Barnhill" wrote in message ... You could use this field { = { NUMCHARS }/6 } except that unfortunately NUMCHARS does not include spaces. So you may need Graham's macro. -- 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. "Danny" wrote in message ... I am using Word 2000 Professional, and know how to get the standard word count. However, I understand that Word counts everything between the spaces as a word. I am in an industry that counts words differently. I need to know if there is a way to adjust Word to count words as my industry does, which is every 6 characters (letters, spaces, etc.) as one word. Can anyone help me out? Thank you. |
#13
|
|||
|
|||
macropod,
The paragraph and linebreaks is why we haven't been able to come up with a non-VBA solution. The OP didn't mention wanting paragraphs and linebreaks counted. However, based on his reply, he didn't seem very concerned about accurracy so just about any method proposed would work. |
#14
|
|||
|
|||
Actually, I didn't even think about paragraph and linebreaks. I don't want
them counted and part of the word count, it would just throw the count off. I want words, meaning 6 characters including: letters, spaces, punctuation, and symbols (and anything else I missed that are actual characters). "Greg" wrote: macropod, The paragraph and linebreaks is why we haven't been able to come up with a non-VBA solution. The OP didn't mention wanting paragraphs and linebreaks counted. However, based on his reply, he didn't seem very concerned about accurracy so just about any method proposed would work. |
#15
|
|||
|
|||
Danny,
That is why I think this will work: Sub SpecWordCount() Dim charCnt As Long Dim lineCnt As Long Dim specWordCnt As Integer charCnt = ActiveDocument.Characters.Coun*t lineCnt = ActiveDocument.ComputeStatisti*cs(wdStatisticLines ) specWordCnt = (charCnt - lineCnt) \ 6 MsgBox "There are " & specWordCnt & " word units in this docoment." End Sub -- Greg Maxey/Word MVP See: http://gregmaxey.mvps.org/word_tips.htm For some helpful tips using Word. Danny wrote: Actually, I didn't even think about paragraph and linebreaks. I don't want them counted and part of the word count, it would just throw the count off. I want words, meaning 6 characters including: letters, spaces, punctuation, and symbols (and anything else I missed that are actual characters). "Greg" wrote: macropod, The paragraph and linebreaks is why we haven't been able to come up with a non-VBA solution. The OP didn't mention wanting paragraphs and linebreaks counted. However, based on his reply, he didn't seem very concerned about accurracy so just about any method proposed would work. |
#16
|
|||
|
|||
Thanks. I'll have to try it. There's one more question though. I don't
know how to use VBA, alone or within MS Word. How do I insert this code, and where? Danny "Greg Maxey" wrote: Danny, That is why I think this will work: Sub SpecWordCount() Dim charCnt As Long Dim lineCnt As Long Dim specWordCnt As Integer charCnt = ActiveDocument.Characters.CounÂ*t lineCnt = ActiveDocument.ComputeStatistiÂ*cs(wdStatisticLine s) specWordCnt = (charCnt - lineCnt) \ 6 MsgBox "There are " & specWordCnt & " word units in this docoment." End Sub -- Greg Maxey/Word MVP See: http://gregmaxey.mvps.org/word_tips.htm For some helpful tips using Word. Danny wrote: Actually, I didn't even think about paragraph and linebreaks. I don't want them counted and part of the word count, it would just throw the count off. I want words, meaning 6 characters including: letters, spaces, punctuation, and symbols (and anything else I missed that are actual characters). "Greg" wrote: macropod, The paragraph and linebreaks is why we haven't been able to come up with a non-VBA solution. The OP didn't mention wanting paragraphs and linebreaks counted. However, based on his reply, he didn't seem very concerned about accurracy so just about any method proposed would work. |
#17
|
|||
|
|||
Danny,
See: http://www.gmayor.com/installing_macro.htm -- Greg Maxey/Word MVP See: http://gregmaxey.mvps.org/word_tips.htm For some helpful tips using Word. Danny wrote: Thanks. I'll have to try it. There's one more question though. I don't know how to use VBA, alone or within MS Word. How do I insert this code, and where? Danny "Greg Maxey" wrote: Danny, That is why I think this will work: Sub SpecWordCount() Dim charCnt As Long Dim lineCnt As Long Dim specWordCnt As Integer charCnt = ActiveDocument.Characters.Coun*t lineCnt = ActiveDocument.ComputeStatisti*cs(wdStatisticLines ) specWordCnt = (charCnt - lineCnt) \ 6 MsgBox "There are " & specWordCnt & " word units in this docoment." End Sub -- Greg Maxey/Word MVP See: http://gregmaxey.mvps.org/word_tips.htm For some helpful tips using Word. Danny wrote: Actually, I didn't even think about paragraph and linebreaks. I don't want them counted and part of the word count, it would just throw the count off. I want words, meaning 6 characters including: letters, spaces, punctuation, and symbols (and anything else I missed that are actual characters). "Greg" wrote: macropod, The paragraph and linebreaks is why we haven't been able to come up with a non-VBA solution. The OP didn't mention wanting paragraphs and linebreaks counted. However, based on his reply, he didn't seem very concerned about accurracy so just about any method proposed would work. |
#18
|
|||
|
|||
I've tried, but can't seem to figure it out. I have VB.net on my computer &
think it might be somehow interfering with VBA on Word. For some reason, Word is telling me somethine about needing to enable macros when I try to run it. "Greg Maxey" wrote: Danny, See: http://www.gmayor.com/installing_macro.htm -- Greg Maxey/Word MVP See: http://gregmaxey.mvps.org/word_tips.htm For some helpful tips using Word. Danny wrote: Thanks. I'll have to try it. There's one more question though. I don't know how to use VBA, alone or within MS Word. How do I insert this code, and where? Danny "Greg Maxey" wrote: Danny, That is why I think this will work: Sub SpecWordCount() Dim charCnt As Long Dim lineCnt As Long Dim specWordCnt As Integer charCnt = ActiveDocument.Characters.CounÂ*t lineCnt = ActiveDocument.ComputeStatistiÂ*cs(wdStatisticLine s) specWordCnt = (charCnt - lineCnt) \ 6 MsgBox "There are " & specWordCnt & " word units in this docoment." End Sub -- Greg Maxey/Word MVP See: http://gregmaxey.mvps.org/word_tips.htm For some helpful tips using Word. Danny wrote: Actually, I didn't even think about paragraph and linebreaks. I don't want them counted and part of the word count, it would just throw the count off. I want words, meaning 6 characters including: letters, spaces, punctuation, and symbols (and anything else I missed that are actual characters). "Greg" wrote: macropod, The paragraph and linebreaks is why we haven't been able to come up with a non-VBA solution. The OP didn't mention wanting paragraphs and linebreaks counted. However, based on his reply, he didn't seem very concerned about accurracy so just about any method proposed would work. |
#19
|
|||
|
|||
You appear to have your macro security set to high. Change it to Medium and
to trust installed templates and add-ins. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Danny wrote: I've tried, but can't seem to figure it out. I have VB.net on my computer & think it might be somehow interfering with VBA on Word. For some reason, Word is telling me something about needing to enable macros when I try to run it. "Greg Maxey" wrote: Danny, See: http://www.gmayor.com/installing_macro.htm -- Greg Maxey/Word MVP See: http://gregmaxey.mvps.org/word_tips.htm For some helpful tips using Word. Danny wrote: Thanks. I'll have to try it. There's one more question though. I don't know how to use VBA, alone or within MS Word. How do I insert this code, and where? Danny "Greg Maxey" wrote: Danny, That is why I think this will work: Sub SpecWordCount() Dim charCnt As Long Dim lineCnt As Long Dim specWordCnt As Integer charCnt = ActiveDocument.Characters.Coun*t lineCnt = ActiveDocument.ComputeStatisti*cs(wdStatisticLines ) specWordCnt = (charCnt - lineCnt) \ 6 MsgBox "There are " & specWordCnt & " word units in this docoment." End Sub -- Greg Maxey/Word MVP See: http://gregmaxey.mvps.org/word_tips.htm For some helpful tips using Word. Danny wrote: Actually, I didn't even think about paragraph and linebreaks. I don't want them counted and part of the word count, it would just throw the count off. I want words, meaning 6 characters including: letters, spaces, punctuation, and symbols (and anything else I missed that are actual characters). "Greg" wrote: macropod, The paragraph and linebreaks is why we haven't been able to come up with a non-VBA solution. The OP didn't mention wanting paragraphs and linebreaks counted. However, based on his reply, he didn't seem very concerned about accurracy so just about any method proposed would work. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
The WordPerfect "Reveal Codes" method is so much easier to use. | Microsoft Word Help | |||
Making Word do something that Wordperfect can do | New Users | |||
How do I keep two words together? | Microsoft Word Help | |||
Boiletplates from Word Perfect | Microsoft Word Help | |||
Converted document from WordPerfect. New footnotes are not being. | Microsoft Word Help |