Re: non-printing table cell shading
From: Lee (me_at_privacy.net)
Date: 09/07/04
- Next message: KR: "treeview key property? how to set?"
- Previous message: ans: "clear every entered value in a userform"
- In reply to: Word Heretic: "Re: non-printing table cell shading"
- Next in thread: Chad DeMeyer: "Re: non-printing table cell shading"
- Reply: Chad DeMeyer: "Re: non-printing table cell shading"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 7 Sep 2004 11:00:30 +0100
"Word Heretic" <myfullname@tpg.com.au> wrote in message
news:gtupj01210isd7act6va6k9fv0mqhurnp2@4ax.com...
> G'day "Lee" <me@privacy.net>,
>
> Yes, you can iterate each Table in the ActiveDocumet.Tables
> collection, then iterate each cell in that Table's range, and turn off
> shading. You would do this on a throw-away copy of your document,
> publish/distribute it and revert to your development source with
> shading intact.
>
>
Hello Mr Heretic
Thanks for the reply.
I was not too sure what you meant by a "throw-away" copy of the doc but I
did find a way to do it.
In case this helps someone else one day:
a) Create a sub routine that replaces the File -> Print... menu option:
Public Sub FilePrint()
b) Convert the relevant cell backgrounds (in my case these are in two
tables) to white (column 2 below the table heading in each case):
Dim i As Integer, n As Long
i = ActiveDocument.Tables(3).Rows.Count
For n = 2 To i
With ActiveDocument.Tables(3).Cell(n, 2)
.Shading.BackgroundPatternColor = wdColorWhite
End With
Next n
With ActiveDocument.Tables(4).Cell(2, 2)
.Shading.BackgroundPatternColor = wdColorWhite
End With
c) Print the document:
ActiveDocument.PrintOut
d) Replace the colour backgrounds:
For n = 2 To i
With ActiveDocument.Tables(3).Cell(n, 2)
.Shading.BackgroundPatternColor = wdColorLightGreen
End With
Next n
With ActiveDocument.Tables(4).Cell(2, 2)
.Shading.BackgroundPatternColor = wdColorLightGreen
End With
e) Close the sub-routine:
End Sub
f) Point the default print button to the same subroutine:
Public Sub FilePrintDefault()
Call FilePrint
End Sub
I am a real beginner to all this so any comments or improvements very
welcome.
Lee
- Next message: KR: "treeview key property? how to set?"
- Previous message: ans: "clear every entered value in a userform"
- In reply to: Word Heretic: "Re: non-printing table cell shading"
- Next in thread: Chad DeMeyer: "Re: non-printing table cell shading"
- Reply: Chad DeMeyer: "Re: non-printing table cell shading"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|