Re: Header watermark throughout document



Hi Ricki

You need to loop in two ways: once for each section, and within each
section, once for each header. Like this:

Sub Watermarks()

Dim oSection As Word.Section
Dim oHF As Word.HeaderFooter

For Each oSection In ActiveDocument.Sections
For Each oHF In oSection.Headers

'add the watermark to this header
'in this section

Next oHF
Next oSection

End Sub


However, there have been several threads on these newsgroups from people
saying that they find it difficult to insert watermark-type shapes into
headers and footers. I've experienced the same thing. In particular, Word
sometimes puts two copies of the shape into one section and none in another.
My recent effort at trying to sort this out suggests that it works best if
I:
- start with the cursor at the *end* of the document
- explicitly select the range into which to insert the shape
- try re-paginating the document either before I start the whole thing, or
just before any troublesome bit of code.

And don't set the semi-transparent setting for the reason described here:
http://www.ShaunaKelly.com/word/watermarkletters/index.html

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word


"Ricki Miles" <rickimiles@xxxxxxx> wrote in message
news:uDP6CRqNHHA.4720@xxxxxxxxxxxxxxxxxxxxxxx
Hi Doug,

Unfortunately, my VBA skills are quite limited and I am not sure how to
write code for this. Could you point me in the right direction? Thanks,

Ricki

"Doug Robbins - Word MVP" <dkr@xxxxxxxxxxxxxxxxxx> wrote in message
news:%23$gUFwnNHHA.3944@xxxxxxxxxxxxxxxxxxxxxxx
You will need to have your macro iterate through each the Headers in each
Section of the document.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Ricki Miles" <rickimiles@xxxxxxx> wrote in message
news:uFsYLsnNHHA.5104@xxxxxxxxxxxxxxxxxxxxxxx
I am using Word 2003 and trying to create a macro that will put a copy
watermark on all pages. When I record the macro by choosing Format,
Background, Printed Watermark, etc and then run the macro in a document
with more than one section or a different first page, it only puts the
watermark in that section. How can I edit the code so it will apply to
all headers? Thanks,

Ricki








.



Relevant Pages

  • Re: Weird watermark behavior in mail merge :-(
    ... graphic behind the text linked to the page, instead of a real watermark ... page" and anchoring a watermark to the Header but not the First Page Header ... the watermark on the landscape page, ... Each subsequent letter should get a new portrait ...
    (microsoft.public.word.drawing.graphics)
  • Re: Weird watermark behavior in mail merge :-(
    ... My suggestion was to DISable "Different first page" in Section 2 and anchor the watermark to the Header rather than the First Page Header. ... the watermark on the landscape page, ... Each subsequent letter should get a new portrait ...
    (microsoft.public.word.drawing.graphics)
  • Re: Weird watermark behavior in mail merge :-(
    ... the watermark to the Header rather than the First Page Header. ... the watermark on the landscape page, ... Each subsequent letter should get a new portrait ...
    (microsoft.public.word.drawing.graphics)
  • Re: Cannot get rid of watermark
    ... Watermarks are always anchored to the header paragraph, ... When you insert section breaks after adding a watermark, ... selecting and deleting the watermark) than to try to cycle through the ... sections with the Format | Background command. ...
    (microsoft.public.word.docmanagement)
  • Re: WORD 2007 - Watermark issue
    ... Word 2007 OOXML one is part of an SDT. ... which includes the Watermark gallery. ... Some of the SDTs that are description based (Classic Watermarks, Wd2007 equations, shapes and SmartAt are stored in the .doc file ... When you use SaveAs Word 97-2003 the SDT in the header goes ...
    (microsoft.public.word.docmanagement)