Group: microsoft.public.word.vba.general
From: Jay Freedman
Date: Saturday, February 09, 2008 11:01 AM
Subject: Re: Strange HeaderFooter behavior Word 2007

On Sat, 09 Feb 2008 10:04:21 -0600, rick wrote:

>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.

Yes, I can duplicate it. I think we can honestly change its designation from
"strangeness" to "bug".

Interestingly, the behavior changes to the correct one in the _same_ document if
I save it in Word 2003 format. When I save that document again in Word 2007
format, the behavior goes wrong again.

I'll report it and quote your post.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.