Hi Bob,
You can do this with strictly numeric strings, but not with alpha-numeric
strings, so "NN-NNNNN" or "NN-NNNNN-NN" will work, but not "NN-NNNNN-9P7".
See the following field for an example of how to code such a field:
{QUOTE{SET ID "12-34567-890"}{SET EXP1{=-{=-{ID}-ID}/2}}{SET
EXP2{=-({ID}*(-1)-{ID})/2}}{SET
EXP3{=-({EXP1}+{EXP2}-{ID})}}{=IF({EXP2}=0,{EXP3 \# 00000},{EXP2 \#
00000})}}
You'll get the same output with this field regardless of whether there is a
third (numeric) string in the sequence.
Cheers
PS: The field braces '{}' are input in pairs using Ctrl-F9, and the numeric
picture switches for EXP2 and EXP3 are to preserve leading 0s.
I use a program that merges to Word 2000. One field that I merge is a
court case number that in the program is in the following format "NN-NNNNN"
or sometimes "NN-NNNNN-9P7". The first two numbers are the year and the
next five numbers are the case number. I need to merge the case number
into a document, but only display the middle five numbers. Can this be
done? Thanks for any help you can give.