Watermark Macros for 400 staff RRS feed

  • Question

  • Hi

    I am currently setting up a tab in word 2013 that houses numerous macros to enable all staff to quickly enter what they need into legal documents.

    I am however, having huge difficulty with inserting watermarks. As soon as I close the template down the macro breaks. This is an example of what I have so far. The watermark is an image, saved in a folder all staff have access to. The following macro should place PREP as a watermark.

    Sub PREP()
    ' PREP Macro
        ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
        ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
        ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
        Selection.HeaderFooter.Shapes.AddPicture(FileName:= _
            "E:\IT\MS Office 2013\PREP Watermark.png", LinkToFile:=False, _
        Selection.ShapeRange.Name = "WordPictureWatermark"
        Selection.ShapeRange.PictureFormat.Brightness = 0.5
        Selection.ShapeRange.PictureFormat.Contrast = 0.5
        Selection.ShapeRange.LockAspectRatio = True
        Selection.ShapeRange.Height = CentimetersToPoints(14.34)
        Selection.ShapeRange.Width = CentimetersToPoints(15.92)
        Selection.ShapeRange.WrapFormat.AllowOverlap = True
        Selection.ShapeRange.WrapFormat.Side = wdWrapNone
        Selection.ShapeRange.WrapFormat.Type = 3
        Selection.ShapeRange.RelativeHorizontalPosition = _
        Selection.ShapeRange.RelativeVerticalPosition = _
        Selection.ShapeRange.Left = wdShapeCenter
        Selection.ShapeRange.Top = wdShapeCenter
        ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
    End Sub

    Any help on what I am doing wrong would be greatly appreciated. I have 5 of these to create



    Tuesday, July 12, 2016 8:38 AM

All replies

  • >>>I am however, having huge difficulty with inserting watermarks. As soon as I close the template down the macro breaks.

    According to your description, I have made a sample with your sample code, I don't get any error, this macro can insert watermarks correctly.

    So I suggest that you could provide more information about your issue, for example screenshot, errors etc., that will help us resolve it.

    Thanks for your understanding.

    • Proposed as answer by David_JunFeng Wednesday, July 20, 2016 2:25 PM
    Wednesday, July 13, 2016 7:03 AM