Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-26-2019, 11:40 PM
SJCONNON SJCONNON is offline Footer on last page or first page if only one Windows 10 Footer on last page or first page if only one Office 2010
Novice
Footer on last page or first page if only one
 
Join Date: Mar 2019
Posts: 4
SJCONNON is on a distinguished road
Default Footer on last page or first page if only one

Hi Folks

I have been trawling the threads and trying to figure this out but I am a novice and need to have it all spelled out very plainly.

I have a docx template that I need the footer to appear on the last page of. If the document is only one page long then it needs to be on page one.



I can get it to go on the last page but if there is only one page then it doesn't appear.

How do I make this footer go on last page or first page if only one. Thanks for your help.
Attached Files
File Type: docx Sample Custom Invoice.docx (31.6 KB, 25 views)
Reply With Quote
  #2  
Old 03-27-2019, 05:09 AM
gmayor's Avatar
gmayor gmayor is offline Footer on last page or first page if only one Windows 10 Footer on last page or first page if only one Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Select the footer text - Press ALT+F3 and save it as an autotext entry called Service Matters. Then replace the footer with the following fields construction


{ IF { PAGE } = { NUMPAGES } "{ AUTOTEXT "Service Matters" }" }


Use CTRL+F9 for each bracket pair { }
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #3  
Old 03-27-2019, 09:00 AM
Charles Kenyon Charles Kenyon is online now Footer on last page or first page if only one Windows 10 Footer on last page or first page if only one Office 2016
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,124
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

I believe Graham has answered your question. For more on this, here is another example.
Reply With Quote
  #4  
Old 03-27-2019, 10:12 PM
SJCONNON SJCONNON is offline Footer on last page or first page if only one Windows 10 Footer on last page or first page if only one Office 2010
Novice
Footer on last page or first page if only one
 
Join Date: Mar 2019
Posts: 4
SJCONNON is on a distinguished road
Default

Thanks Graham. Do I type the brackets before the IF or use Ctrl F9 to insert ?
When I enter this code I end up with {IF 1=2 on the first page and {IF 2=2 on the second page. I am clearly not getting it... feeling very stupid here
Reply With Quote
  #5  
Old 03-27-2019, 11:48 PM
SJCONNON SJCONNON is offline Footer on last page or first page if only one Windows 10 Footer on last page or first page if only one Office 2010
Novice
Footer on last page or first page if only one
 
Join Date: Mar 2019
Posts: 4
SJCONNON is on a distinguished road
Default Going Mad Here

OK so I have tried to enter the field and it does not create a footer. The area is blank and it causes the text fields to corrupt. (the Amount due drops down leaving a big gap)

See attached document with the field inserted in footer. And PDF of document. I am feeling So stupid.
Attached Files
File Type: docx A1 Invoice6.docx (32.2 KB, 17 views)
File Type: pdf Invoice 58810 (6).pdf (45.7 KB, 15 views)
Reply With Quote
  #6  
Old 03-28-2019, 01:41 AM
gmayor's Avatar
gmayor gmayor is offline Footer on last page or first page if only one Windows 10 Footer on last page or first page if only one Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

If you create the autotext entry as I suggested and if you replace the smart quotes in your field construction for straight quotes, then the code works.

The problem with a the single page document is that there isn't enough space for footer. If you reduce the number of some of the empty paragraphs until there is sufficient room for the footer, the footer will appear on that page. If the pages run to more than one page, the footer will appear on the last page.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #7  
Old 03-28-2019, 04:23 AM
Charles Kenyon Charles Kenyon is online now Footer on last page or first page if only one Windows 10 Footer on last page or first page if only one Office 2016
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,124
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:
Do I type the brackets before the IF or use Ctrl F9 to insert ?
When I enter this code I end up with {IF 1=2 on the first page and {IF 2=2 on the second page.
You always use Ctrl+F9 to insert the brackets. You cannot type them.
You want both fields to be the same on the last page.

See your empty paragraphs: Ctrl+Shift+8 (Ctrl+*)
Showing non-printing formatting marks in Microsoft Word
Reply With Quote
  #8  
Old 03-28-2019, 02:51 PM
SJCONNON SJCONNON is offline Footer on last page or first page if only one Windows 10 Footer on last page or first page if only one Office 2010
Novice
Footer on last page or first page if only one
 
Join Date: Mar 2019
Posts: 4
SJCONNON is on a distinguished road
Default

Thanks Graham. It was the quote marks that were causing the problem (I didn't even know there were such things as straight quotes and smart quotes).

It is working now. Your guidance is really appreciated. Learning knew things every day
Reply With Quote
  #9  
Old 08-24-2022, 04:16 AM
Windwalker64 Windwalker64 is offline Footer on last page or first page if only one Windows 10 Footer on last page or first page if only one Office 2010
Novice
 
Join Date: Aug 2022
Posts: 1
Windwalker64 is on a distinguished road
Default

Sorry but I've tried to understand this, but I'm pretty new to footers myself. I need to create a TEMPLATE that requires a full graphic footer on the LAST page. If the document is more than one page long then I need another different smaller graphic footer on all pages until the LAST page, where it needs the full graphic footer. I've created autotexts for both footers dhbb & dhbf are the names, and am trying to follow the instructions for making a field, but I can't really grasp the formula...... I can make the large graphic appear on page one, but then nothing else. Can someone please write it out exactly as I have to type it, and tell me exactly what pages to put it on? Do i have to do it for every page? Anyone able to make it VERY clear? Thank you.
Reply With Quote
  #10  
Old 08-24-2022, 01:23 PM
Charles Kenyon Charles Kenyon is online now Footer on last page or first page if only one Windows 11 Footer on last page or first page if only one Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,124
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

The answer is here already. Work on it. Here is more background.
Graham's example depends on you storing your large image as a building block. Here is a variation.

Code:
{ IF { PAGE } = { NUMPAGES } "{ AUTOTEXT "LargeImage" }" { AUTOTEXT "SmallImage" } }
The structure of an IF Field is: {IF expression1 operator expression2 "truetext" "falsetext"}
The field above would have your small image in one building block and your large one in a separate building block. This is somewhat easier than placing the actual images in the field, although you could do that.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Don't want page number or date in footer on first page, do want graphic in header. dianahbr Word 2 02-23-2018 09:25 AM
I have 20 page word document with a footer. Can i change page # 10 footer only? aligahk06 Word 2 10-25-2017 04:53 AM
Footer on last page or first page if only one Total Page number incorrect in the first page footer mmathisekar Word 11 06-16-2016 06:00 AM
Footer on last page or first page if only one begin each section with page 1 in header PLUS continuous page numbering in footer onemorecupofcoffee Word 18 09-04-2013 04:31 PM
How to save the current page in a new file with all the page settings (header, footer Jamal NUMAN Word 6 03-15-2012 03:27 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:57 AM.


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