Through an Access database I am exporting data to a word document. In this particular section, it is a table being filled with data.
There is one column that needs to be coloured, that has the set values
+
-
+/-
the plus need to be green, and the minus red. I can colour the single ones, the issue is colouring the characters in "+/-", as I don't want to colour the whole cell the same.
a find/replace wouldn't help, as it would also change the single ones.
I thought I would ask on here as people would be more likely to know about word vba. Any ideas?
There is one column that needs to be coloured, that has the set values
+
-
+/-
the plus need to be green, and the minus red. I can colour the single ones, the issue is colouring the characters in "+/-", as I don't want to colour the whole cell the same.
a find/replace wouldn't help, as it would also change the single ones.
Code:
If rL.Fields(2) = "'+" Then
oTable.Cell(PositionA, 3).Range.Font.ColorIndex = wdGreen
ElseIf rL.Fields(2) = "'-" Then
oTable.Cell(PositionA, 3).Range.Font.ColorIndex = wdRed
End If
I thought I would ask on here as people would be more likely to know about word vba. Any ideas?