Setting Document Backgound color in VBA

T

TechGuy

I have the following code to set the background color to green (got
from recording a macro).

ActiveDocument.Background.Fill.ForeColor.RGB = RGB(0, 128, 0)
ActiveDocument.Background.Fill.Visible = msoTrue
ActiveDocument.Background.Fill.Solid

This doesnt work when i run this back on a new document!
I am running Word 2003 SP3 & using the 'Print Layout' View.

Anything im doing wrong?

Thanks in Advance
Mike H
 
J

Jay Freedman

I have the following code to set the background color to green (got
from recording a macro).

ActiveDocument.Background.Fill.ForeColor.RGB = RGB(0, 128, 0)
ActiveDocument.Background.Fill.Visible = msoTrue
ActiveDocument.Background.Fill.Solid

This doesnt work when i run this back on a new document!
I am running Word 2003 SP3 & using the 'Print Layout' View.

Anything im doing wrong?

Thanks in Advance
Mike H

In Tools > Options > View, check the box for "Background colors and images".
 
Top