Word Header and Footer Issue

D

Dirk Frulla

Hello!

I originally posted this on the Office Automation forum, being that I am
attempting to automate this entire process. But my issue is regarding
sections and the header footer size.

I am attempting to automate a Word document merge. I am using Visual Studio
2005 and Word 2007, although I tested it with Word 2003, and the issue
exsists there as well.

The purpose of the program is take a series of Word documents and combine
(by combine, I mean concatenate) the documents into one large Word document.
Most of the time, there are roughly 500 documents to combine. However, it
sometimes need to concatenate over 2000 documents.

I have been successful creating a program for this - EXCEPT for one little
snag - header size. My main strategy is to create one master Word document,
and then insert blank page sections into the document, open the documents to
be merged, copy the content to the clipboard, and then paste (using source
formatting) the content into the new section of the master document. As I
mentioned, it works fine, and I've been able to re-number the headers and
everything. The problem is the header SIZE.

You can duplicate the issue directly in Word 2007 without creating a
program. Here are the steps:
1) Open new Word document.
2) Type something, anything in the main section of the first page.
3) Switch to header/footer mode (edit the header)
4) Type something in the header, doesn't matter what it is.
5) Close header view

At this point you should have ONE page with a header.

6) Insert a new PAGE BREAK SECTION at the end of the document. Word, by
default, carries the header down to this next section, so you should have the
same text in the header of this new section.
7) Switch to header/footer view, and edit the header on the new section.
8) "Uncheck" the "Link to Previous" button. This should unlink the header
from the previous section.
9) Click the "Go to Footer" button and uncheck the "Link To Previous" button
for the footer.

Now that the header and footers have been unlinked you can delete the
content of these headers without deleting the content in the header/footer
of the
prevous section.

10) Click "Go To Header" and delete the content in the header.
11) Close header/footer view. At this point you should have 2 pages, the
second of which is in a separate section, with no content in the
headers/footer (they are unlinked), and the first page should look exactly
how you first composed it.
12) For the second section (caret blinking in main part of second section) -
Edit the margins. Adjust ALL margins to 0.25 inches.

And this point you should be able to see the issue. The section section is
prevented from having a 0.25 in. margin because the header size is 0.5 in.,
even though they are unlinked and there is NO CONTENT in them.

Anybody have any insights on this? Is there a way to .... well ... "reset" a
section so that it is completely indepenent of the other sections?

Thanks!
Dirk Frulla
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top