Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-06-2011, 08:04 AM
Jamal NUMAN Jamal NUMAN is offline How to get the number of words in the file (please see details)? Windows XP How to get the number of words in the file (please see details)? Office 2007
Expert
How to get the number of words in the file (please see details)?
 
Join Date: Nov 2010
Posts: 519
Jamal NUMAN is on a distinguished road
Default How to get the number of words in the file (please see details)?


How to get the number of words in the file (please see details)?
Please, see the attached image that shows my question
I need to know the words count except:
  • Words in tables
  • Words in header and footer
  • Words in caption
  • Words in the references page
Why I need that?
In most of the assignments, they need us to right up to 2000 words (for example) but the don’t count the words in table, header, footer, caption and in the page of refences. This is why we need an automatic way to get the net word count
Is this feature available in word?
Regard
Jamal
Attached Images
File Type: jpg word count_6.jpg (102.8 KB, 15 views)
Reply With Quote
  #2  
Old 01-06-2011, 02:40 PM
macropod's Avatar
macropod macropod is offline How to get the number of words in the file (please see details)? Windows 7 32bit How to get the number of words in the file (please see details)? Office 2000
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Jamal,

Word doesn't have anything built-in to do the word count the way you want it. it could be done with a macro, though.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 01-13-2011, 05:23 PM
Jamal NUMAN Jamal NUMAN is offline How to get the number of words in the file (please see details)? Windows XP How to get the number of words in the file (please see details)? Office 2007
Expert
How to get the number of words in the file (please see details)?
 
Join Date: Nov 2010
Posts: 519
Jamal NUMAN is on a distinguished road
Lightbulb

Thank you for the answer.

actually, i'vo no experince how to work with macro. could you please elaborate more.

this will save a lot of time, rigth now, i'm used to do the neet count of words manully,

first i get the count of all words in the file, then the words in tables, then the caption, then the refernces.

then

words count = total count - words in table - words in caption - words in refernces

should i continue doing it manually?


regards

jamal

Quote:
Originally Posted by macropod View Post
Hi Jamal,

Word doesn't have anything built-in to do the word count the way you want it. it could be done with a macro, though.
Reply With Quote
  #4  
Old 01-14-2011, 03:29 PM
BrazzellMarketing BrazzellMarketing is offline How to get the number of words in the file (please see details)? Windows XP How to get the number of words in the file (please see details)? Office 2007
Competent Performer
 
Join Date: Apr 2010
Location: Galax, VA
Posts: 120
BrazzellMarketing is on a distinguished road
Default

Highlight the text you want to count. Click Review in the top menu. Select "Word Count" from the Proofing section of the Review ribbon menu. The count that appears is just the count for the area you've selected. If the text you want to count is broken up by tables and other elements that can throw off your count, two options:

1. Select the text areas as far as you can. Write down the total. Select the next text area. So forth. Add your totals.
2. Select and copy all the text you want to count. Paste it into a blank document. Count the new document. Delete the new document.
Reply With Quote
  #5  
Old 01-14-2011, 03:43 PM
Jamal NUMAN Jamal NUMAN is offline How to get the number of words in the file (please see details)? Windows XP How to get the number of words in the file (please see details)? Office 2007
Expert
How to get the number of words in the file (please see details)?
 
Join Date: Nov 2010
Posts: 519
Jamal NUMAN is on a distinguished road
Default

Thank you for the answer.

please, see the attached image that shows that words count directly the number of selected words.

well, i think that the only soluiton is the MS word must be develpoed in such a way to achieve what we r looking for (which list).

The method that you have provided is manual and not practical for large files which contains hundreds of pages.

do u agree with me?




Quote:
Originally Posted by BrazzellMarketing View Post
Highlight the text you want to count. Click Review in the top menu. Select "Word Count" from the Proofing section of the Review ribbon menu. The count that appears is just the count for the area you've selected. If the text you want to count is broken up by tables and other elements that can throw off your count, two options:

1. Select the text areas as far as you can. Write down the total. Select the next text area. So forth. Add your totals.
2. Select and copy all the text you want to count. Paste it into a blank document. Count the new document. Delete the new document.
Attached Images
File Type: jpg Cliyyyp_20.jpg (89.1 KB, 15 views)
Reply With Quote
  #6  
Old 01-14-2011, 03:50 PM
macropod's Avatar
macropod macropod is offline How to get the number of words in the file (please see details)? Windows 7 32bit How to get the number of words in the file (please see details)? Office 2000
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Jamal,

Give me some more time and I'll write a macro for you. Remember, this is a volunteer arrangement and we all need to fit these things in around whatever else we're doing...
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #7  
Old 01-14-2011, 03:56 PM
Jamal NUMAN Jamal NUMAN is offline How to get the number of words in the file (please see details)? Windows XP How to get the number of words in the file (please see details)? Office 2007
Expert
How to get the number of words in the file (please see details)?
 
Join Date: Nov 2010
Posts: 519
Jamal NUMAN is on a distinguished road
Default

Sure.

very much appreciated.

thank

regards

Jamal


Quote:
Originally Posted by macropod View Post
Hi Jamal,

Give me some more time and I'll write a macro for you. Remember, this is a volunteer arrangement and we all need to fit these things in around whatever else we're doing...
Reply With Quote
  #8  
Old 01-14-2011, 04:16 PM
BrazzellMarketing BrazzellMarketing is offline How to get the number of words in the file (please see details)? Windows XP How to get the number of words in the file (please see details)? Office 2007
Competent Performer
 
Join Date: Apr 2010
Location: Galax, VA
Posts: 120
BrazzellMarketing is on a distinguished road
Default Short document strategy

Quote:
Originally Posted by Jamal NUMAN View Post
Thank you for the answer.

please, see the attached image that shows that words count directly the number of selected words.

well, i think that the only soluiton is the MS word must be develpoed in such a way to achieve what we r looking for (which list).

The method that you have provided is manual and not practical for large files which contains hundreds of pages.

do u agree with me?
Yes. If that strategy creates more than ten sections, that would be too much manual stuff for something a macro could do automatically.
Reply With Quote
  #9  
Old 01-14-2011, 07:53 PM
macropod's Avatar
macropod macropod is offline How to get the number of words in the file (please see details)? Windows 7 32bit How to get the number of words in the file (please see details)? Office 2000
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Jamal,

The following macro gives you a wide range of statistics
Code:
Sub CountWords()
Application.ScreenUpdating = False
Dim oTbl As Table, lTbl As Long, Sctn As Section
Dim oHdFt As HeaderFooter, lHdr As Long, lFtr As Long
Dim oEnt As Endnote, lEnt As Long
Dim oFnt As Footnote, lFnt As Long
Dim oShp As Shape, lShp As Long
Dim oPara As Paragraph, lCpt As Long
With ActiveDocument
  For Each oTbl In .Tables
    lTbl = lTbl + oTbl.Range.ComputeStatistics(wdStatisticWords)
  Next
  For Each oEnt In .Endnotes
    lEnt = lEnt + oEnt.Range.ComputeStatistics(wdStatisticWords)
  Next
  For Each oFnt In .Footnotes
    lFnt = lFnt + oFnt.Range.ComputeStatistics(wdStatisticWords)
  Next
  For Each Sctn In .Sections
    For Each oHdFt In Sctn.Headers
      If Not oHdFt.LinkToPrevious Then _
        lHdr = lHdr + oHdFt.Range.ComputeStatistics(wdStatisticWords)
    Next
    For Each oHdFt In Sctn.Footers
      If Not oHdFt.LinkToPrevious Then _
        lFtr = lFtr + oHdFt.Range.ComputeStatistics(wdStatisticWords)
    Next
  Next
  For Each oShp In .Endnotes
    If Not oShp.TextFrame Is Nothing Then _
      lShp = lShp + oShp.TextFrame.TextRange.ComputeStatistics(wdStatisticWords)
  Next
  For Each oPara In .Paragraphs
    If oPara.Style = "Caption" Then _
      lCpt = lCpt + oPara.Range.ComputeStatistics(wdStatisticWords)
  Next
  MsgBox "Word Count Statistics:" & vbCr & _
    "Tables - " & vbTab & vbTab & lTbl & vbCr & _
    "EndNotes - " & vbTab & lEnt & vbCr & _
    "Footnotes - " & vbTab & lFnt & vbCr & _
    "Headers - " & vbTab & vbTab & lHdr & vbCr & _
    "Footers - " & vbTab & vbTab & lFtr & vbCr & _
    "Shapes - " & vbTab & vbTab & lShp & vbCr & _
    "Captions - " & vbTab & lCpt & vbCr & _
    "Other - " & vbTab & vbTab & .Range.ComputeStatistics(wdStatisticWords) - lTbl - lCpt
End With
Application.ScreenUpdating = True
End Sub
I haven't included your "Words in the references page" stats, as I don't know how your document is laid out and, therefore, how those stats might best be defined in the vba code. Do note too that words in headers and footers aren't counted by Word anyway.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #10  
Old 04-09-2011, 05:56 AM
Jamal NUMAN Jamal NUMAN is offline How to get the number of words in the file (please see details)? Windows XP How to get the number of words in the file (please see details)? Office 2007
Expert
How to get the number of words in the file (please see details)?
 
Join Date: Nov 2010
Posts: 519
Jamal NUMAN is on a distinguished road
Default

Very much appreciated paul...but i don't have enough skills to use this macro! could u please explain "if ur time permits" how can i use it to get the statistics that i need.

thank you
regards
Jamal
Reply With Quote
  #11  
Old 04-09-2011, 06:00 AM
macropod's Avatar
macropod macropod is offline How to get the number of words in the file (please see details)? Windows 7 32bit How to get the number of words in the file (please see details)? Office 2000
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Jamal,
Quote:
Originally Posted by Jamal NUMAN View Post
...but i don't have enough skills to use this macro! could u please explain "if ur time permits" how can i use it to get the statistics that i need.
Do you mean to say you've waited all this time before deciding you don't know how to use the macro?!

For installation & usage instructions, see: http://www.gmayor.com/installing_macro.htm
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #12  
Old 04-09-2011, 08:37 AM
Jamal NUMAN Jamal NUMAN is offline How to get the number of words in the file (please see details)? Windows XP How to get the number of words in the file (please see details)? Office 2007
Expert
How to get the number of words in the file (please see details)?
 
Join Date: Nov 2010
Posts: 519
Jamal NUMAN is on a distinguished road
Default

Really, it's great job and would help a lot in counting the words and saving time.

i'm not sure if it is can be developed so that it ignors the count of words in certain pages. for example: the words in the cover page and page of refernces are not counted. otherwise, still we need to count the "effective" number of words in the document manually. This just if yout time permits.

vey much appreciated Paul...fantastic.

regards

Jamal
Reply With Quote
  #13  
Old 04-09-2011, 08:41 AM
Jamal NUMAN Jamal NUMAN is offline How to get the number of words in the file (please see details)? Windows XP How to get the number of words in the file (please see details)? Office 2007
Expert
How to get the number of words in the file (please see details)?
 
Join Date: Nov 2010
Posts: 519
Jamal NUMAN is on a distinguished road
Default

I've another suggestion, if possibel:

why the word count in the micro doesn't count the number of words if we select certain paragraph or pages? instead, it gives the total for all words in the document.

thank you

regards

Jamal
Reply With Quote
  #14  
Old 04-09-2011, 01:58 PM
macropod's Avatar
macropod macropod is offline How to get the number of words in the file (please see details)? Windows 7 32bit How to get the number of words in the file (please see details)? Office 2000
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Jamal,
Quote:
Originally Posted by Jamal NUMAN View Post
i'm not sure if it is can be developed so that it ignors the count of words in certain pages. for example: the words in the cover page and page of refernces are not counted.
This would be difficult to do, because there is no way for a macro to determine which pages might be cover pages and reference pages. The best you could do is to get a word count based on a pre-selected range.
Quote:
Originally Posted by Jamal NUMAN View Post
why the word count in the micro doesn't count the number of words if we select certain paragraph or pages? instead, it gives the total for all words in the document.
If you only want the word count for a selected range, change ‘ActiveDocument’ to ‘Selection’. Do note that, if you do this, the word counts for footnotes & end notes will relate to those anchored in the selected range, regardless of where they’re physically located. Header & Footer counts are based on one count per Section in the selected range (provided that Section is not linked to a previous one).
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #15  
Old 04-09-2011, 02:15 PM
Jamal NUMAN Jamal NUMAN is offline How to get the number of words in the file (please see details)? Windows XP How to get the number of words in the file (please see details)? Office 2007
Expert
How to get the number of words in the file (please see details)?
 
Join Date: Nov 2010
Posts: 519
Jamal NUMAN is on a distinguished road
Default

Sorry bothering you again.

i've switched the ‘ActiveDocument’ to ‘Selection’ but didn't work...still counts the whole word in the document

the image is attached

what i might have done wrong?

thank you

regards

Jamal



Quote:
Originally Posted by macropod View Post
Hi Jamal,

This would be difficult to do, because there is no way for a macro to determine which pages might be cover pages and reference pages. The best you could do is to get a word count based on a pre-selected range.
If you only want the word count for a selected range, change ‘ActiveDocument’ to ‘Selection’. Do note that, if you do this, the word counts for footnotes & end notes will relate to those anchored in the selected range, regardless of where they’re physically located. Header & Footer counts are based on one count per Section in the selected range (provided that Section is not linked to a previous one).
Attached Images
File Type: jpg yhClip_62.jpg (132.6 KB, 14 views)
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
When Printing a file Sources/Details included BigTunz Word 0 03-01-2010 01:24 AM
Hide contact details AndyKC Outlook 0 01-25-2010 11:00 PM
Transfer of account details to Outlook 2003 on Windows7 taralastair Outlook 1 01-04-2010 01:24 PM
Printing task details STEVEK Outlook 0 11-11-2009 06:02 AM
Entering Contact details GemmaD Outlook 0 12-18-2008 06:41 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:00 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft