Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Programming Headers and footers

Status
Not open for further replies.

ajrowland

MIS
Jun 28, 2000
20
US
I'm programming a macro in Word 2000 and have a marker for placing a footer on a page.&nbsp;&nbsp;Here's the problem, either the footer appears on all pages, on the wrong page or doesn't appear at all.<br><br>What I'm trying to accomplish is have the footer appear ONLY on the page it's marked for.<br><br>Any ideas?<br><br>Andrew
 
Footers and headers can be either identical on all pages, or alternate left and right.<br><br>When you say ONLY, do you mean it retrieves some information from the current page to make it unique, or are you attempting something else?<br><br>If you mean go to unique marker, insert footer based on unique identifier, go to next marker, etc., you will need to create a dummy footer (actual page text) which will contain the unique information you wish.&nbsp;&nbsp;Headers and footers are designed for consistent information, with some possible workarounds.<br><br>A little more info might be helpful.<br><br>Dan
 
Dan,<br><br>Sometimes the footer needs to appear on page one, sometimes on page 2, etc.<br><br>In order to handle this, I have a unique marker that appears on the page where the footer needs to appear.&nbsp;&nbsp;I only need the footer to appear on that page, no other one.<br><br>Does that help?<br><br>Andrew
 
Is the footer the same all the time?<br><br>If it is, you could begin by building a blank footer on page 1.<br><br>Then build a macro to search for the unique identifier (I hope it doesn't move from page to page when you edit).<br><br>The once the unique identifier is located, your macro must place a Section Break in the document, disconnect the previous footer, and build a new footer at that page.<br><br>Then the macro must go immediately to the top of the next page, place another section break, disconnect the previous footer, and build a new one (assumed to be blank).<br><br>This is just a general idea.&nbsp;&nbsp;First try.&nbsp;&nbsp;What type of marker are you using?&nbsp;&nbsp;Is there a pattern to the contents of the footers?<br><br>Dan
 
The contents of the footer are exactly the same, just the page number varies.&nbsp;&nbsp;For a marker I'm using the string &quot;{FOOTNOTE}&quot;&nbsp;&nbsp;(I know footnotes and footers are different things, I'm working with another person who made this marker).<br><br>I have tried having it discontinue the footer and put a new footer on the following page.&nbsp;&nbsp;This works when I walk it through for the programming step.&nbsp;&nbsp;However, when I run the resulting macro, the footer appears on the PREVIOUS page.&nbsp;&nbsp;Very annoying.<br><br>Andrew
 
Is there anything stopping you from, after all edits are made, creating a macro which places a section break at the end of each page, disconnects each footer from the previous page, and after that run another macro to find each page with (Footnote), access the footer on that page, and then paste the appropriate information.&nbsp;&nbsp;This would preserve the page number for all pages (assuming you didn't paste over it), but only place information in those footers requiring it.<br><br>I have to admit I'm a but stumped.&nbsp;&nbsp;However, many times Word macros run so fast Word can't keep up.&nbsp;&nbsp;That's why you get footers on the wrong pages.&nbsp;&nbsp;You could keep an original and then a production copy, so you can go back to the original for edits, and then run the macro(s) again.<br><br>Would you care to share your macro?<br><br>Dan
 
I will try your solution and let you know how it works.&nbsp;&nbsp;I don't have the macro on the machine I'm working on currently, so I can't share it right now.<br><br>Andrew
 
Dan,<br><br>Your tip worked great.&nbsp;&nbsp;When I created the new page, I disconnected the headers and footers from the previous page. Then, when I found the marker, it only created the footer in the correct place.<br><br>Thanks again,<br><br>Andrew
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top