Hi:
A watermark attribute does exist. But, it only works for the HTML destination (not RTF). In ODS HTML, the watermark attribute allows you to "specify whether or not to make the image that is specified by BACKGROUNDIMAGE= into a "watermark." A watermark appears in a fixed position as the window is scrolled." (this description is straight from the documentation.) The value for WATERMARK is either ON or OFF (because it works in conjunction with BACKGROUNDIMAGE).
However, there is one thing you can try. Since Microsoft Word can read an HTML file, you could create an HTML file using BACKGROUNDIMAGE and WATERMARK (as shown below) and then open the HTML file with Microsoft Word. Once it's in Word, you can either save it as a .DOC file or save it as an RTF file. The image will be tiled in the browser and will also be tiled when Word opens it. Therefore, you should try to make the image very close in size to what you want the watermark to be in order to minimize tiling.
Here's the sample code...where I have kermit.jpg specified below, you would insert the name of your image file to be the watermark. You need the change to the style template because the table (in this case, from PROC REPORT), sits on the BODY of the HTML document. Therefore, you want to modify the BACKGROUNDIMAGE for the BODY of the document.
[pre]
ods path work.wmark(update)
sashelp.tmplmst(read);
proc template;
define style styles.water;
parent=styles.sasweb;
style body from body /
backgroundimage='kermit.jpg'
watermark=on;
end;
run;
ods msoffice2k path='c:\temp' (url=none)
file='test_watermark.doc' style=styles.water;
proc report data=sashelp.class nowd;
column name age height;
run;
ods msoffice2k close;
[/pre]
I do not know whether there's a way using RTF control strings to specify a watermark.
In the Microsoft Word help (I start there because Microsoft wrote the RTF specification) -- it says that watermarks are intended for a PRINTED document. MS Word help says:
"On the Format menu, point to Background, and then click Printed Watermark"
If I follow those instructions and insert a picture to be used as a watermark AND then save the file as an RTF file, it looks to me like my picture has been converted to RTF format and is inserted with a \pict control string. However, \pict does NOT point to my original picture...it is followed by the RTF graphics version of the picture. According to the RTF 1.5 spec, which I found here,
[pre]http://www.biblioscape.com/rtf15_spec.htm
[/pre]
"An RTF file can include pictures created with other applications. These pictures can be in hexadecimal (the default) or binary format. Pictures are destinations, and begin with the \pict control word. The \pict keyword is preceded by \*\shppict destination control keyword as described in the following example."
So if you can live with creating an HTML file and then instructing folks to open the HTML file with Word, this may be a solution that works for you. If you need to generate an RTF file with a watermark, then I do not believe that ODS can help you right now. I do not know whether future plans for RTF (or some other MS Word Markup Language) include plans for Watermark support.
cynthia
... View more