Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Hell-fire Hell-fire is offline
external usenet poster
 
Posts: 9
Default How to use a Mergefield in the header

Hi,

I'm new to using Mail Merge and wonder how I can use one of the fields from
my access Query in the header. Is this possible? Thank you
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default How to use a Mergefield in the header

Roughly speaking, if you try to use a mergefield field in a Header, in a
Letter merge Word will show the value of the field in the record that is
current at the bottom of the page - i.e. if your merge only consumes one
record per letter, there can only be one value, but if you have NEXT or
NEXTIF fields in your Mail Merge Main Document, you probably won't get the
/first/ value. Or if you have a continuous section break , the value will
probably be the last one before the section break

However, if you use the mergefield in a Header in a Catalog/Directory merge,
in my experience the output document contains merge field name rather
than any of the values you might hope for. You /may/ be able to fix that by
inserting a continuous section break at the end of your Mail Merge Main
Document, at which point with any luck you will see the value in the record
immediately before the first section break on the output page. But I can't
say I've experimented much with that and you might reach some limit on the
number of section breaks in a document (I don't know).

Another way to do it is to use a STYLEREF field in the header to pick the
thing you want from the body of the document. To do that,
a. you obviously have to put the thing you want in the body of the document
:-)
b. format that thing with a paragraph or character style you invent for the
purpose
c. if the thing is a MERGEFIELD name or names, you may need to use the
\*CHarformat switch to retain the style in the output, e.g. instead of

{ MERGEFIELD myfield }

use

{ MERGEFIELD myfield \*Charformat }

If you don't want the stuff in the header to appear in the document, you
have to hide it in some way. In my experience, if that text in the body is
"Hidden", then so is the result of the STYLEREF field (although there may be
a way to do it). But as long as you can find a plcae to put the text that
does not interfere with horizintal or vertical spacing, you can format the
text in the body as being coloured white, - in that case, you may find that
the STYEREF appears in the header with no special formatting etc.

--
Peter Jamieson
http://tips.pjmsn.me.uk

"Hell-fire" wrote in message
...
Hi,

I'm new to using Mail Merge and wonder how I can use one of the fields
from
my access Query in the header. Is this possible? Thank you


  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Hell-fire Hell-fire is offline
external usenet poster
 
Posts: 9
Default How to use a Mergefield in the header

Thank you Peter,

"Peter Jamieson" wrote:

Roughly speaking, if you try to use a mergefield field in a Header, in a
Letter merge Word will show the value of the field in the record that is
current at the bottom of the page - i.e. if your merge only consumes one
record per letter, there can only be one value, but if you have NEXT or
NEXTIF fields in your Mail Merge Main Document, you probably won't get the
/first/ value. Or if you have a continuous section break , the value will
probably be the last one before the section break

However, if you use the mergefield in a Header in a Catalog/Directory merge,
in my experience the output document contains merge field name rather
than any of the values you might hope for. You /may/ be able to fix that by
inserting a continuous section break at the end of your Mail Merge Main
Document, at which point with any luck you will see the value in the record
immediately before the first section break on the output page. But I can't
say I've experimented much with that and you might reach some limit on the
number of section breaks in a document (I don't know).

Another way to do it is to use a STYLEREF field in the header to pick the
thing you want from the body of the document. To do that,
a. you obviously have to put the thing you want in the body of the document
:-)
b. format that thing with a paragraph or character style you invent for the
purpose
c. if the thing is a MERGEFIELD name or names, you may need to use the
\*CHarformat switch to retain the style in the output, e.g. instead of

{ MERGEFIELD myfield }

use

{ MERGEFIELD myfield \*Charformat }

If you don't want the stuff in the header to appear in the document, you
have to hide it in some way. In my experience, if that text in the body is
"Hidden", then so is the result of the STYLEREF field (although there may be
a way to do it). But as long as you can find a plcae to put the text that
does not interfere with horizintal or vertical spacing, you can format the
text in the body as being coloured white, - in that case, you may find that
the STYEREF appears in the header with no special formatting etc.

--
Peter Jamieson
http://tips.pjmsn.me.uk

"Hell-fire" wrote in message
...
Hi,

I'm new to using Mail Merge and wonder how I can use one of the fields
from
my access Query in the header. Is this possible? Thank you



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MergeField Jeff Bergeron Mailmerge 2 February 22nd 07 03:19 PM
Using IF with MERGEFIELD [email protected] Mailmerge 2 June 21st 06 04:17 PM
OR in a mergefield? Compass Rose Mailmerge 2 April 12th 06 06:04 AM
Calculations in a mergefield. [email protected] Mailmerge 14 March 3rd 06 08:36 PM
Mergefield format Ctay Mailmerge 2 February 19th 05 09:51 PM


All times are GMT +1. The time now is 08:07 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"