MAcro-Excel Watermark

Posted on 2007-07-20
Last Modified: 2013-11-27
I wanted to see if there were any macro's out there that will help me do a watermark in excel. The only ones that I have come across are the ones that put a watermark on the first page and stop there. I wanted to see if there were any more intuitive macro's there which put the watermark on every page in my workbook.
Question by:techtook
    LVL 23

    Expert Comment

    Hi techtook,

    Not sure if you have looked into this, but the easiest way of doing watermarks is through your printer settings (if supported). For me if I do Print -> Options, I have a button to set the watermark.

    If not, then can you please post the code you have and we may be able to rewrite it for you.

    LVL 13

    Accepted Solution

    Try this:

    Sub CreateWatermark()
    Dim intCnt As Integer
    Dim x As Integer
        intCnt = ActiveWorkbook.Worksheets.Count

       ' Begin the loop.
       For x = 1 To intCnt

        ActiveSheet.Shapes.AddTextEffect(msoTextEffect2, "Draft", "Arial Black", 36# _
                            , msoFalse, msoFalse, 320.25, 130.5).Select
        With Selection.ShapeRange
            .Fill.Visible = msoFalse
            .Fill.Transparency = 0#
            .Line.Weight = 0.75
            .Line.DashStyle = msoLineSolid
            .Line.Style = msoLineSingle
            .Line.Transparency = 0#
            .Line.Visible = msoTrue
            .Line.ForeColor.SchemeColor = 22
            .Line.BackColor.RGB = RGB(255, 255, 255)
            .LockAspectRatio = msoFalse
            .Height = 567#
            .Width = 510#
            .Rotation = 0#
            .ScaleWidth 1.56, msoFalse, msoScaleFromBottomRight
            .ScaleHeight 1.2, msoFalse, msoScaleFromBottomRight
        End With
        ActiveWindow.SmallScroll Down:=0
        ActiveWindow.SmallScroll ToRight:=5
        Selection.ShapeRange.ScaleWidth 0.72, msoFalse, msoScaleFromTopLeft
        ActiveWindow.LargeScroll ToRight:=-1
        Selection.ShapeRange.ZOrder msoSendToBack

       Next x

    End Sub

    Featured Post

    Live: Real-Time Solutions, Start Here

    Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

    Join & Write a Comment

    In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
    This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
    The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
    This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now