Custom watermark changes position on some machines

D

Denise

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
 
M

Margaret Aldis

Sounds like something is pushing the Watermark across - could it be a
(possibly empty) page number frame as described in
http://www.word.mvps.org/faqs/formatting/UnaccountablyIndented.htm ?

If you set your view options to show everything you can (anchors, text
boundaries, all non-printing chars etc.) you may be able to determine what's
there. Try using the drawing bar Select cursor to catch anything behind
text.
 
D

Denise

Sounds like something is pushing the Watermark across - could it be a
(possibly empty) page number frame as described in
http://www.word.mvps.org/faqs/formatting/UnaccountablyIndented.htm ?

If you set your view options to show everything you can (anchors, text
boundaries, all non-printing chars etc.) you may be able to determine what's
there. Try using the drawing bar Select cursor to catch anything behind
text.

Thanks for your prompt reply, Margaret.

I've done as you suggested and analysed all the hidden elements of the
document, comparing them to a similar one created on my own machine. There
were no obvious differences in the hidden elements but one thing I did
notice was that the formatting properties of the WordArt were different
(they shouldn't be). However, when I set the properties to match those of
the document created on my machine the watermark jumped too far over to the
left and too high up the page!

I think you're right that there is something influencing the placement of
the watermark. The trouble is I can't find anything. It seems very
strange that following the same procedure on 2 different machines should
produce such different results.

If anyone has come across similar I'd appreciate your thoughts too.

Denise
 
B

Bob Buckland ?:-\)

Hi Denise,

Do the two documents come out the same in File=>Web Page Preview?

If there are no add-ins/templates that differ, and the
printer drivers are the same, you may want to also
check the settings in Tools=>Options=>Compatability and
also the 'disable features' setting in Tools=>Options=>Save.

The HTML source will sometimes show some formatting/style
differences that don't appear in the user interface.

======
On Tue, 24 May 2005 13:50:12 +0100, Margaret Aldis wrote:

Thanks for your prompt reply, Margaret.

I've done as you suggested and analysed all the hidden elements of the
document, comparing them to a similar one created on my own machine. There
were no obvious differences in the hidden elements but one thing I did
notice was that the formatting properties of the WordArt were different
(they shouldn't be). However, when I set the properties to match those of
the document created on my machine the watermark jumped too far over to the
left and too high up the page!

I think you're right that there is something influencing the placement of
the watermark. The trouble is I can't find anything. It seems very
strange that following the same procedure on 2 different machines should
produce such different results.

If anyone has come across similar I'd appreciate your thoughts too.

Denise>>
--
Let us know if this helped you,

Bob Buckland ?:)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends*

For Everyday MS Office tips to "use right away" -
http://microsoft.com/events/series/administrativetipsandtricks.mspx
 
D

Denise

On Tue, 24 May 2005 08:27:55 -0700, Bob Buckland ?:) wrote:

Many thanks for your advice, Bob. I have had to leave this alone for the
past couple of days as I've been caught up with other things but I will
hopefully get to try out your suggestions in the next few days.

Thanks again

Denise
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top