Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
word counting
I need to have a word count on each page in my document (over 500 pages).
We can only have so many words and lines on each page. I know how to set up the line count but not the word count. Thank you |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
word counting
Step 1: write a macro that selects each page in turn, calculates the word
count, and saves the value as a document variable with a name like Vnnn, where nnn is the page number. Step 2: add a docvariable field to the header or footer where you want to display the value -- { DocVariable { Page \# "V000" } } "Nelda" wrote in message ... I need to have a word count on each page in my document (over 500 pages). We can only have so many words and lines on each page. I know how to set up the line count but not the word count. Thank you |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
word counting
Thank you but I have no idea how to do macros. I forgot to tell you that
I'm just starting. "Jezebel" wrote: Step 1: write a macro that selects each page in turn, calculates the word count, and saves the value as a document variable with a name like Vnnn, where nnn is the page number. Step 2: add a docvariable field to the header or footer where you want to display the value -- { DocVariable { Page \# "V000" } } "Nelda" wrote in message ... I need to have a word count on each page in my document (over 500 pages). We can only have so many words and lines on each page. I know how to set up the line count but not the word count. Thank you |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
word counting
The following macro will create the document variables
Sub InsertNumberofWordsonPage() Dim i As Long Dim Source As Document Dim varname As String Set Source = ActiveDocument Selection.HomeKey Unit:=wdStory Pages = Source.BuiltInDocumentProperties(wdPropertyPages) i = 0 While i Pages i = i + 1 varname = "V" & Format(i, "000") With Source .Variables(varname).Value = ..Bookmarks("\page").Range.ComputeStatistics(wdSta tisticWords) .Bookmarks("\Page").Range.Cut End With Wend Source.Undo (i) End Sub To create the docvariable field { DocVariable { Page \# "V000" } }that Jezebel gave you, you must use Ctrl+F9 for each pair of field delimiters. Make sure you save the document BEFORE running the above macro just in case something goes wrong as it deletes each page of the document and then undoes the deletion. In testing here though, everything worked fine. -- 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 "Nelda" wrote in message ... Thank you but I have no idea how to do macros. I forgot to tell you that I'm just starting. "Jezebel" wrote: Step 1: write a macro that selects each page in turn, calculates the word count, and saves the value as a document variable with a name like Vnnn, where nnn is the page number. Step 2: add a docvariable field to the header or footer where you want to display the value -- { DocVariable { Page \# "V000" } } "Nelda" wrote in message ... I need to have a word count on each page in my document (over 500 pages). We can only have so many words and lines on each page. I know how to set up the line count but not the word count. Thank you |
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
word counting
Thank you for you for trying to help me, but I can't get it to work. It keep
stopping on ..Bookmarks("\page").Range.ComputeStatistics(wdSta tisticWords). I don't know what I have done or haven't done. this stuff really makes a person feel stupid. "Doug Robbins - Word MVP" wrote: The following macro will create the document variables Sub InsertNumberofWordsonPage() Dim i As Long Dim Source As Document Dim varname As String Set Source = ActiveDocument Selection.HomeKey Unit:=wdStory Pages = Source.BuiltInDocumentProperties(wdPropertyPages) i = 0 While i Pages i = i + 1 varname = "V" & Format(i, "000") With Source .Variables(varname).Value = ..Bookmarks("\page").Range.ComputeStatistics(wdSta tisticWords) .Bookmarks("\Page").Range.Cut End With Wend Source.Undo (i) End Sub To create the docvariable field { DocVariable { Page \# "V000" } }that Jezebel gave you, you must use Ctrl+F9 for each pair of field delimiters. Make sure you save the document BEFORE running the above macro just in case something goes wrong as it deletes each page of the document and then undoes the deletion. In testing here though, everything worked fine. -- 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 "Nelda" wrote in message ... Thank you but I have no idea how to do macros. I forgot to tell you that I'm just starting. "Jezebel" wrote: Step 1: write a macro that selects each page in turn, calculates the word count, and saves the value as a document variable with a name like Vnnn, where nnn is the page number. Step 2: add a docvariable field to the header or footer where you want to display the value -- { DocVariable { Page \# "V000" } } "Nelda" wrote in message ... I need to have a word count on each page in my document (over 500 pages). We can only have so many words and lines on each page. I know how to set up the line count but not the word count. Thank you |
#6
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
word counting
The newsgroup introduced an unwanted line break, and I think Doug got an
extra dot in that line by mistake. These two lines should be combined into one line, with only one dot before "Bookmarks": .Variables(varname).Value = ..Bookmarks("\page").Range.ComputeStatistics(wdSta tisticWords) -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. Nelda wrote: Thank you for you for trying to help me, but I can't get it to work. It keep stopping on ..Bookmarks("\page").Range.ComputeStatistics(wdSta tisticWords). I don't know what I have done or haven't done. this stuff really makes a person feel stupid. "Doug Robbins - Word MVP" wrote: The following macro will create the document variables Sub InsertNumberofWordsonPage() Dim i As Long Dim Source As Document Dim varname As String Set Source = ActiveDocument Selection.HomeKey Unit:=wdStory Pages = Source.BuiltInDocumentProperties(wdPropertyPages) i = 0 While i Pages i = i + 1 varname = "V" & Format(i, "000") With Source .Variables(varname).Value = ..Bookmarks("\page").Range.ComputeStatistics(wdSta tisticWords) .Bookmarks("\Page").Range.Cut End With Wend Source.Undo (i) End Sub To create the docvariable field { DocVariable { Page \# "V000" } }that Jezebel gave you, you must use Ctrl+F9 for each pair of field delimiters. Make sure you save the document BEFORE running the above macro just in case something goes wrong as it deletes each page of the document and then undoes the deletion. In testing here though, everything worked fine. -- 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 "Nelda" wrote in message ... Thank you but I have no idea how to do macros. I forgot to tell you that I'm just starting. "Jezebel" wrote: Step 1: write a macro that selects each page in turn, calculates the word count, and saves the value as a document variable with a name like Vnnn, where nnn is the page number. Step 2: add a docvariable field to the header or footer where you want to display the value -- { DocVariable { Page \# "V000" } } "Nelda" wrote in message ... I need to have a word count on each page in my document (over 500 pages). We can only have so many words and lines on each page. I know how to set up the line count but not the word count. Thank you |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I "reveal codes" in Word the way I could in Word Perfect? | Microsoft Word Help | |||
WP merge file to Word | Tables | |||
How can Word display full path of a file in the title bar? | Microsoft Word Help | |||
Does Word have a QuickCorrect/Quick Word option like WordPerfect? | New Users | |||
Envelope Address | New Users |