View Single Post
 
Old 11-13-2011, 03:31 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Christine,

Try the following:
Code:
Sub PartPrint()
Application.ScreenUpdating = False
Dim RngClr As Range, RngSel As Range, oTbl As Table, oCel As Cell, i As Long
With ActiveDocument
  Set RngSel = Selection.Range
  Set RngClr = .GoTo(What:=wdGoToPage, Name:=RngSel.Characters.First.Information(wdActiveEndPageNumber))
  Set RngClr = RngClr.GoTo(What:=wdGoToBookmark, Name:="\page")
  With RngClr
    .End = RngSel.Start
    .Font.Color = wdColorWhite
    If RngSel.Characters.First.Information(wdWithInTable) = True Then
      For Each oTbl In RngClr.Tables
        If oTbl.Range.End < RngSel.Tables(RngSel.Tables.Count).Range.End Then
          For Each oCel In oTbl.Range.Cells
            For i = 1 To oCel.Borders.Count
              oCel.Borders(i).Color = wdColorWhite
            Next
          Next
        Else
          For Each oCel In oTbl.Range.Cells
            If oCel.Row.Index < RngSel.Rows.First.Index Then
              For i = 1 To oCel.Borders.Count
                oCel.Borders(i).Color = wdColorWhite
              Next
            End If
          Next
        End If
      Next
    Else
      For Each oTbl In RngClr.Tables
        For Each oCel In oTbl.Range.Cells
          For i = 1 To oCel.Borders.Count
            oCel.Borders(i).Color = wdColorWhite
          Next
        Next
      Next
    End If
  End With
  Application.PrintOut Range:=wdPrintFromTo, _
    From:=CStr(RngSel.Characters.First.Information(wdActiveEndPageNumber)), _
    To:=CStr(.Range.Characters.Last.Information(wdActiveEndPageNumber))
  While RngClr.Font.Color = wdColorWhite
    .Undo
  Wend
  RngSel.Select
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote