Access+Word: Mail Merge particulars

  • Thread starter Daniel Friedman
  • Start date
D

Daniel Friedman

I'm trying to develop a membership directory using data
stored in Access. I want to produce the directory in
Word since it seems to allow much easier and finer
control of how text appears--margins, fonts, etc. (I'm
sure VBA would allow such, but a Word template seems much
easier, plus it's graphical, and so easier to visualise
the results.)

I've succeeded in doing some of what I want with a Word
template containing MERGEFIELDs, and filling it in with
MailMerge via Automation, but I have a few questions:

1) I have a group of MERGEFIELDs for name, address, etc.
I find that after MailMerge fills in the entire group of
MERGEFIELDs, a section break [which I find effectively
becomes a page break] is introduced. How can I suppress
this automatic behavior? I want to just continue with
the next directory entry right where it left off after
the first, fill up a page, and only *then* continue onto
the next page.

2) How can I explicitly set a MERGEFIELD value? Maybe I
have to loop through all the records, fine. For each
record, I want to assign a value to one of the
MERGEFIELDs in the Word document, and this value is
computed based on various values I have in the record.

3) Maybe I should be using Word bookmarks instead of
MERGEFIELDs. But I don't see how to do so if I want to
process *many* or *all* records and produce output
corresponding to multiple records on a single page (and
continue on multiple pages) within a single Word document.

Many, many thanks,
--daniel friedman
danielf at erols dot com
 
C

Cindy Meister -WordMVP-

Hi Daniel,
1) I have a group of MERGEFIELDs for name, address, etc.
I find that after MailMerge fills in the entire group of
MERGEFIELDs, a section break [which I find effectively
becomes a page break] is introduced. How can I suppress
this automatic behavior?
Choose the Catalog (or Directory) type of mail merge, rather
than "form letter".
2) How can I explicitly set a MERGEFIELD value? Maybe I
have to loop through all the records, fine. For each
record, I want to assign a value to one of the
MERGEFIELDs in the Word document, and this value is
computed based on various values I have in the record.
can you describe the type of calculation you have in mind?
Since you're using Access as the data source, I'd say in a
general way you'd be better off doing anything like this in
an EXPRESSION in the query datasource.
3) Maybe I should be using Word bookmarks instead of
MERGEFIELDs. But I don't see how to do so if I want to
process *many* or *all* records and produce output
corresponding to multiple records on a single page (and
continue on multiple pages) within a single Word document.
This could also be done. You'd just insert the "boiler-plate
text" for each record from an AutoText entry or a separate
file, then fill it in. The critical question is whether the
version of Word you have retains the original set of
bookmarks, or accepts the new set you're importing as the
unique set.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jan
24 2003)
http://www.mvps.org/word

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

Daniel Friedman

Cindy,

Thanks very much for your helpful reply. Please see my
responses to yours (I've removed my original post's
text)...

[regarding eliminating unwanted section breaks in mail
merge]
Choose the Catalog (or Directory) type of mail merge, rather
than "form letter".

Sounds like just what I need; I'll give it a try!

[regarding explicitly assigning values to placeholders in
Word]
can you describe the type of calculation you have in mind?
Since you're using Access as the data source, I'd say in a
general way you'd be better off doing anything like this in
an EXPRESSION in the query datasource.

Well, I was hoping for a solution which is independent of
the type of calculation, since I have multiple sorts of
calculation. And some of these "calculations" are
various sorts of string processing I've built with VBA
functions. Examples:
--if (field1 is true) then assign field2 to placeholder
in Word, else assign field3 concatenated with field4 to
that placeholder (or, to some other placeholder).
--evaluate my_func(field8,field9,field10) and assign
result to placeholder in Word
--etc.

[regarding using bookmarks instead of merge fields, in
Word]
This could also be done. You'd just insert the "boiler- plate
text" for each record from an AutoText entry or a separate
file, then fill it in. The critical question is whether the
version of Word you have retains the original set of
bookmarks, or accepts the new set you're importing as the
unique set.

I have Word XP. But this bookmark-related seems like it
might be more complicated than doing the merge scheme,
and the benefit is not obvious to me.

Thanks very much for your help,
--daniel
 

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