Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Denise
 
Posts: n/a
Default Custom watermark changes position on some machines

Hello

Using Office 2002 SP-2, Windows 2000 V5.0 SP-4.

Several of my users are experiencing a problem with a custom watermark in
Word. I created a macro to automatically add a watermark to a Word
document and it works perfectly on most machines. The watermark is
positioned centered both horizontally and vertically on the page.

On some machines, when used with a particular template which has 2
sections, the watermark appears centered in the second section but shifted
to the right in the first section. On the vast majority of machines this
does not occur and the watermark is correctly positioned.

I used the following code to create the watermark:-


Sub Watermark()

' Sometimes (randomly, apparently) setting the
RelativeHorizontalPosition
' property of the shape fails, so an 'On Error Resume Next' statement
is used.

On Error Resume Next

Dim tText As String

tText = InputBox("Note: it may take several seconds for the page
numbers " _
& "to update correctly after inserting the watermark." & Chr(13) &
Chr(13) _
& "Please enter text for watermark:", "Watermark")

If tText "" Then

Application.ScreenUpdating = False

' The code in this With statement just moves the cursor into
' the header (generated by the macro recorder)
With ActiveWindow

If .View.SplitSpecial wdPaneNone Then
.Panes(2).Close
End If

With .ActivePane.View

If .Type = wdNormalView Or .Type = wdOutlineView Then
.Type = wdPrintView
End If

.SeekView = wdSeekCurrentPageHeader

End With

End With

' Place the shape then move it to the end of the header
With Selection

.HeaderFooter.Shapes.AddTextEffect(msoTextEffect2, tText, _
"Arial Black", 72#, msoFalse, msoFalse, 163.25,
60.25).Select
.Cut
.EndKey Unit:=wdStory
.Paste

End With

' Format the shape
With Selection.ShapeRange

.Fill.Visible = msoTrue
.Fill.Solid
.Fill.ForeColor.RGB = RGB(192, 192, 192)
.Fill.Transparency = 0#
.Line.Visible = msoFalse
.LockAspectRatio = msoTrue
.Height = 329.05
.Width = 302.4
.Rotation = 0#
.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionPage
.RelativeVerticalPosition = _
wdRelativeVerticalPositionPage
.Left = wdShapeCenter
.Top = wdShapeCenter
.LockAnchor = True
.WrapFormat.Type = wdWrapNone

End With

' Clean up
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
ActiveDocument.Fields.Update
Application.ScreenUpdating = True

End If

End Sub


I confess to having just recorded a macro and then added it to Normal.dot,
but this has worked fine for most machines and I didn't really think there
was that much to it.

It may just be one of those things with Word that you just have to smile
and shake your head at but I'd appreciate any thoughts on the subject.

Thanks very much

Denise Crawley
 
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
expanding custom dictionary [email protected] Microsoft Word Help 2 May 24th 05 10:21 PM
Watermark Problem Gail Gurman Microsoft Word Help 0 April 7th 05 01:10 AM
How can I create a custom watermark or background for use in word. rjk Page Layout 2 March 30th 05 10:48 PM
how can i change the position of a watermark Katy Microsoft Word Help 1 March 7th 05 03:31 PM
Setting custom size problem Bob S Page Layout 0 December 24th 04 03:25 PM


All times are GMT +1. The time now is 06:28 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"