A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

includetext, link, or something that keeps headers



 
 
Thread Tools Display Modes
  #1  
Old June 11th, 2004, 03:01 AM
external usenet poster
 
Posts: n/a
Default includetext, link, or something that keeps headers

I'm trying to do a mail merge that occasionally requires the inclusion of
other documents under certain conditions. For instance, when I merge
records 1, 2, and 3 into DocA, my code in DocA detects a certain condition
in record 2 which requires the inclusion of DocB for that record. My code:
{if {MERGEFIELD iCodeFK}="2" {INCLUDETEXT "\\\\webserver\\\c$\\\DocB.doc"}}

While this code includes the text of DocB, it doesn't include DocB's headers
and footers. Only DocA's headers and footers remain throughout my new
document. Any thoughts on how I can get DocB's headers and footers to be
included for that document and still retain the headers and footers for the
DocA documents? Thanks.


  #2  
Old June 11th, 2004, 04:44 PM
Cindy M -WordMVP-
external usenet poster
 
Posts: n/a
Default includetext, link, or something that keeps headers

I'm trying to do a mail merge that occasionally requires the inclusion of
other documents under certain conditions. For instance, when I merge
records 1, 2, and 3 into DocA, my code in DocA detects a certain condition
in record 2 which requires the inclusion of DocB for that record. My code:
{if {MERGEFIELD iCodeFK}="2" {INCLUDETEXT "\\\\webserver\\\c$\\\DocB.doc"}}

While this code includes the text of DocB, it doesn't include DocB's headers
and footers. Only DocA's headers and footers remain throughout my new
document. Any thoughts on how I can get DocB's headers and footers to be
included for that document and still retain the headers and footers for the
DocA documents?

Headers and Footers are SECTION-specific. That means you need section breaks
between the DocB and DocA parts. Furthermore, the sections have to be
formatted with "Same as Previous" turned off. This can be a bit tricky, and
may require some trial-and-error, but:

1. Insert a section break at the beginning of DocB.

2. Go into the second section's header/footer and turn off "Same As Previous"

3. In DocA, insert a section break and turn off "Same As Previous" in the new
section. Insert the IncludeText field just before this.

4. Mark all of it and press Ctrl+F9 to put it into a pair of field brackets.
Now turn this into an IF field.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:33 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.