{ IF { MERGEFIELD "fieldname" } = "good" { INCLUDETEXT "c:\\good.docx" } {
INCLUDETEXT "c:\\bad.docx" } }
You must use Ctrl+F9 to insert each pair of field delimiters { }

Signature
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
> Trying to write an if statement in word2007 for a mergefield whereby if
> mergefield = "good" then insert the text (which is about 500 characters)
[quoted text clipped - 11 lines]
> import text from (eg good.txt and bad.txt).
> Thanks in advance
Briza - 08 Nov 2007 23:12 GMT
Thank you for the reply however it is not working.
Is it supposed to have 2 \\ for the location becuase I thought it would just
be c:\good.docx
Also can I use a notepad document instead (ie. .txt file)?
Thanks again.
> { IF { MERGEFIELD "fieldname" } = "good" { INCLUDETEXT "c:\\good.docx" } {
> INCLUDETEXT "c:\\bad.docx" } }
[quoted text clipped - 16 lines]
> > import text from (eg good.txt and bad.txt).
> > Thanks in advance
Doug Robbins - Word MVP - 09 Nov 2007 02:30 GMT
You need either two \\ or one /
You should also be able to use a notepad (.txt) file.

Signature
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
> Thank you for the reply however it is not working.
> Is it supposed to have 2 \\ for the location becuase I thought it would
[quoted text clipped - 28 lines]
>> > import text from (eg good.txt and bad.txt).
>> > Thanks in advance