Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
RizzKid RizzKid is offline
external usenet poster
 
Posts: 14
Default Using a function in Mailmerge

Office 2007. I'm doing a mailmerge using an Excel spreadsheet via OLE. I've
got a field that contain's a person's name, and am trying to find an easy way
to deal with text in the possessive form. For example:
{ MERGEFIELD Person }'s belongings
generates
Bill's belongings
Morris's belongings
etc. The problem is that I'd like "Morris's" to become "Morris'". If I could
just test for RIGHT({ MERGEFIELD Person },1)="s" that would do the trick. But
I can't find any way to do it. Of course I could accomplish this in Excel and
pass another field to Word, but I'm trying not to.
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Using a function in Mailmerge

Sadly there are no RIGHT, LEFT, MID, LEN, INSTR etc functions associated
with fields (though they have been requested) so your choices are to add
another field to your data source or use conditional fields to cover all
such names you know to be in the date source.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


RizzKid wrote:
Office 2007. I'm doing a mailmerge using an Excel spreadsheet via
OLE. I've got a field that contain's a person's name, and am trying
to find an easy way to deal with text in the possessive form. For
example: { MERGEFIELD Person }'s belongings
generates
Bill's belongings
Morris's belongings
etc. The problem is that I'd like "Morris's" to become "Morris'". If
I could just test for RIGHT({ MERGEFIELD Person },1)="s" that would
do the trick. But I can't find any way to do it. Of course I could
accomplish this in Excel and pass another field to Word, but I'm
trying not to.



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Using a function in Mailmerge

On further reflection, the following may be sufficient to do what you want:

{ IF { Mergefield Person } = "*s" "{ Mergefield Person }'" "{ Mergefield
Person }' s"}

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


RizzKid wrote:
Office 2007. I'm doing a mailmerge using an Excel spreadsheet via
OLE. I've got a field that contain's a person's name, and am trying
to find an easy way to deal with text in the possessive form. For
example: { MERGEFIELD Person }'s belongings
generates
Bill's belongings
Morris's belongings
etc. The problem is that I'd like "Morris's" to become "Morris'". If
I could just test for RIGHT({ MERGEFIELD Person },1)="s" that would
do the trick. But I can't find any way to do it. Of course I could
accomplish this in Excel and pass another field to Word, but I'm
trying not to.



  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
RizzKid RizzKid is offline
external usenet poster
 
Posts: 14
Default Using a function in Mailmerge

Brilliant! It did just what I was looking for. Thanks for the help.

"Graham Mayor" wrote:

On further reflection, the following may be sufficient to do what you want:

{ IF { Mergefield Person } = "*s" "{ Mergefield Person }'" "{ Mergefield
Person }' s"}

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


RizzKid wrote:
Office 2007. I'm doing a mailmerge using an Excel spreadsheet via
OLE. I've got a field that contain's a person's name, and am trying
to find an easy way to deal with text in the possessive form. For
example: { MERGEFIELD Person }'s belongings
generates
Bill's belongings
Morris's belongings
etc. The problem is that I'd like "Morris's" to become "Morris'". If
I could just test for RIGHT({ MERGEFIELD Person },1)="s" that would
do the trick. But I can't find any way to do it. Of course I could
accomplish this in Excel and pass another field to Word, but I'm
trying not to.




  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Using a function in Mailmerge

You are welcome

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



RizzKid wrote:
Brilliant! It did just what I was looking for. Thanks for the help.

"Graham Mayor" wrote:

On further reflection, the following may be sufficient to do what
you want:

{ IF { Mergefield Person } = "*s" "{ Mergefield Person }'" "{
Mergefield Person }' s"}

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


RizzKid wrote:
Office 2007. I'm doing a mailmerge using an Excel spreadsheet via
OLE. I've got a field that contain's a person's name, and am trying
to find an easy way to deal with text in the possessive form. For
example: { MERGEFIELD Person }'s belongings
generates
Bill's belongings
Morris's belongings
etc. The problem is that I'd like "Morris's" to become "Morris'". If
I could just test for RIGHT({ MERGEFIELD Person },1)="s" that would
do the trick. But I can't find any way to do it. Of course I could
accomplish this in Excel and pass another field to Word, but I'm
trying not to.



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CUT function. Boots Microsoft Word Help 1 October 3rd 07 09:01 PM
Select function Kelly Microsoft Word Help 1 July 31st 07 10:54 PM
Function key tatanka Microsoft Word Help 3 December 12th 06 07:23 AM
Cc Function for Mailmerge via Outlook gwen Mailmerge 1 December 5th 06 01:34 PM
Help function guru perplexe New Users 1 April 9th 05 06:49 PM


All times are GMT +1. The time now is 06:03 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"