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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot import the header 1

Status
Not open for further replies.

TipGiver

Programmer
Sep 1, 2005
1,863
Hi all

This is more of less a continuation of the "writing a book using word" thread.
I have a problem. In a file (say file1.doc) i have a header (marked as headr and located at header position). I load this file in the "book.doc" (doc that will contain all the seperate chapters) using the INSERT|FIELD|INCLUDETEXT. It cannot import neither the header nor the footer. I use INSERT|FIELD|STYLEREF|HEADER.

Is this happening to you too?
I use word 2003

Thank you
 
Forgot...
The error is : "Error! No text of specified style in document.
 
Hi TipGiver,

You can't reference a bookmark via a Styleref field. StyleRef fields reference Styles, not bookmarks.

Whether a header is automatically inported via an INCLUDTEXT field depends to some extent on how the target document is set up.

AFAIK, if you've got Section breaks separating each INCLUDTEXT field from its neighbours and the corresponding Headers & Footers are formatted so that they're not 'Same as Previous', the Headers & Footers from the source documents will appear.

If this doesn't work for you, you can bookmark the Headers & Footers in the source documents, then point INCLUDTEXT fields in the target document Headers & Footers to those bookmarks - but you'll still need to insert & format Section breaks as indicated above.

Cheers

[MS MVP - Word]
 
Thanks

I think i found something there too:

It seems that i can now do what i want. My main concern was about section breaks. Yes, now it transfers the header too!
A technique NOT to have header/footer in some pages (as suggested in my previous thread) is to use a rectangle without borderlines. Now, i think that it is better to add for example two section page breaks and not have 'same as previous'. And go and delete the header/footer text. Right?

Something else. Where is it better to have sections breaks ? In my tests that i perform right now, i have all in the small seperated files ( e.g. file1.doc). By "all" i mean the header text and the section breaks.

Thanks
 
Hi TipGiver,

If you want to be able to import the headers & footers from the source files, you'll need to have Section breaks separating each INCLUDETEXT field from its neighbours and from anything else in the target document. Plus, of course, you'll need to unlink each Section's header & footer from the previous Section and, as you noted, delete any residual contents there.

[MS MVP - Word]
 
Macropod,

I'll come back in a few hours, i need to do some more tests !

What i do so far on my tests is to place headers not in the target document, but in the smaller files (file1.doc). In file1 (and every fileX) i have 2 sections. Section1 (page break odd page) is for the 2 first pages where the header should be blanck. This is where i put the chapter's name and have the next page blanck ( the even page ). In the Section2 page break ( which is not linked to section1 ) i have in header the STYLEREF|heading1.

Mess! I hope you understood

The tests for tomorrow is to have different page numbering styles. (i, ii... and 1, 2...)
I want to see what will happen if numbering is created
1. in the small files (fileX.doc), and
2. in the target document ( i mean the doc that will have the INCLUDETEXT)

Thanks so far!
 
Hi TipGiver,

If all you're doing is using STYLEREF fields in the header, then you may as well do that in the target document. You could then forego the Section breaks (though you might want to insert hard page breaks).

Cheers

[MS MVP - Word]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top