Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / March 2008

Tip: Looking for answers? Try searching our database.

Merge fields in header

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ed - 21 Feb 2008 20:01 GMT
I have a form that has a header and four "subforms". The header has
MailMerge fields for the <<SUBMITTER>> and his <<PHONE>. Each subform
has several data fields. I have <<Next RECORD>> in front of the first
field in the second, third and forth
subforms. All of the data is in an Excel worksheet. In addition to the
data needed for the subforms, each row repeats the
SUBMITTER and PHONE, although these items are the same for all rows.

The scheme works pretty well. If there are more than four rows in the
Excel worksheet a new form is started. But, here's the glitch.
The SUBMITTER and PHONE fields are left blank in all forms but the
first. So, how do I get it to fill these fields in the second and
later forms?

TIA

Ed
Doug Robbins - Word MVP - 21 Feb 2008 22:16 GMT
By "header", do you mean header as in the header and footer of the document?

How are the subforms separated from each other and from the "header"  If
they are in separate Sections and the "header" is of the type mentioned
above, do you have a header set up in each of those sections?

If the "header" is of the type mentioned above, you could  probably achieve
what you want by linking the headers in the following sections (sub forms)
to the header in the "header"

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

>I have a form that has a header and four "subforms". The header has
>MailMerge fields for the <<SUBMITTER>> and his <<PHONE>. Each subform has
[quoted text clipped - 12 lines]
>
> Ed
Ed - 24 Feb 2008 16:23 GMT
Doug,

I guess the best way to answer your questions is to show you the form:

http://www.efsowell.us/ed/JOCLA/JCNAMEM01Form.doc

As you can see, the SUBMITTER field is in the header (as in
header/footer). The subforms,
for want of a better term, are just Word tables in the body. There is
only one Section.

Ed

> By "header", do you mean header as in the header and footer of the
> document?
[quoted text clipped - 26 lines]
>>
>> Ed
Peter Jamieson - 24 Feb 2008 17:14 GMT
Try this:

a. Put the { MERGEFIELD submitter } somewhere in your form (e.g. just after
the LASTNAME mergefield in the first block in the form.
b. Modify the field so it reads
{ MERGEFIELD submitter \*Charformat }
c. create a character style called (say) submitterstyle
d. set the font of submitterstyle to have colour white
e. apply the style to the mergefield you just entered (apply it to the
mergefield code, not the result)
f. replace the { MERGEFIELD submitter } field that you have in your header
by

{ STYLEREF submitterstyle }

Signature

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

> Doug,
>
[quoted text clipped - 37 lines]
>>>
>>> Ed
Ed - 27 Feb 2008 18:08 GMT
Thanks, Peter.

I gave it a try but it doesn't work. Perhaps I don't understand
exactly how to do Step f.  I tried it with both
<<STYLEREF SubmitterStyle>> and {STYLEREF SubmitterStyle} but it
doesn't work. In fact,
now the submitter name from the data source doesn't appear on even the
first page.

What am I missing?

Ed
> Try this:
>
[quoted text clipped - 56 lines]
>>>>
>>>> Ed
Doug Robbins - Word MVP - 27 Feb 2008 19:13 GMT
Did you use Ctrl+F9 to insert the field delimiters { } for {STYLEREF
SubmitterStyle} ?

The submitter name will not appear on the first page because if you followed
Peter's instructions correctly, the font in the SubmitterStyle is formatted
as white.

One thing that you might have to do however is add a \* charformat switch to
the
{STYLEREF SubmitterStyle} field and format the S of  STYLEREF so that the
colour of the font is black.

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

> Thanks, Peter.
>
[quoted text clipped - 64 lines]
>>>>>
>>>>> Ed
Ed - 03 Mar 2008 15:29 GMT
Doug, Peter,

Well I wasn't using CTRL-F9, but I am now without success. I guess i
don't understand the
difference between the << >> that is produced when a MailMerge field
is inserted and
the CTRL-F9 { }.

Ed

> Did you use Ctrl+F9 to insert the field delimiters { } for {STYLEREF
> SubmitterStyle} ?
[quoted text clipped - 80 lines]
>>>>>>
>>>>>> Ed
Peter Jamieson - 03 Mar 2008 16:03 GMT
> Well I wasn't using CTRL-F9, but I am now without success. I guess i don't
> understand the
> difference between the << >> that is produced when a MailMerge field is
> inserted and
> the CTRL-F9 { }.

With most field types, Word can either display
a. the field code (e.g. { REF xyz }
b. the field result - if the bookmark xyz is set to "23.2", the result of
{ REF xyz } is 23.2

You can toggle between "codes" and "results"

With Merge fields, "results" can be displayed in two different ways,
depending on whether you are previewing the data or not. So you might see
a. a field code such as { MERGEFIELD myfield }
b. a field "result" when you are not previewing, which would look like
<<myfield>>
c. a field result when you are previewing, which would show the data from
the currently selected record in the data source, e.g. 23.2

It may be that that knowledge will help you identify that you are doing
something differently from the approach Doug and I suggested, or it may be
that you have done everything correctly and it simply does not not work for
you there. If you despam my address (remove "KillmapS") and email your doc
as you have it now, plus some sample data, I will try it here (please remind
me which version of Word you are using.

Signature

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

> Doug, Peter,
>
[quoted text clipped - 87 lines]
>>>>>>>
>>>>>>> Ed
Peter Jamieson - 05 Mar 2008 16:48 GMT
I emailed a revised version of your sample back - if you didn't get it, drop
me another email and I'll try again - or you can see if the following
instructions work:

The main points are:
a. make sure you can see the underlying field codes (in the view where they
look like { MERGEFIELD myfield }
b. Apply the Submitterstyle style to the entire  { MERGEFIELD Submitter
\*Charformat } field (including the field code braces
c. The { STYLEREF SubmitterStyle } field in the header has ordinary braces
instead of the special field code braces. You need to delete the ordinary
ones, select "STYLEREF SubmitterStyle" and press ctrl-F9 to insert some real
field code braces.
d. Seems to work here in Word 2003.

Signature

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

>> Well I wasn't using CTRL-F9, but I am now without success. I guess i
>> don't understand the
[quoted text clipped - 117 lines]
>>>>>>>>
>>>>>>>> Ed
Ed - 06 Mar 2008 15:45 GMT
Peter,

Yes, I got it and it works! Thanks.

I now notice I have to do the same thing with the PHONE field.

Ed

>I emailed a revised version of your sample back - if you didn't get
>it, drop me another email and I'll try again - or you can see if the
[quoted text clipped - 139 lines]
>>>>>>>>>
>>>>>>>>> Ed

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.