View Single Post
 
Old 01-11-2022, 03:31 PM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

As discussed under the 'Test Whether a Mergefield Contains a Given String' topic in the Mailmerge Tips & Tricks 'Sticky' thread at the top of this forum (https://www.msofficeforums.com/mail-...ps-tricks.html), you would have to know the position of the '/' character. A '*/*' test is not possible. If the '/' can appear in numerous positions, you'd need to construct a compound test against each of those positions. For example:
{QUOTE{SET Data MERGEFIELD MyField}{IF{={IF{REF Data}= "?/*" 1 0}+{IF{REF Data}}= "??/*" 1 0}+{IF{REF Data}}= "???/*" 1 0}+{IF{REF Data}}= "????/*" 1 0}+{IF{REF Data}}= "?????/*" 1 0}> 0 "/ Found" "/ Not Found"}}
Even then, Word can't parse the field to split out the sort_name.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote