General

Ask Experts & Get Answers to Your Questions - ASAP

Ask an Expert,
Get an Answer ASAP!

General
This answer was rated:

Ask a Microsoft Word Question How do I count the total number

Ask a Microsoft Word Question >How...
Ask a Microsoft Word Question
>How do I count the total number of words in 14 documents that are all in a single directory...as in I have 14 individual docx files that comprise a book...how can I figure out the total word count for the total project without opening each document and counting and then adding 14 numbers up?
Show More
Show Less
Ask Your Own General Question
Answered in 21 minutes by:
5/15/2011
Greg Maxey
Greg Maxey, Consultant\Microsoft Word Expert
Category: General
Satisfied Customers: 62
Experience: Microsoft Word Most Valuable Professional (6 years)
Verified

Each document will have to be opened. You can do it with a VBA procedure:

Option Explicit

Public Sub BatchCountWords()
Dim myFile As String
Dim PathToUse As String
Dim myDoc As Document
Dim lngWordCount As Long
Dim fDialog As FileDialog
Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)
'Get the folder containing the files
With fDialog
.Title = "Select Folder containing the documents to be modified and click OK"
.AllowMultiSelect = False
.InitialView = msoFileDialogViewList
If .Show <> -1 Then
MsgBox "Cancelled By User", , "Batch Count Words"
Exit Sub
End If
PathToUse = fDialog.SelectedItems.Item(1)
If Right(PathToUse, 1) <> "\" Then PathToUse = PathToUse + "\"
End With
'Close any documents that may be open
If Documents.Count > 0 Then
Documents.Close SaveChanges:=wdPromptToSaveChanges
End If
myFile = Dir$(PathToUse & "*.doc")
While myFile <> ""
'Open each file and count the words.
Set myDoc = Documents.Open(PathToUse & myFile)
lngWordCount = lngWordCount + myDoc.ComputeStatistics(wdStatisticWords)
'Close the file, saving the changes.
myDoc.Close SaveChanges:=wdDoNotSaveChanges
myFile = Dir$()
Wend
MsgBox lngWordCount
End Sub

Paste the above code in a standard module of your Normal template. The execute the code.

Press Alt+F11 to open the VB Editor. If not showing, press CTRL+r to display the project explorer. Scroll down and expand the Normal project. Using the insert menu insert a standard code module. Dbl-click the new module and paste the code into the large empty code panel on the right. On the menu click Run then Run Macro.

Thank you for the opportunity to assit you with your Word issue. Please note that this question required programing that would have taken considerable time and effort had I not already had something that was close.

Greg Maxey
Greg Maxey, Consultant\Microsoft Word Expert
Category: General
Satisfied Customers: 62
Experience: Microsoft Word Most Valuable Professional (6 years)
Verified
Greg Maxey and 87 other General Specialists are ready to help you
Ask your own question now
Ask Greg Maxey Your Own Question
Greg Maxey
Greg Maxey
Greg Maxey, Consultant\Microsoft Word Expert
Category: General
Satisfied Customers: 62
62 Satisfied Customers
Experience: Microsoft Word Most Valuable Professional (6 years)

Greg Maxey is online now

A new question is answered every 9 seconds

How JustAnswer works:

  • Ask an ExpertExperts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional AnswerVia email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction GuaranteeRate the answer you receive.

JustAnswer in the News:

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

What Customers are Saying:

Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help.

Mary C.Freshfield, Liverpool, UK

This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!!

AlexLos Angeles, CA

Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult.

GPHesperia, CA

I couldn't be more satisfied! This is the site I will always come to when I need a second opinion.

JustinKernersville, NC

Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around.

EstherWoodstock, NY

Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know.

RobinElkton, Maryland

He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here.

DianeDallas, TX

< Previous | Next >

Meet the Experts:

Ellen

Ellen

Consultant

109 satisfied customers

attorney and legal researcher

P. Simmons

P. Simmons

Attorney

142 satisfied customers

45 years old, retired Marine Officer, current attorney

Kim D.

Kim D.

Consultant

34 satisfied customers

Researcher 25 yrs in small and large institutions

SuperiorConsultant

SuperiorConsultant

Internet Researcher

21 satisfied customers

BBA, serving as Marketing Executive and interested in tourism,sports, and anything and everything!

Cher

Cher

Educator-40+ yrs

1,684 satisfied customers

M.A., B.A., Author, Information & Research Specialist

Michael

Michael

Librarian

1,680 satisfied customers

20+ years as information professional

Martin

Martin

Engineer

876 satisfied customers

i'm 41 and i never stopped studying and experimenting

< Previous | Next >

Related General Questions
Could you do a research? I'd like to find LIPO SUCTION
For Sarah Teacher only: Hi Sarah, could you do a research? I'd like to find LIPO SUCTION surgeons in US that are specialized in ABS ETCHING, the more experienced the better… read more
Sarah
Sarah
Teacher
Master\u0027s Degree
2 satisfied customers
Does Leo guys connect closely and then ignore u totally over
Hi! Does Leo guys connect closely and then ignore u totally over another friend? … read more
Mary Baker
Mary Baker
Owner
BA
38 satisfied customers
I'm just looking for information about the different market
I'm just looking for information about the different market structures. What do I need to do to be able to access the information? … read more
Mary Baker
Mary Baker
Owner
BA
38 satisfied customers
RESEARCH Question: Can -Cola bottle caps with MyCokeRewards
RESEARCH Question: Can Coca-Cola bottle caps with MyCokeRewards codes / points be monetized in any fashion to obtain value from them now that the MyCokeRewards program was shut down by Coca-Cola last … read more
Michael
Michael
Librarian
Bachelor's Degree
1,680 satisfied customers
OnLy:. Could you please do another simple research?
This question is for ***** ***** OnLy: hi Mary . Could you please do another simple research?… read more
Mary Baker
Mary Baker
Owner
BA
38 satisfied customers
How do I call Uber, I am a senior and I need to have someone
How do I call Uber, I am a senior and I need to have someone to take me to Dr. Appointments and I live Oviedo Florida … read more
Michael
Michael
Librarian
Bachelor's Degree
1,680 satisfied customers
I am set for a pet scan tomorrow at 11:30 am. I was told not
I am set for a pet scan tomorrow at 11:30 am. I was told not to eat anything today except for drinking water or chicken broth or beef broth. There must be something I can eat. I have a headache and co… read more
Mary Baker
Mary Baker
Owner
BA
38 satisfied customers
I have BTV wall- safe E 911.bought in approx 2003 Safe is
I have BTV wall- safe E 911.bought in approx 2003 Safe is protected by number and key. unfortunately battery which is needed to type in code is empty. Cannot open safe. Could you be of help? Thanks an… read more
A. Schuyler
A. Schuyler
2,604 satisfied customers
Can someone explain what is trying to be said in this? “I
Can someone explain what is trying to be said in this? “I say, then, that if the temperate soul is good, one that is in the opposite state to this sensible one is bad; and that was the senseless and d… read more
Mary Baker
Mary Baker
Owner
BA
38 satisfied customers
Finishing my masters in Human factors. Have used up my 48
finishing my masters in Human factors. Have used up my 48 allotment for classes. Graduating with a Masters In Human Factor.s What will the government pay me to do my doctorate - like what kind of hous… read more
Mary Baker
Mary Baker
Owner
BA
38 satisfied customers
We are at a bnb and I think it's a scam due to many hygienic
We are at a bnb and I think it's a scam due to many hygienic issues upon arrival. This house was purchased in 2015 according to my search. 3370 Kingsley Place Victoria BC Many lies and discrepancies… read more
Mary Baker
Mary Baker
Owner
BA
38 satisfied customers
I am looking for someone who can help me find a Residential
I am looking for someone who can help me find a Residential Treatment Program for Reactive Attachment Disorder that takes Medicad - Preferrabley in Pennsyvania, Delaware, New Jersey area.… read more
Michael
Michael
Librarian
Bachelor's Degree
1,680 satisfied customers
Just one second. Marion Yu Porclain Girl /25088. Just 25088
Just one second JA: The Expert will know what to do. Please tell me everything you can so the Expert can help you best. Customer: Marion Yu Porclain Girl b/25088 JA: Is there anything else the Expert … read more
Nora
Nora
Accredited Appraiser & Antique Expert
Post-Graduate from Christies London
152 satisfied customers
Teacher only:. Could you please do a little simple research
This question is for Sarah, teacher only: hi Sarah. Could you please do a little simple research for me ?… read more
Sarah
Sarah
Teacher
Master\u0027s Degree
2 satisfied customers
We recently perchashed two Relief Wraps by using the
We recently perchashed two Relief Wraps by using the television advertisement. One wrap was fine, however, the other wrap had a hole in it and the little ball like thing were falling all over the plac… read more
Michael
Michael
Librarian
Bachelor's Degree
1,680 satisfied customers
What would be the best lab to get your drinking we'll water
What would be the best lab to get your drinking we'll water tested for contaminants , also does it help if you specifically mention a chemical your looking for or let them test for everything ? We are… read more
Michael
Michael
Librarian
Bachelor's Degree
1,680 satisfied customers
I am running a small business of 15 people. I am running
I am running a small business of 15 people. I am running into a very serious issue with some of my employees regarding attendance. My main question is, how do companies handle employees calling in sic… read more
Michael
Michael
Librarian
Bachelor's Degree
1,680 satisfied customers
Please find the management companies for these addresses: 60
Please find the management companies for these addresses:***** Jersey City, NJ###-##-####Kennedy boulevard, Jersey City, NJ 07306… read more
Mary Baker
Mary Baker
Owner
BA
38 satisfied customers
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Show MoreShow Less

Ask Your Question

x