NEW USER needs to extract name and insert in letter after 'Dear'

  • Thread starter hwhitney@cancergenetics
  • Start date
H

hwhitney@cancergenetics

I need to extract name and insert in letter I have written.
After the 'Dear'. I have my original database queries in
Access as well as the Mail Merge label files I created.

I have used Access and Word Mail Merge for 2 months and
am fairly good but I have never done this before. Any tips
walks thru How To would be appreciated! Thank you
 
P

Peter Jamieson

Is each of your names&addresses in a single field in your Access database?
Or are they divided up into stuff like FirstName, LastName, Address, City,
etc.?
 
H

hwhitney

In the access queries I created each column holds data like
FirstName LastName Title.
In the Mail Merge Label documents I created, each box/label
has fields specific to the user. Like an address label.

Looking forward to response!
 
P

Peter Jamieson

There are two ways you can insert

Dear (someone)

in a Mail Merge Main document. If that is not the question you need an
answer to, suggest you keep the following material (as you will probably
need it sooner or later anyway) and spell out what you want to do. At this
point, it would be useful to know the version of Word.

If you are using Word 2002 or later, you can insert a "Greeting Line" field
(you should find the option on one of the pages of the Mail Merge Wizard's
task pane, or you can enable the Mailmerge toolbar using e.g.
Tools|Customize, and use the 5th icon from the left).

Or, you can construct your own "Greeting lIne" using bits of text and
individual fields from your data source.

Each method has its advantages and disadvantages, depending on what you are
trying to do.

When you use the "Greeting Line" field, Word constructs the line from a
number of pieces of information in your data source, e.g. Title (as in Mr,
Mrs etc.), LastName and so on. However, if you use names in your data source
that it does not recognise - for example "FamilyName", you will have to use
the "Match fields" option to tell Word which field in your data source
contains the "LastName" and so on.

If you do not (or cannot) use the "Greeting Line" field, you will have to
construct the greeting yourself from individual fields, which you can insert
in various ways depending on the version of Word. Personally, I prefer to
insert the special "field braces" using ctrl-F9 to give {}, then type the
rest, e.g. MERGEFIELD Title to give
{ MERGEFIELD Title }

Constructing the greeting from individual fields is not always easy /unless/
your field always contains exactly the text you need (perhaps including the
"Dear". For example, in some cases you might want to say

Dear Ms Carter

sometimes you might want

Dear Diana

sometimes you might want

Dear Mr and Mrs Carter

and in some cases you might just want

Hi Dave,

and so on.

So you really need to make sure your data source has the information you
need to create the greeting you want.

For example, suppose each of your records potentially has two names, one
consisting of forename1 and surname1 and the other of forename2 and
surname2. Suppose forename1 and surname1 are never blank, but forename2 and
surname2 are either both present or both blank. And suppose you want

Dear forename1 surname1 (where forename2 and surname2 are blank)
and
Dear forename1 and forename2 surname1 (where the names are not blank but
surname1 = surname2)
and
Dear forename1 surname1 and forename2 surname2 (where the names are not
blank and surname1 <> surname2)

In that case, you can combine "IF" fields with MERGEFIELD fields to get what
you want, e.g.

Dear { MERGEFIELD forename 1
} { IF "{ MERGEFIELD surname2 }" = ""
"{ MERGEFIELD surname1 }"
"{ IF { MERGEFIELD surname2 } = { MERGEFIELD surname1 }
"and { MERGEFIELD forename2 } { MERGEFIELD surname1 }"
"{ MERGEFIELD surname1 } and { MERGEFIELD forename 2 } { MERGEFIELD
surname2 }" }" }

and so on...
 

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