Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Background-image for Header ?

Status
Not open for further replies.

pbb72

Programmer
Mar 27, 2004
38
NO
Is it possible in Microsoft Word to create a style that automatically adds a background image to every "Heading 1"? In CSS, this would be something like

H1 {background-image: url('image.gif');}

Is this in any way possible in Word? I need this, because the company style that I need to make a Word template for, needs a richly decorated Heading 1 style.
One possibility I have been thinking of, is applying a bullit style to Heading 1, where the bullit is made of a custom designed TrueType Font that contains the decoration as a character. However, this way I am only able to use a single color for the decoration.
Is there a more flexible way to get what I need?

Thanks, Peter
 
I do not believe so. You CAN alter a Style (be it Heading 1 or whatever) to be a frame that can hold an image. However, the actual bit-map is NOT stored with the Style. Any application of the style will return an empty frame. The style is a property of the paragraph mark, as is a frame. But the data, the image is not. There is only a pointer.

So if you create a style with an image, and you apply a second instance of that style, the second instance will be empty. Images have to be applied explicitly to each paragraph mark.

I would love to be proved incorrect. The only way to do it is via code. You could search for each instance of the Style, select the paragraph mark and use
Selection.InlineShapes.AddPicture FileName:= blah blah, to insert an image into that paragraph.

Kludgey, and it is not really a style.

Gerry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top