?
Solved

MAcro-Excel Watermark

Posted on 2007-07-20
2
Medium Priority
?
676 Views
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.
0
Comment
Question by:techtook
2 Comments
 
LVL 23

Expert Comment

by:MalicUK
ID: 19532174
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.

Cheers,
MalicUK.
0
 
LVL 13

Accepted Solution

by:
adraughn earned 1000 total points
ID: 19532218
Try this:

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

   ' Begin the loop.
   For x = 1 To intCnt

    Worksheets(x).Select
    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
    Range("A1").Select

   Next x

End Sub
   
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
Sometimes MS breaks things just for fun... In Access 2003, only the maximum allowable SQL string length could cause problems as you built a recordset. Now, when using string data in a WHERE clause, the 'identifier' maximum is 128 characters. So, …
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

839 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