Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-17-2022, 09:08 AM
kevinbradley57 kevinbradley57 is offline How to have conditional headers for different page orientation within the same document. Windows 7 64bit How to have conditional headers for different page orientation within the same document. Office 2010 64bit
Advanced Beginner
How to have conditional headers for different page orientation within the same document.
 
Join Date: Jul 2017
Posts: 89
kevinbradley57 is on a distinguished road
Default How to have conditional headers for different page orientation within the same document.

I'm working with a boilerplate report "template" that uses portrait orientation by default but might have a section added that uses landscape orientation. When a landscape section is added, I need a way for the right margin to adjust automatically so the right-aligned page number and logo are always the same distance from the right edge of the document. Note: I put template in quotation marks because we don't use it as a true template as Microsoft designed. It's really just a boilerplate macro-enabled document that various departments use as a basis for their customized documents.
Reply With Quote
  #2  
Old 10-17-2022, 09:54 AM
Charles Kenyon Charles Kenyon is offline How to have conditional headers for different page orientation within the same document. Windows 11 How to have conditional headers for different page orientation within the same document. Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,547
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Use the alignment tabs.
Alignment Tabs


BTW: Why on Earth are the not using a real template?
Reply With Quote
  #3  
Old 10-17-2022, 11:12 AM
kevinbradley57 kevinbradley57 is offline How to have conditional headers for different page orientation within the same document. Windows 7 64bit How to have conditional headers for different page orientation within the same document. Office 2010 64bit
Advanced Beginner
How to have conditional headers for different page orientation within the same document.
 
Join Date: Jul 2017
Posts: 89
kevinbradley57 is on a distinguished road
Default

"Why on Earth are they not using a real template?" -- For various security-related reasons, the company has an unusual configuration of Office products, which limits certain functions. Also, I'm not sure the corporate decision makers are familiar with how templates are supposed to work.
Reply With Quote
  #4  
Old 10-17-2022, 11:36 AM
Charles Kenyon Charles Kenyon is offline How to have conditional headers for different page orientation within the same document. Windows 11 How to have conditional headers for different page orientation within the same document. Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,547
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Quote:
Originally Posted by kevinbradley57 View Post
"Why on Earth are they not using a real template?" -- For various security-related reasons, the company has an unusual configuration of Office products, which limits certain functions. Also, I'm not sure the corporate decision makers are familiar with how templates are supposed to work.
Some brave soul should point out that the are restricting productivity and increasing the opportunity for mistakes by using documents instead of templates.
Reply With Quote
  #5  
Old 10-17-2022, 11:29 AM
kevinbradley57 kevinbradley57 is offline How to have conditional headers for different page orientation within the same document. Windows 7 64bit How to have conditional headers for different page orientation within the same document. Office 2010 64bit
Advanced Beginner
How to have conditional headers for different page orientation within the same document.
 
Join Date: Jul 2017
Posts: 89
kevinbradley57 is on a distinguished road
Default

The right-alignment tab doesn't automatically move to the right edge on landscape pages in my document.
Reply With Quote
  #6  
Old 10-17-2022, 02:45 PM
Italophile Italophile is offline How to have conditional headers for different page orientation within the same document. Windows 11 How to have conditional headers for different page orientation within the same document. Office 2021
Expert
 
Join Date: Mar 2022
Posts: 556
Italophile is just really niceItalophile is just really niceItalophile is just really niceItalophile is just really nice
Default

Quote:
Originally Posted by kevinbradley57 View Post
The right-alignment tab doesn't automatically move to the right edge on landscape pages in my document.
That sounds as though you’ve used a right-aligned tab rather than an alignment tab. Alignment tabs are only available in headers and footers, can’t be applied as part of a style, and are accessed from the header/footer tab of the ribbon, which is visible only when editing a header or footer.
Reply With Quote
  #7  
Old 10-17-2022, 03:02 PM
Guessed's Avatar
Guessed Guessed is offline How to have conditional headers for different page orientation within the same document. Windows 10 How to have conditional headers for different page orientation within the same document. Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,178
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Quote:
Originally Posted by Italophile View Post
That sounds as though you’ve used a right-aligned tab rather than an alignment tab. Alignment tabs are only available in headers and footers, can’t be applied as part of a style, and are accessed from the header/footer tab of the ribbon, which is visible only when editing a header or footer.
OMG Italophile - I've never seen that before. I have no idea how long that has been a feature of Word but I can see that is going to be worth exploring further because it lets me retain the 'link to previous' setting and reduces complexity considerably.

I still think that tables are useful especially where logos are involved to give us more control on vertical alignment of left/right sides but that alignment tab is going to be handy for sure.

Thanks for teaching me something new today
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #8  
Old 10-17-2022, 11:32 AM
Charles Kenyon Charles Kenyon is offline How to have conditional headers for different page orientation within the same document. Windows 11 How to have conditional headers for different page orientation within the same document. Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,547
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

What is it aligned to? Page Margin or Paragraph Indent?
Margins and Indents - Ribbon
Reply With Quote
  #9  
Old 10-17-2022, 02:53 PM
Guessed's Avatar
Guessed Guessed is offline How to have conditional headers for different page orientation within the same document. Windows 10 How to have conditional headers for different page orientation within the same document. Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,178
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

I do this by putting the header and footer content into a table. The table can be configured to be 100% width which allows it to adapt automatically to different page widths. You might want two or three columns in that table depending on whether you need left and right alignment or left/centre/right alignment. The first column gets content left aligned, the last column gets content right aligned.

The trick is to remember that the 'link to previous' setting overrides the width of the table so if you change from portrait to landscape (or vice versa) then you can duplicate the header content by turning on the 'link to previous' but then you need to turn it off again to allow the table to adapt to the different width.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #10  
Old 10-17-2022, 06:50 PM
Charles Kenyon Charles Kenyon is offline How to have conditional headers for different page orientation within the same document. Windows 11 How to have conditional headers for different page orientation within the same document. Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,547
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Andrew: Alignment Tabs
Introduced with the Ribbon in Office 2007.
Only available in headers or footers unless added to QAT or keyboard shortcut. It shows up as Insert Alignment Tab.

Last edited by Charles Kenyon; 10-18-2022 at 10:38 AM.
Reply With Quote
  #11  
Old 10-18-2022, 11:26 AM
kevinbradley57 kevinbradley57 is offline How to have conditional headers for different page orientation within the same document. Windows 7 64bit How to have conditional headers for different page orientation within the same document. Office 2010 64bit
Advanced Beginner
How to have conditional headers for different page orientation within the same document.
 
Join Date: Jul 2017
Posts: 89
kevinbradley57 is on a distinguished road
Default

Thank you, Charles Kenyon and Italophile. Much appreciated.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Word page orientation changes not affecting printed document nsales Word 2 09-19-2019 12:29 PM
Watermark on every page of document which has different first/odd/even page headers shanlau Word VBA 1 12-10-2018 09:10 PM
Page borders vs Orientation Ineedcoffee Word 5 12-06-2011 12:52 PM
varying orientation on a multi-page document??? imimin Word 1 08-24-2009 12:12 PM
Page Orientation bubbelytoes Word 1 09-06-2006 12:41 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:40 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft