Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
how to add a running word count
i want to add a running word count at the end of every page on my essay and
is it able to do it automatically? i am using Microsoft Word 2007 |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
how to add a running word count
You cannot do it automatically. However, if you run a macro containing the
following code when your document is the active document, it will create a new document with each page of your document in a separate Section and with the running word count in the footer of each Section. Dim Counter As Long, i As Long Dim Source As Document, Target As Document Dim rngTarget As Range Dim strPages As String Dim arrPagee As Variant Set Source = ActiveDocument Set Target = Documents.Add Source.Activate Selection.HomeKey Unit:=wdStory Pages = Source.BuiltInDocumentProperties(wdPropertyPages) Counter = 0 strPages = "" While Counter Pages Counter = Counter + 1 With Source.Bookmarks("\Page").Range strPages = strPages & "|" & .Words.Count .Copy End With Set rngTarget = Target.Range rngTarget.Collapse wdCollapseEnd rngTarget.Paste Set rngTarget = Target.Range rngTarget.Collapse wdCollapseEnd rngTarget.InsertBreak wdSectionBreakNextPage Selection.GoTo What:=wdGoToPage, Which:=wdGoToNext, Count:=1 Wend arrPages = Split(strPages, "|") Counter = 0 With Target For i = 1 To .Sections.Count - 1 With .Sections(i).Footers(wdHeaderFooterPrimary) .LinkToPrevious = False Counter = Counter + Val(arrPages(i)) .Range.Text = Counter End With Next i End With -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP, originally posted via msnews.microsoft.com "Shejju" wrote in message ... i want to add a running word count at the end of every page on my essay and is it able to do it automatically? i am using Microsoft Word 2007 |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I get a running header with running page numbers? | Page Layout | |||
Count of words in Word 2007 and count in 2003 are different | Microsoft Word Help | |||
How do I get word count to count my headers and footers? | Microsoft Word Help | |||
Word's word count feature should be able to count sentences also | Microsoft Word Help | |||
A word count that appears next to the page count | Microsoft Word Help |