Reply
 
Thread Tools Display Modes
  #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
  #2   Report Post  
Margaret Aldis
 
Posts: n/a
Default

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/format...lyIndented.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.

--
Margaret Aldis - Microsoft Word MVP
Syntagma partnership site: http://www.syntagma.co.uk
Word MVP FAQ site: http://www.word.mvps.org



"Denise" wrote in message
.. .
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



  #3   Report Post  
Denise
 
Posts: n/a
Default

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

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/format...lyIndented.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
  #4   Report Post  
Bob Buckland ?:-\)
 
Posts: n/a
Default

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.

======
"Denise" wrote in message news 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/a...andtricks.mspx



  #5   Report Post  
Denise
 
Posts: n/a
Default

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

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.

======
"Denise" wrote in message news 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

Reply
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 09:55 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"