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 2007

Tip: Looking for answers? Try searching our database.

Mergefield statement help

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John - 22 Mar 2007 17:02 GMT
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

Signature

John R.

John - 22 Mar 2007 17:22 GMT
I forgot to add that I am working with Word 2000 (form files) and Excel 2000
(database) merging the two.

OS is XP Pro

Thank you,
AJ for John R.

> Result I want whether employee has an entry in "aka" field or not.
> «EmployeeFirst» L. «EmployeeLast» aka Larry Alan Young v. «Employer»
[quoted text clipped - 37 lines]
> Thank you,
> AJ
Doug Robbins - Word MVP - 22 Mar 2007 18:41 GMT
{MERGEFIELD EmployeeFirst} {IF {MERGEFIELD EE_MI} <>"" "{MERGEFIELD EE_MI }
"}{MERGEFIELD EmployeeLast} {IF {MERGEFIELD AKA} <>"" "{MERGEFIELD AKA} v."
"v."}
{MERGEFIELD Employer}

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

> Result I want whether employee has an entry in "aka" field or not.
> «EmployeeFirst» L. «EmployeeLast» aka Larry Alan Young v. «Employer»
[quoted text clipped - 43 lines]
> Thank you,
> AJ
John - 22 Mar 2007 19:25 GMT
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
Signature

John R.

> {MERGEFIELD EmployeeFirst} {IF {MERGEFIELD EE_MI} <>"" "{MERGEFIELD EE_MI }
> "}{MERGEFIELD EmployeeLast} {IF {MERGEFIELD AKA} <>"" "{MERGEFIELD AKA} v."
[quoted text clipped - 48 lines]
> > Thank you,
> > AJ
Doug Robbins - Word MVP - 22 Mar 2007 22:12 GMT
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.

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 tried your suggestion.
> It works well for those entries that an "aka" exists for.  Unfortunately
[quoted text clipped - 64 lines]
>> > Thank you,
>> > AJ
John - 23 Mar 2007 16:21 GMT
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
Signature

John R.

> There must be something wrong with the way that you have entered the field.
>
[quoted text clipped - 73 lines]
> >> > Thank you,
> >> > AJ
John - 23 Mar 2007 17:48 GMT
Thank you.  I found my error.  I had copied a previous IF section and just
inserted the aka field.  I decided to start all from scratch using the Insert
Field then Mailmerge category and completed the statement you offered.

It works just as you have indicated.
Sorry to irritate you over this.  

Very much appreciate all your help and comments.

AJ
Signature

John R.

> There must be something wrong with the way that you have entered the field.
>
[quoted text clipped - 73 lines]
> >> > Thank you,
> >> > AJ
 
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.