Can I apply watermarks globally to documents in folders?

T

TACK-Y

I want all documents in a folder to be rpinted with a watermark stating
"unofficial copy," without having to add that watermark to each document in
the folder.
 
T

Tony Jollans

Maybe your printer has functionality to do that without needing to do
anything in Word. If not, you'll probably be best with an Open Macro in the
Template, but that may depend on how you're doing the printing and whether
or not it's a one-off exercise. I'm not sure off the top of my head but I
think that code for Watermarks may differ according to Word Version, so if
you need more help, please tell us what you're using, but here is a starting
point:

Application.ScreenUpdating = False
For Each s In ActiveDocument.Sections
For Each h In s.Headers
With h.Shapes.AddTextEffect(WhyMustISupplyThis, "Unofficial Copy", _
"Arial", 16, msoFalse, msoFalse, 0, 0)
.Line.Visible = False
With .Fill
.Visible = True
.Solid
.Transparency = 0.5
.ForeColor.RGB = RGB(192, 192, 192)
End With
With .WrapFormat
.AllowOverlap = True
.Side = wdWrapNone
.Type = wdWrapNone
End With
.Rotation = 315
.LockAspectRatio = True
.Width = s.PageSetup.PageWidth
.Left = wdShapeCenter
.Top = wdShapeCenter
.RelativeHorizontalPosition = wdRelativeVerticalPositionMargin
.RelativeVerticalPosition = wdRelativeVerticalPositionMargin
End With
Next h, s
 
J

Jay Freedman

If we can take the original request literally, it isn't necessary to add the
watermark to each document permanently. Instead, you can write a FilePrint
macro in a global template (and probably a FilePrintDefault macro as well)
to intercept the Print command. At the start of this macro, include the code
to put in the watermark; then call Dialogs(wdDialogFilePrint).Show (or for
the FilePrintDefault macro, call ActiveDocument.PrintOut Background:=False);
and finally call ActiveDocument.Undo to remove the watermark.

As a refinement, the macro can check the ActiveDocument.Path to be sure the
document is in the specified folder before adding the watermark.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 

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