blank fields

A

Alex

Hi

I have three fields - Title Forename and Surname.
If Title has data I need to mailmerge Title First Char of Forename and
Surname
If title is empty II need first Char of Forename and Surname
Can some kind person tell me the best or most correct syntax please

Thanks
A
 
D

Doug Robbins - Word MVP

There is no way extracting the first letter of the forename using mail merge
fields. The best way to do that would be to put the data source into Excel
and then you can use the Left() function to populate a column with the first
letter. While you are doing that there, you could also combine it with the
Title if there is one using the If() function in Excel.

That part of it can however be done using a field construction in Word as
follows:

{ IF { MERGEFIELD Title } <> "" "{ MERGEFIELD Title } { MERGEFIELD
Initial }" "{ MERGEFIELD Initial }" }

You must use Ctrl+F9 to insert the field delimiters { } and you use Alt+F9
to toggle off their display.

--
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
 
G

Graham Mayor

You are going to need a fourth field - Initial - which can easily be derived
from the forename field in (say) Excel - but not with Word fields.
The syntax would then be
{IF {Mergefield Title} <> "" "{Mergefield Title} {Mergefield Initial}"
"{Mergefield Forename}"}

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
M

macropod

Hi Alex,

You'll need to modify your data source to hold the initials as well as the
names. Then your mailmerge could use an IF test against the title to
determine whether to use the name or initials

Cheers
 

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