marcello62
Technical User
Hi there,
I fill a word document from a ms access vba code module using bookmarks.
Now I want some bookmarks to be represented in a color, say green.
I fill the bookmark:
doc.Bookmarks("b1718_1").Range.Text = doc.Bookmarks("b1718_1").Range.Text = Format(rs!mv5_1_10p, "0.0")
This works.
Then I tried:
doc.Bookmarks("b1718_1").Range.HighlightColorIndex = wdBrightGreen
This works, but it makes the whole bookmark green. So the value is put in a green square.
But what I want is the value itself, which is a figure, in green.
I did some research on the internet and found that the following code should work:
doc.Bookmarks("b1718_1").Range.Text = doc.Bookmarks("b1718_1").Range.Text = Format(rs!mv5_1_10p, "0.0")
doc.Bookmarks("b1718_1").Range.Font.ColorIndex = wdBrightGreen
The code compiles, but the value still had forecolor black...
Does anyone know what might help? Any help will be greatly appreciated, thanx
I fill a word document from a ms access vba code module using bookmarks.
Now I want some bookmarks to be represented in a color, say green.
I fill the bookmark:
doc.Bookmarks("b1718_1").Range.Text = doc.Bookmarks("b1718_1").Range.Text = Format(rs!mv5_1_10p, "0.0")
This works.
Then I tried:
doc.Bookmarks("b1718_1").Range.HighlightColorIndex = wdBrightGreen
This works, but it makes the whole bookmark green. So the value is put in a green square.
But what I want is the value itself, which is a figure, in green.
I did some research on the internet and found that the following code should work:
doc.Bookmarks("b1718_1").Range.Text = doc.Bookmarks("b1718_1").Range.Text = Format(rs!mv5_1_10p, "0.0")
doc.Bookmarks("b1718_1").Range.Font.ColorIndex = wdBrightGreen
The code compiles, but the value still had forecolor black...
Does anyone know what might help? Any help will be greatly appreciated, thanx