How to count words in sections using Word 2007, when EndNote used?

D

Dianne Griffin

I need to find how to count words in a manuscript's sections in Word 2007.
The citation add in EndNote has been used for the citations.
 
M

macropod

Hi Dianne,

For a given Section, you could use something based on the following macro:

Sub SectionWordCount()
Dim iSct As Integer
Dim iCount1 As Integer
Dim iCount2 As Integer
Dim iCount3 As Integer
iCount1 = 0
iCount2 = 0
iCount3 = 0
Dim oFoot As Footnote
Dim oEnd As Endnote
iSct = Selection.Information(wdActiveEndSectionNumber)
With ActiveDocument.Sections(iSct)
iCount1 = .Range.ComputeStatistics(wdStatisticWords)
For Each oFoot In .Range.Footnotes
iCount2 = iCount2 + oFoot.Range.ComputeStatistics(wdStatisticWords)
Next
For Each oEnd In .Range.Endnotes
iCount3 = iCount3 + oEnd.Range.ComputeStatistics(wdStatisticWords)
Next
End With
MsgBox Prompt:="Body: " & iCount1 & vbTab & _
"Footnotes: " & iCount2 & vbTab & "Endnotes: " & iCount3 & vbTab & _
"Total: " & iCount1 + iCount2 + iCount3, Title:=" Word Count for Section " & iSct
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top