Quote:
Originally Posted by mpdsal
Unless I am missing something, when you select a cell within a table and use the copy/paste function it only pastes the related text not the background format.
|
My Bad - I was thinking that one of the PasteAndFormat options preserved shading info. Nevertheless, you could use something like:
Code:
Sub Demo()
Dim lBkClr As Long, lFrClr As Long, i As Long
With ActiveDocument.Tables(1).Range
For i = 1 To .Cells.Count
With .Cells(i)
.Range.Copy
lBkClr = .Shading.BackgroundPatternColor
lFrClr = .Shading.ForegroundPatternColor
End With
With ActiveDocument.Tables(2).Range.Cells(i)
.Range.Paste
.Shading.BackgroundPatternColor = lBkClr
.Shading.ForegroundPatternColor = lFrClr
End With
Next
End With
Quote:
Also if you use bookmarks it only references the text of the cell none of the shading.
|
Not so if you're replicating the entire table. Furthermore, if you bookmark an entire cell, the entire cell will be replicated, including its borders & shading in the cross-reference.