Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 11-20-2013, 11:53 AM
Catty Catty is offline VBA code to align watermarks Windows 7 32bit VBA code to align watermarks Office 2010 32bit
Advanced Beginner
VBA code to align watermarks
 
Join Date: Nov 2013
Posts: 39
Catty is on a distinguished road
Default

Hi Greg,

I need the WM alignment to be vertically and horizontally centered relative to page. I did not include all the code in my previous post. Below is the complete code.
Code:
Dim Shp As Shape, HdFt As HeaderFooter 
With ActiveDocument 
  On Error Goto Errhandler 
   'Add the watermark to each header in the first Section
  With .Sections.First 
    For Each HdFt In .Headers 
      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 
  With .ActiveWindow.View 
    .ShowMarkupAreaHighlight = False 
    .ShowComments = False 
    .ShowRevisionsAndComments = False 
  End With 
  .FormattingShowClear = True 
End With 
Set Shp = Nothing

Last edited by macropod; 11-20-2013 at 01:45 PM. Reason: Added code tags & formatting
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to align texts so they all end at the same line patehi Word 3 05-25-2013 11:47 PM
VBA code to align watermarks Resize and align AndyDDUK PowerPoint 9 11-09-2012 05:23 AM
VBA code to align watermarks Clipart and Watermarks Maureen Office 3 09-30-2011 02:53 AM
Watermarks on the web David S Word 0 07-28-2011 07:54 AM
Question on watermarks kknutson Word 0 04-26-2007 04:12 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:16 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft