Results 1 to 5 of 5

Thread: [RESOLVED] Watermark on my word doc

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2006
    Posts
    243

    Resolved [RESOLVED] Watermark on my word doc

    I'm writing some data on word doc from vb6 application. There are many pages.
    I want to insert Watermark (it's a big logo) on each page.
    Can anyone suggest or pm some good code or links.

  2. #2
    Hyperactive Member
    Join Date
    Jun 2004
    Posts
    468

    Re: Watermark on my word doc

    When dealing with this sort of thing, it's easiest to record a macro, take a look at the Word-generated code, then adapt for your particular need.

    The recorded macro:

    Code:
      ActiveDocument.Sections(1).Range.Select
      ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
      Selection.HeaderFooter.Shapes.AddPicture(FileName:="C:\MyPicture.png", _
        LinkToFile:=False, SaveWithDocument:=True).Select
      Selection.ShapeRange.Name = "WordPictureWatermark26334388"
      Selection.ShapeRange.PictureFormat.Brightness = 0.85
      Selection.ShapeRange.PictureFormat.Contrast = 0.15
      Selection.ShapeRange.LockAspectRatio = True
      Selection.ShapeRange.Height = InchesToPoints(2.79)
      Selection.ShapeRange.Width = InchesToPoints(6.5)
      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

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 2006
    Posts
    243

    Re: Watermark on my word doc

    Should I have to use it after completion of all of my pages or I have to run it after/before page.?

  4. #4
    Hyperactive Member
    Join Date
    Jun 2004
    Posts
    468

    Re: Watermark on my word doc

    Since you're dealing with the header (not a particular page), I wouldn't think it would matter.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Aug 2006
    Posts
    243

    Re: Watermark on my word doc

    Thanx. It works greatly.

Tags for this Thread

Posting Permissions

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



Click Here to Expand Forum to Full Width