Hello
What solutions have people used to place Headers & Footers for Landscape oriented pages across the short edge.
I have used text boxes which is fiddly at best. The VBA code to control this becomes a nightmare.
Regards
Geof
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Word, L/scape Headers & Footers
Home » Forums » AskWoody support » Productivity software by function » MS Word and word processing help » Word, L/scape Headers & Footers
- This topic has 3 replies, 4 voices, and was last updated 24 years, 2 months ago.
AuthorTopicWSgeofrichardson
AskWoody LoungerApril 3, 2001 at 6:14 pm #354644Viewing 2 reply threadsAuthorReplies-
Charles Kenyon
AskWoody LoungerApril 6, 2001 at 3:36 am #521796Hi Geof,
Take a look at Q162235: WD97: How to Add a Portrait Page Number to a Landscape Page.. Hope it helps.
-
WSGary Frieder
AskWoody LoungerApril 6, 2001 at 4:26 am #521800Geof,
Here’s a macro I wrote some time ago (Word 97) to do just that.
Notes:
This inserts a new landscape section at the current insertion point – essentially it splits the current section into two parts, with the new landscape section in the middle – you then need to copy/paste the material intended for the LS section, into the new LS section.The macro relies on inserting an autotext to provide for the sideways page number – this is just a textbox that was tweaked to just the right location and had the text direction changed – you’d have to create your own autotext for this purpose.
I’ve left in (but commented out) the little tests I was using to suss out what was actually going on, when creating this.
Sub InsertLandscapeSection() Dim rCurRng As Range Dim nSectCount As Integer Dim nUserView As Integer 'Gary Frieder 'Posted on Woody's Lounge Word forum 'test to ensure in main doc story and prompt if not If Selection.Information(wdInHeaderFooter) = True Then MsgBox "Insertion Point Must Be In Body of Page" _ & vbCr & "Before Running This Procedure", vbExclamation, _ "Alert: Place Insertion Point in Body of Page" Exit Sub End If On Error GoTo InsertLandscapeSection_err Application.ScreenUpdating = False 'ensure in page view for rest of procedure nUserView = ActiveWindow.View.Type If nUserView wdPageView Then ActiveWindow.View.Type = wdPageView End If With Selection '.TypeText ("I started here") .TypeParagraph Set rCurRng = Selection.Range 'Insert first Section Break .Sections.Add Range:=rCurRng '.TypeText ("Where am I now - 1?") .TypeParagraph .TypeParagraph Set rCurRng = Selection.Range 'Insert 2nd Section Break .Sections.Add Range:=rCurRng '.TypeText ("And Where am I now - 2?") .TypeParagraph .GoTo What:=wdGoToSection, Which:=wdGoToNext, Count:=1, _ Name:="" .TypeText ("Landscape Section") .TypeParagraph End With 'get index of current section nSectCount = Selection.Information(wdActiveEndSectionNumber) 'turn off Same As Previous in header and footer With ActiveDocument.Sections(nSectCount).Headers(wdHeaderFooterPrimary) .LinkToPrevious = False End With With ActiveDocument.Sections(nSectCount).Footers(wdHeaderFooterPrimary) .LinkToPrevious = False .PageNumbers.RestartNumberingAtSection = False End With With Selection .GoTo What:=wdGoToSection, Which:=wdGoToNext, Count:=1, _ Name:="" '.TypeText ("And I ended up here - OK with that?") .TypeParagraph End With 'get index of current section nSectCount = Selection.Information(wdActiveEndSectionNumber) 'turn off Same As Previous in header and footer With ActiveDocument.Sections(nSectCount).Headers(wdHeaderFooterPrimary) .LinkToPrevious = False .PageNumbers.RestartNumberingAtSection = False End With With ActiveDocument.Sections(nSectCount).Footers(wdHeaderFooterPrimary) .LinkToPrevious = False End With 'now go back to LS section to set stuff With Selection .GoTo What:=wdGoToSection, Which:=wdGoToPrevious, Count:=1, _ Name:="" '********Do all this AFTER fixing trailing section LinkToPrev .TypeParagraph With .PageSetup .Orientation = wdOrientLandscape .TopMargin = InchesToPoints(1.0625) .BottomMargin = InchesToPoints(1.0625) .LeftMargin = InchesToPoints(1) .RightMargin = InchesToPoints(1) .HeaderDistance = InchesToPoints(0.5) .FooterDistance = InchesToPoints(0.5) .PageWidth = InchesToPoints(11) .PageHeight = InchesToPoints(8.5) End With End With 'In LS section, Go to header and insert page no Autotext '(get code from earlier version) ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader ActiveDocument.AttachedTemplate.AutoTextEntries("LandscapeSectionPageNumber"). _ Insert Where:=Selection.Range 'go back to main document ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument 'In LS section, Go to footer and delete contents ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageFooter With Selection .WholeStory .Delete End With 'go back to main document ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument '********************************* 'restore original user view If nUserView wdPageView Then ActiveWindow.View.Type = nUserView End If Application.ScreenUpdating = True Exit Sub InsertLandscapeSection_err: Application.ScreenUpdating = True SetBodySectionPageMargins_err: Application.ScreenUpdating = True MsgBox Err.Number & " : " & Err.Description, vbOKOnly, _ "modDTP_PgSet.InsertLandscapeSection" End Sub
-
WSPhil Rabichow
AskWoody LoungerApril 6, 2001 at 3:59 pm #521881Hi Geof:
You can also see this post.
A couple of additional tips that I’ve copied from somewhere regarding landscape sections with portrait header/footers are:
Method 2 (unless you need a footnote):
1. Exchange all the row entries for column entries, so the rows become columns and the columns become rows. (Map each entry table1[i,j] to table2[j,i], for row entries i=1,…,I, and column entries j=1,…,J.)
2. Rotate text direction of all the table entries so now the head of the table is on the left-hand side of the page. [THIS ONLY WORKS IN WORD 97 or later.]So the headers are in the right place at the top of the page, with the head of the table at the left side. But the footnote is at the bottom of the page instead of landscape under the table.
Is there a way of having a footnote appear at the foot of a table instead of the foot of the page?
You can trick Word by copying the header info into a text box and the footer (if needed) into a text box. You can adjust the direction of the text from a textbox and place the “header” textbox on the right side of the page and the footer textbox on the left side. This will show the “top” of the landscape page on the right side of the adjusted portrait page. [AGAIN, ONLY IN 97]You can also use the above method for portrait header/footers with landscape table.
1. Make the table landscape.
2. Disconnect the header/footers on the landscaped pages.
3. Copy the header/footer info into textboxes.
4. Rotate the text in the text boxes. [Can
Viewing 2 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
LibreOffice 25.8. No Windows 7, 8/8.1, x86
by
Alex5723
3 hours, 24 minutes ago -
Perplexity Pro free for 12 mos for Samsung Galaxy phones
by
Patricia Grace
15 hours, 35 minutes ago -
June KB5060842 update broke DHCP server service
by
Alex5723
14 hours, 7 minutes ago -
AMD Ryzen™ Chipset Driver Release Notes 7.06.02.123
by
Alex5723
18 hours, 9 minutes ago -
Excessive security alerts
by
WSSebastian42
13 hours, 50 minutes ago -
* CrystalDiskMark may shorten SSD/USB Memory life
by
Alex5723
1 day, 3 hours ago -
Ben’s excellent adventure with Linux
by
Ben Myers
5 hours, 2 minutes ago -
Seconds are back in Windows 10!
by
Susan Bradley
14 hours, 46 minutes ago -
WebBrowserPassView — Take inventory of your stored passwords
by
Deanna McElveen
3 hours, 38 minutes ago -
OS news from WWDC 2025
by
Will Fastie
54 minutes ago -
Need help with graphics…
by
WSBatBytes
5 hours, 56 minutes ago -
AMD : Out of Bounds (OOB) read vulnerability in TPM 2.0 CVE-2025-2884
by
Alex5723
1 day, 19 hours ago -
Totally remove or disable BitLocker
by
CWBillow
18 hours, 13 minutes ago -
Windows 10 gets 6 years of ESU?
by
n0ads
21 hours, 28 minutes ago -
Apple, Google stores still offer China-based VPNs, report says
by
Nibbled To Death By Ducks
2 days, 5 hours ago -
Search Forums only bring up my posts?
by
Deo
18 minutes ago -
Windows Spotlight broken on Enterprise and Pro for Workstations?
by
steeviebops
2 days, 17 hours ago -
Denmark wants to dump Microsoft for Linux + LibreOffice
by
Alex5723
2 days, 10 hours ago -
How to get Microsoft Defender to honor Group Policy Setting
by
Ralph
2 days, 18 hours ago -
Apple : Paragon’s iOS Mercenary Spyware Finds Journalists Target
by
Alex5723
3 days, 4 hours ago -
Music : The Rose Room – It’s Been A Long, Long Time album
by
Alex5723
3 days, 5 hours ago -
Disengage Bitlocker
by
CWBillow
2 days, 19 hours ago -
Mac Mini M2 Service Program for No Power Issue
by
Alex5723
3 days, 7 hours ago -
New Win 11 Pro Geekom Setup questions
by
Deo
22 minutes ago -
Windows 11 Insider Preview build 26200.5651 released to DEV
by
joep517
3 days, 14 hours ago -
Windows 11 Insider Preview build 26120.4441 (24H2) released to BETA
by
joep517
3 days, 14 hours ago -
iOS 26,, MacOS 26 : Create your own AI chatbot
by
Alex5723
3 days, 18 hours ago -
New PC transfer program recommendations?
by
DaveBoston
1 day, 23 hours ago -
Windows 11 Insider Preview Build 22631.5545 (23H2) released to Release Preview
by
joep517
3 days, 22 hours ago -
Windows 10 Build 19045.6029 (22H2) to Release Preview Channel
by
joep517
3 days, 22 hours ago
Recent blog posts
- Ben’s excellent adventure with Linux
- Seconds are back in Windows 10!
- WebBrowserPassView — Take inventory of your stored passwords
- OS news from WWDC 2025
- Best tools for upgrading a Windows 10 to an 11
- Master patch listing for June 10, 2025
- 24H2 may not be offered June updates
- June 2025 updates are out
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.