View Single Post
  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Require an If Mergefield Statement to import text into word200

You need either two \\ or one /

You should also be able to use a notepad (.txt) file.

--
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

"Briza" wrote in message
...
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.

"Doug Robbins - Word MVP" wrote:

{ IF { MERGEFIELD "fieldname" } = "good" { INCLUDETEXT "c:\\good.docx" }
{
INCLUDETEXT "c:\\bad.docx" } }

You must use Ctrl+F9 to insert each pair of field delimiters { }

--
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

"Briza" wrote in message
...
Trying to write an if statement in word2007 for a mergefield whereby if
mergefield = "good" then insert the text (which is about 500
characters)
from
a word document located at c:\good.docx and if mergefield = "bad" then
insert
the text (which is also about 500 characters) from a word document
located
at
c:\bad.docx

Can someone please write the if statement to do this?

Alternatively, could i use a notepad document instead of a word
document
to
import text from (eg good.txt and bad.txt).
Thanks in advance