>Thank you
>You resolved it.
You're welcome
>BTW
>My (genius) client saved many word files with '' in the file name (double apostrophe ,not inverted commas), so I ignored searching all files whith this.
The double quote is illegal character in a file name or folder name in Windows. See
http://www.berezniker.com/content/pages/visual-foxpro/determine-invalid-characters-file-name-and-path. I'm not sure if it'll work but you can try to rename those files using idea from mskb #
315226.
> I have same problem if the user type apostrophe in text box that used for contain value to retrieve by select query.
You can use different string delimiters (like []) or convert double quote into CHR(39).
lcSearchString = "Peter's Book"
lcSearchString = ["] + STRTRAN(lcSearchValue, ['], [" + CHR(39) + "]) + ["]
? lcSearchString
>>Try
>>oWord.DisplayAlerts = .F.
>>
--sb--