View Single Post
  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Jules Jules is offline
external usenet poster
 
Posts: 51
Default IncludeText if file exists

Thanks very much, exactly what I needed.

"Doug Robbins - Word MVP" wrote:

You could use an If...then...Else field construction that checks for the
(exact) error message

{ IF { INCLUDETEXT "PATH/FILENAME" } "Error! Not a Valid FileName" {
INCLUDETEXT "PATH/FILENAME" } }

You will have to quote the exact error message in place of "Error! Not a
Valid FileName" for this to work.

--
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, originally posted via msnews.microsoft.com

"Jules" wrote in message
...
Is there a way in wording using fields that I can check if a file exists
so
that if I use includetext and the file does not exist I do not get the Not
a
Valid File Name error?
Thank you