can i put the word count automatically at the end of a document?

P

paidperpage

i would like the "word count" to print at the end of a document
automatically. The word count is important because i am paid per word for
typing the document.
 
G

garfield-n-odie

Insert a { DOCPROPERTY Words } field where you want the word count to
appear.
 
D

Daiya Mitchell

At the end of the doc, use Insert | Field to insert a NumWords field.

To make sure it is accurate when you print, in Tools | Options, Print, check
the box to update fields on printing.
 
G

Greg

You can run the following macro:
Sub Test()
Dim wCount As String
Selection.EndKey Unit:=wdStory
wCount = ActiveDocument.ComputeStatistics(wdStatisticWords)
Selection.TypeText Text:=Chr(13) & "This document contains " _
& wCount & " words."
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