Group: microsoft.public.word.vba.general
From: "Tony Jollans"
Date: Saturday, February 09, 2008 11:14 AM
Subject: Re: Strange HeaderFooter behavior Word 2007

On a quick look it appears you are correct. How odd.

I will try and look at this properly later.

--
Enjoy,
Tony

"rick" wrote in message
news:part1of1.1.J$EEzzA7lq6A2Q@ue.ph...
> Something is strange with HeadersFooters in Word 2007. I simply need to
> add an
> image to the PRIMARY header of a document (not the First Page Header). The
> following code should do this.
>
> ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Shapes.AddPicture
> "c:\mypic.jpg", False, True
>
> Instead, though, the image is added to the FirstPage header. It doesn't
> seem to
> matter whether the Different First Page attribute is on or off in Page
> Setup.
> It seems as though Word no longer knows the difference between a First
> Page and
> Primary header/footer.
>
> Strangely, this only occurs with documents in the new 2007 format (.docm
> and
> .docx). It works perfectly and exactly as it should in .doc documents in
> compatibility mode as well, of course, in Word 97/2K/XP/2003. That is, the
> image is added to the Primary header.
>
> Can anyone else duplicate this strangeness?
>
> Thanks. Rick.
>