Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Wed, 24 Sep 2008 07:43:01 -0700,    group: microsoft.public.word.vba.general        back       


Clearing background color on text in word 2007   
I have a large document in which I have filled the character cells with a 
colour to highlight for me, while editing, that it needs additional treatment.

Problem is, I have to generate a print a copy of the document for my advisor 
to read. Is there anyway I can run a macro to clear the highlights in the 
whole document easily?
-- 
Ken Smith
date: Wed, 24 Sep 2008 07:43:01 -0700   author:   Ken

Re: Clearing background color on text in word 2007   
It would help to know how you applied the formatting and to what, but from 
your description it seems you may be discussing a table with background 
colouring in some cells. The following will remove all the background 
colouring in table cells in a document, and print the document to the 
currently active printer before restoring the document with the cell 
colouring intact.

Dim sTable As Table
Dim myDoc As Document
Dim docName As String
Set myDoc = ActiveDocument
myDoc.Save
docName = myDoc.FullName
For i = 1 To myDoc.Tables.Count
    Set sTable = myDoc.Tables(i)
    sTable.Select
    With Selection.Shading
        .Texture = wdTextureNone
        .ForegroundPatternColor = wdColorAutomatic
        .BackgroundPatternColor = wdColorAutomatic
    End With
Next i
myDoc.PrintOut
myDoc.Close wdDoNotSaveChanges
Documents.Open docName


-- 
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

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


Ken wrote:
> I have a large document in which I have filled the character cells
> with a colour to highlight for me, while editing, that it needs
> additional treatment.
>
> Problem is, I have to generate a print a copy of the document for my
> advisor to read. Is there anyway I can run a macro to clear the
> highlights in the whole document easily?
date: Thu, 25 Sep 2008 11:37:48 +0300   author:   Graham Mayor

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us