-----Original Message-----
The Print Watermark dialog is not exposed via VBA.
You can create a Watermark programmatically.
If you want to give the user a dialog to choose the picture or text, you
could use a VBA Userform to simulate the builtin dialog.
The easiest way to get the syntax to add a Watermark is to record a macro
then review it and modify it as needed.
This is the results of the recorded macro (the names were changed to protect
the guilty)
Sub AddWaterMark()
ActiveDocument.Sections(1).Range.Select
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Selection.HeaderFooter.Shapes.AddPicture(FileName:= _
"C:\Documents and Settings\[userName\My Documents\My
Pictures\xxxx.png" _
, LinkToFile:=False, SaveWithDocument:=True).Select
Selection.ShapeRange.Name = "WordPictureWatermark1"
Selection.ShapeRange.PictureFormat.Brightness = 0.85
Selection.ShapeRange.PictureFormat.Contrast = 0.15
Selection.ShapeRange.LockAspectRatio = True
Selection.ShapeRange.Height = InchesToPoints(7.77)
Selection.ShapeRange.Width = InchesToPoints(6)
Selection.ShapeRange.WrapFormat.AllowOverlap = True
Selection.ShapeRange.WrapFormat.Side = wdWrapNone
Selection.ShapeRange.WrapFormat.Type = 3
Selection.ShapeRange.RelativeHorizontalPosition = _
wdRelativeVerticalPositionMargin
Selection.ShapeRange.RelativeVerticalPosition = _
wdRelativeVerticalPositionMargin
Selection.ShapeRange.Left = wdShapeCenter
Selection.ShapeRange.Top = wdShapeCenter
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
End Sub
regards,
--
Harold Kless, MCSD
Support Professional
Microsoft Technical Support for Business Applications
(e-mail address removed)
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Gill said:
Does anyone know the vba code to display the "Print
Watermark" dialog box generally accessed from Format >
Background > Printed Watermark. It appears that you
can't access this object in either vba or by trying to
assign a keyboard shortcut.
Version bying used - Word XP 2002
Thanks in advance to anyone that can shed some light on
this.
.