J
Joe
I am using Word 2002
I can not reset the background color in a table and the color problem continues until the end of the report
Here is a sample of the code; I can't include all of the code - there is way too much...
With wdApp.ActiveDocument.Selectio
.Font.Bold = Tru
.Font.Size = 1
.Font.Color = wdColorWhit
.Font.Shading.BackgroundPatternColor = wdColorGree
.TypeText Text:=vbTab & "ACQUISITION" & vbTa
.Font.Bold = Fals
.Font.Size = 1
.Font.Color = wdColorBlac
.Font.Shading.BackgroundPatternColor = wdColorWhit
.Font.Shading.BackgroundPatternColorIndex = wdWhit
.TypeParagrap
.TypeParagrap
' --- ECHO MODALITIES --
' Count how many echo carts have been selecte
iModalityCount =
For i = 1 To 1
If wbk.Worksheets("Echo").Range("ModCart" & i) <> "<Select>" The
iModalityCount = iModalityCount +
End I
Nex
' If any modalities have been selected, create a list and add the
If iModalityCount > 0 The
iStartColRow = wbk.Worksheets("Echo").Range("ModalityList").Ro
iStartColCol = wbk.Worksheets("Echo").Range("ModalityList").Colum
Call displayInfoBox("Background = White is " & (.Font.Shading.BackgroundPatternColor = wdColorWhite)
.Font.Bold = Tru
.TypeText "Echo Cart Connectivity" <----- this appears with white background which is what I wan
.Font.Bold = Fals
.TypeParagrap
' Create table to hold echo cart modalitie
.Font.Shading.BackgroundPatternColor = wdColorWhit
.Tables.Add Range:=.Range, NumRows:=iModalityCount + 1, NumColumns:=
iLastTable = .Tables.Coun
.Tables(iLastTable).Cell(1, 1).Selec
.Range.Font.Bold = Tru
.TypeText "Echo Cart" <----- this appears with green background which is what I wan
.Shading.BackgroundPatternColor = wdColorGray1
.Tables(iLastTable).Cell(1, 2).Selec
.Range.Font.Bold = Tru
.TypeText "Network
.Shading.BackgroundPatternColor = wdColorGray1
.Tables(iLastTable).Cell(1, 3).Selec
.Range.Font.Bold = Tru
.TypeText "Description
.Shading.BackgroundPatternColor = wdColorGray1
.Tables(iLastTable).Cell(1, 4).Selec
.Range.Font.Bold = Tru
.TypeText "Notes
.Shading.BackgroundPatternColor = wdColorGray1
Why does the background color in the table switch back to green
Thanks
Jo
I can not reset the background color in a table and the color problem continues until the end of the report
Here is a sample of the code; I can't include all of the code - there is way too much...
With wdApp.ActiveDocument.Selectio
.Font.Bold = Tru
.Font.Size = 1
.Font.Color = wdColorWhit
.Font.Shading.BackgroundPatternColor = wdColorGree
.TypeText Text:=vbTab & "ACQUISITION" & vbTa
.Font.Bold = Fals
.Font.Size = 1
.Font.Color = wdColorBlac
.Font.Shading.BackgroundPatternColor = wdColorWhit
.Font.Shading.BackgroundPatternColorIndex = wdWhit
.TypeParagrap
.TypeParagrap
' --- ECHO MODALITIES --
' Count how many echo carts have been selecte
iModalityCount =
For i = 1 To 1
If wbk.Worksheets("Echo").Range("ModCart" & i) <> "<Select>" The
iModalityCount = iModalityCount +
End I
Nex
' If any modalities have been selected, create a list and add the
If iModalityCount > 0 The
iStartColRow = wbk.Worksheets("Echo").Range("ModalityList").Ro
iStartColCol = wbk.Worksheets("Echo").Range("ModalityList").Colum
Call displayInfoBox("Background = White is " & (.Font.Shading.BackgroundPatternColor = wdColorWhite)
.Font.Bold = Tru
.TypeText "Echo Cart Connectivity" <----- this appears with white background which is what I wan
.Font.Bold = Fals
.TypeParagrap
' Create table to hold echo cart modalitie
.Font.Shading.BackgroundPatternColor = wdColorWhit
.Tables.Add Range:=.Range, NumRows:=iModalityCount + 1, NumColumns:=
iLastTable = .Tables.Coun
.Tables(iLastTable).Cell(1, 1).Selec
.Range.Font.Bold = Tru
.TypeText "Echo Cart" <----- this appears with green background which is what I wan
.Shading.BackgroundPatternColor = wdColorGray1
.Tables(iLastTable).Cell(1, 2).Selec
.Range.Font.Bold = Tru
.TypeText "Network
.Shading.BackgroundPatternColor = wdColorGray1
.Tables(iLastTable).Cell(1, 3).Selec
.Range.Font.Bold = Tru
.TypeText "Description
.Shading.BackgroundPatternColor = wdColorGray1
.Tables(iLastTable).Cell(1, 4).Selec
.Range.Font.Bold = Tru
.TypeText "Notes
.Shading.BackgroundPatternColor = wdColorGray1
Why does the background color in the table switch back to green
Thanks
Jo