Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Aug 2002
    Phoenix, Arizona, USA
    Thanked 0 Times in 0 Posts

    Macro for inserting watermark (Outlook 2002 SP3)

    I have created the watermark I want and saved it as a document. Now I need a macro that will insert this watermark into the header or footer of any given document. Does anyone have such a macro already? If not, if one of you macro writers could write one for me, I would be forever grateful.

  2. #2
    Uranium Lounger
    Join Date
    Dec 2000
    Los Angeles Area, California, USA
    Thanked 0 Times in 0 Posts

    Re: Macro for inserting watermark (Outlook 2002 SP3)

    Hi Jan:
    Two things. First, I'm not a VBA expert so I can't vouch for these. I got them off another list & didn't test them. <img src=/S/blush.gif border=0 alt=blush width=15 height=15> Secondly, you indicated Outlook, but posted in the Word forum. I'm not familiar with Outlook & I don't know if that was a mistake. Having said that, here they are:<pre>Sub DraftWatermarkInsert()

    ' DraftWatermark Macro
    ' Macro created 2000/04/17 by Wendy Cutler from Jon Hill
    ' PutWatermarkInEveryHeader
    ' DraftWatermark style is set Arial, 144, .25 Grey;
    ' Paragraph setting is indent 100, space before 180
    ' This is called once by Autonew

    ' Insert the watermark
    Dim oSection As Section
    Dim oHeader As HeaderFooter
    Dim oParaCount As Long
    For Each oSection In ActiveDocument.Sections
    oSection.PageSetup.TopMargin = InchesToPoints(-1) 'prevents it from
    pushing the page text down
    For Each oHeader In oSection.Headers
    With oHeader.Range
    oHeader.LinkToPrevious = False 'prevents it picking up previous _
    'hdr's watermark, (I think)
    .InsertAfter "Draft"
    oParaCount = oHeader.Range.Paragraphs.Count
    .Paragraphs(oParaCount).Style = "DraftWatermark"
    End With
    Next oHeader
    Next oSection

    End Sub
    Sub DraftWatermarkOnOff()

    ' DraftWatermark Macro
    ' Macro created 2000/04/20 by Wendy Cutler from Jon Hill

    ' Toggle the watermark
    With ActiveDocument.Styles("DraftWatermark").Font
    .Hidden = Not (.Hidden)
    If .Hidden Then
    'if the watermark is now hidden
    'then make sure user can't view hidden text
    With Dialogs(wdDialogToolsOptionsView)
    .Hidden = 0
    .ShowAll = 0
    End With
    End If
    End With

    End Sub</pre>

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Silicon Valley, USA
    Thanked 94 Times in 90 Posts

    Re: Macro for inserting watermark (Outlook 2002 SP3)

    Can you describe the watermark in more detail? Is it a piece for carefully formatted text, or a picture, or a drawing, or a combination of these?

    In many cases, it might be easiest to save the watermark as AutoText in a global template. If it's a picture, inserting it from the file system (either manually or with a macro) might be easiest. Having it in another document raises issues with how to get at the watermark (e.g., would you want to copy the entire body of the document?).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts