Thread: [Solved] VBA code to align watermarks
View Single Post
 
Old 11-20-2013, 12:42 AM
Catty Catty is offline Windows 7 32bit Office 2010 32bit
Advanced Beginner
 
Join Date: Nov 2013
Posts: 39
Catty is on a distinguished road
Default VBA code to align watermarks

Hi, I have used some code from the net to insert watermarks, but need help to position these watermarks on the document correctly. Below is the code used to insert these watermarks.

Code:
    Set Shp = HdFt.Shapes.AddTextEffect(msoTextEffect1, _
    "CONFIDENTIAL", "Arial Narrow", 38, False, False, 0, 0)
    With Shp
      .Name = "PowerPlusWaterMarkObject" & Format(Now, "YYMMDD") & Format(HdFt.Index, "00")
      .TextEffect.NormalizedHeight = False
      .Line.Visible = False
      .Fill.Visible = True
      .Fill.Solid
      .Fill.ForeColor.RGB = RGB(192, 192, 192)
      .Fill.Transparency = 0.5
      .Rotation = 315
      .LockAspectRatio = True
      .Height = InchesToPoints(3.29)
      .Width = InchesToPoints(6.85)
      .WrapFormat.AllowOverlap = True
      .WrapFormat.Side = wdWrapNone
      .Left = InchesToPoints(-0.5)
      .WrapFormat.Type = 3
      .RelativeHorizontalPosition = wdRelativeVerticalPositionMargin
      .RelativeVerticalPosition = wdRelativeVerticalPositionMargin
      .Top = InchesToPoints(3)
    End With
    .Range.FormattedText.ShowAll = False
  Next
End With
Thanks!

Last edited by macropod; 11-20-2013 at 12:40 PM. Reason: Added code tags and formatting
Reply With Quote