Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / June 2007

Tip: Looking for answers? Try searching our database.

Header problem with Landscape pages

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
cmbrown - 05 Jun 2007 20:41 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.