View Single Post
  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Printing Only Pages with Changes

The following revised version should work:

Dim revpage As Long, pageprint As String
pageprint = 0
With ActiveDocument
For i = 1 To .Revisions.Count
.Revisions(i).Range.Select
Selection.Collapse wdCollapseStart
revpage = Selection.Information(wdActiveEndPageNumber)
If revpage pageprint Then
pageprint = revpage
Else
GoTo Skip
End If
MsgBox pageprint
.PrintOut Range:=wdPrintRangeOfPages, Copies:=1, Pages:=pageprint
Skip:
Next i
End With


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




billbrandi wrote:
Thanks. When I ran the macro I got an error number 13, type
mismatch. Here is the line where the error occured:

.PrintOut Pages:=pageprint

Not being familiar with macros I was unsure how resolve.



"Doug Robbins - Word MVP" wrote:

If you run a macro containing the following code, it should only
print the pages on which there are revisions:

Dim revpage As Long, pageprint As Long
pageprint = 0
With ActiveDocument
For i = 1 To .Revisions.Count
.Revisions(i).Range.Select
Selection.Collapse wdCollapseStart
revpage = Selection.Information(wdActiveEndPageNumber)
If revpage pageprint Then
pageprint = revpage
.PrintOut Pages:=pageprint
End If
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

"billbrandi" wrote in message
...
After modifying a Word document and using the "track changes"
option, is there a way to print only those pages with changes
(short of going through the entire document and printing pages one
by one)?

Thanks
Bill