Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.formatting.longdocs
|
|||
|
|||
Counting the number of pages that contain highlighting
I have a kind of strange request.
We have a series of relatively long documents that have gone through several reviews over the period of a year. Each time we have made the client's changes from a review, we have saved a copy of the documents with the changed paragraphs highlighted. Now the client is asking us how many pages of these documents we have changed in each of the reviews. Is there a way to automate a search for this? I know we can do a "Find" for "Format: Highlight" but is there a way to add up all the instances it finds and tally up the number of pages on which it found a highlighted area? Thanks. |
#2
Posted to microsoft.public.word.formatting.longdocs
|
|||
|
|||
Counting the number of pages that contain highlighting
This is problematic first of all because a Word page isn't a page until
it is displayed on a screen or printed on paper. That done, page shown on my screen or from my printer may very well be different that that shown on yours. For an excellent explanation of all of this see: http://daiya.mvps.org/wordpages.htm That said, a crude method, and it would only account for highlighting in the main text story range (e.g., headers, footers, footnotes, etc. are ignored) would look something like this: Sub ScratchMacro() Dim oRng1 As Word.Range Dim oRng2 As Word.Range Dim oCount As Long ActiveDocument.Bookmarks("\startofdoc").Select Set oRng1 = Selection.Range Do Set oRng1 = ActiveDocument.Bookmarks("\Page").Range Set oRng2 = oRng1.Duplicate With oRng2.Find .Highlight = True .Execute If .Found = True Then oCount = oCount + 1 End If oRng1.Collapse wdCollapseEnd oRng1.Move wdCharacter, 1 oRng1.Select End With Loop Until oRng1.End = ActiveDocument.Range.End - 1 MsgBox oCount End Sub ChristyW wrote: I have a kind of strange request. We have a series of relatively long documents that have gone through several reviews over the period of a year. Each time we have made the client's changes from a review, we have saved a copy of the documents with the changed paragraphs highlighted. Now the client is asking us how many pages of these documents we have changed in each of the reviews. Is there a way to automate a search for this? I know we can do a "Find" for "Format: Highlight" but is there a way to add up all the instances it finds and tally up the number of pages on which it found a highlighted area? Thanks. |
#3
Posted to microsoft.public.word.formatting.longdocs
|
|||
|
|||
Counting the number of pages that contain highlighting
Thanks, Greg!
That works great for what we need. As I said, it was kind of a strange request. The number of pages doesn't really reflect the information our client should be asking for -- some highlighted pages have several revisions, and some have only one. But this gives us what they have asked for without someone having to manually count the pages, so thank you! Christy "Greg Maxey" wrote in message oups.com... This is problematic first of all because a Word page isn't a page until it is displayed on a screen or printed on paper. That done, page shown on my screen or from my printer may very well be different that that shown on yours. For an excellent explanation of all of this see: http://daiya.mvps.org/wordpages.htm That said, a crude method, and it would only account for highlighting in the main text story range (e.g., headers, footers, footnotes, etc. are ignored) would look something like this: Sub ScratchMacro() Dim oRng1 As Word.Range Dim oRng2 As Word.Range Dim oCount As Long ActiveDocument.Bookmarks("\startofdoc").Select Set oRng1 = Selection.Range Do Set oRng1 = ActiveDocument.Bookmarks("\Page").Range Set oRng2 = oRng1.Duplicate With oRng2.Find .Highlight = True .Execute If .Found = True Then oCount = oCount + 1 End If oRng1.Collapse wdCollapseEnd oRng1.Move wdCharacter, 1 oRng1.Select End With Loop Until oRng1.End = ActiveDocument.Range.End - 1 MsgBox oCount End Sub ChristyW wrote: I have a kind of strange request. We have a series of relatively long documents that have gone through several reviews over the period of a year. Each time we have made the client's changes from a review, we have saved a copy of the documents with the changed paragraphs highlighted. Now the client is asking us how many pages of these documents we have changed in each of the reviews. Is there a way to automate a search for this? I know we can do a "Find" for "Format: Highlight" but is there a way to add up all the instances it finds and tally up the number of pages on which it found a highlighted area? Thanks. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to number pages in Word document "1 of 10", "2 of 10", etc. | Page Layout | |||
headers: different page number placement for odd and even pages | New Users | |||
How do I number pages on doumect except first two pages | New Users | |||
page number positioning and format | Page Layout | |||
Printing total number of pages in a section | Microsoft Word Help |