View Single Post
  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
John John is offline
external usenet poster
 
Posts: 307
Default Mergefield statement help

Thank you for your suggestions. I appreciate that it should work. I have
had several persons in my office check the entry of the statement and it is
official that I have typed the statement as should be regarding your example
below.

Regarding updating the field.....I used both select all and file save as
well as select all and F9. Using the F9 to update has worked in the past for
any changes I have made to these forms.

As far as the entry of the field itself, I am using the Insert Merge Field
button in my document and choosing the AKA field.

Something is still not working properly. With an aka the result/print is
correct. Without an aka just a space prints between the employee last name
and the employer name. No v. prints at all for an employee with a blank aka
field.

In the Tools Options I have the "Update Automatic Links at Open" under
General Tab checked.

Is there something else I am missing?

Thank you,
AJ
--
John R.


"Doug Robbins - Word MVP" wrote:

There must be something wrong with the way that you have entered the field.

{IF {MERGEFIELD AKA} "" "{MERGEFIELD AKA} v." "v."}

If AKA is empty, that is "" is false, then the above construction will
return v.

Maybe the fields need updating to display the result.


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

"John" wrote in message
...
I tried your suggestion.
It works well for those entries that an "aka" exists for. Unfortunately
for
those entries where the "aka" field is blank the v. does not print.

Thanks for your help.

AJ
--
John R.


"Doug Robbins - Word MVP" wrote:

{MERGEFIELD EmployeeFirst} {IF {MERGEFIELD EE_MI} "" "{MERGEFIELD
EE_MI }
"}{MERGEFIELD EmployeeLast} {IF {MERGEFIELD AKA} "" "{MERGEFIELD AKA}
v."
"v."}
{MERGEFIELD Employer}


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

"John" wrote in message
...

Result I want whether employee has an entry in "aka" field or not.
«EmployeeFirst» L. «EmployeeLast» aka Larry Alan Young v. «Employer»

{MERGEFIELD EmployeeFirst} {IF {MERGEFIELD EE_MI} "" "{MERGEFIELD
EE_MI }
"}{MERGEFIELD EmployeeLast} {IF {MERGEFIELD AKA} "" "{MERGEFIELD
AKA}"}v.
{MERGEFIELD Employer}

Merged Result using above:

Name with aka in field: Alan L. Young aka Larry Alan Youngv. (this
result
needs space between g and v.)
Name with blank aka field: Martin Begg v. (this result has correct
spacing)

If I instead add a space in front of the v. in above mergefield
statement,
I
get the following result:

Name with aka in field: Alan L. Young aka Larry Alan Young v. (this
spacing is correct between g and v.)
Name with blank aka field: Martin Begg v. (this result has added an
additional space and is incorrect)


Same Mergefield statement but in sentence format:

The employee «EmployeeFirst» «EmployeeLast». The next sentence starts.

The employee {MERGEFIELD EmployeeFirst} {IF {MERGEFIELD EE_MI} ""
"{MERGEFIELD EE_MI } "}{MERGEFIELD EmployeeLast} {IF {MERGEFIELD AKA}
""
"{MERGEFIELD AKA}"}. The next sentance starts


Merge Result:

Name with aka in field: Alan L. Youngaka Larry Alan Young. (needs
space
between g and aka, but the spacing at end with period is correct)

Name with blank aka field: Martin Begg. (has correct spacing at
period)

Can someone tell me where my mergefield statement is incorrect so that
I
can
use in all instances shown above.

Thank you,
AJ


--
John R.