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".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top