tigershoot
Programmer
Hello
I am using Word 2000 and I am having difficulty with the following.
I am merging data and one of the fields contains a reference code that is always 8 characters long. What I want to do is use an IF statement and check the last two characters in the string. If they equal 'FM' then the condition is met and extra text then prints in the document.
I can get it to work by trying out the IF statement hard coded with the reference code. But when I try using the RIGHT command to slice the string it does not work. The code will vary in the merged data - some with endings other then FM. Only those ending in FM will get the extra text in their letter. Can anyone give a clue as to the exact syntax required.
I must add that I have never attempted anything like this before and that I am a newbie.
I am using Word 2000 and I am having difficulty with the following.
I am merging data and one of the fields contains a reference code that is always 8 characters long. What I want to do is use an IF statement and check the last two characters in the string. If they equal 'FM' then the condition is met and extra text then prints in the document.
I can get it to work by trying out the IF statement hard coded with the reference code. But when I try using the RIGHT command to slice the string it does not work. The code will vary in the merged data - some with endings other then FM. Only those ending in FM will get the extra text in their letter. Can anyone give a clue as to the exact syntax required.
I must add that I have never attempted anything like this before and that I am a newbie.