View Single Post
  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default Using IF to find whether a Merge Field contains a substring

You are not going to be able to do that with an IF field during the mail
merge process. What you will have to do is modify the data source so that
the string is in a separate field. Just how you go about doing that will
depend upon the data source. It will probably require a macro to do it, but
it is not too difficult.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Joshua Pangborn" wrote in
message ...
I am merging some letters, and I have a merge field that lists a number of
codes separate by new lines. I need to include another document if a
particular code is in the mergefield. I know that you can use IF
MergeField =
"string", but that returns false. I have tried IF MergeField = "*string*",
but that also returns false. Is there another way to test if a merge field
contains a string? Thanks. I can provide more information if needed.
--
- Joshua Pangborn