Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
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 | |
|
|
![]() |
||||
Thread | Forum | |||
CUT function. | Microsoft Word Help | |||
Select function | Microsoft Word Help | |||
Function key | Microsoft Word Help | |||
Cc Function for Mailmerge via Outlook | Mailmerge | |||
Help function | New Users |