In Word 2003 I am trying to write some code to insert a blank landscape page
in the middle of some portrait pages. No problem until I try to format the
headers and footers. (I turn off Same as Previous in both the landscape page
and the following section.) and With the cursor in the blank landscape page,
I access the header, and select.wholestory to select the whole header. (I
want to set the tabs for any lines in the header.)
However, whenever I try to access the header info, the cursor ends up in the
header of the previous section (which is portrait). I can't figure out why
this keeps happening. I have tried checking whether the cursor is in a
Landscape section, and if not, go to next section, but it doesn' work.
Any help would be much appreciated.

Signature
cmbrown
Stefan Blom - 08 Jun 2007 14:07 GMT
Instead of working with the Selection, try accessing the Range object of
the header, and see if that helps. For example:
Dim r As Range
Set r = ActiveDocument.Sections(1). _
Headers(wdHeaderFooterPrimary).Range
'More code follows...

Signature
Stefan Blom
Microsoft Word MVP
> In Word 2003 I am trying to write some code to insert a blank landscape page
> in the middle of some portrait pages. No problem until I try to format the
[quoted text clipped - 9 lines]
>
> Any help would be much appreciated.