hi
i have this script that worked with ms-word 2000 with win-xp. i imported this script to xp with ms-word 2007. the script is not working with the following error msg:
"this command is not available on this platform"
here's the code:
any ideas what is missing?
thanks.
i have this script that worked with ms-word 2000 with win-xp. i imported this script to xp with ms-word 2007. the script is not working with the following error msg:
"this command is not available on this platform"
here's the code:
Code:
Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Add()
search_string = "field"
objWord.FileSearch.NewSearch
objWord.FileSearch.FileName = typ
objWord.FileSearch.LookIn = dir
objWord.FileSearch.SearchSubfolders = True
objWord.FileSearch.MatchTextExactly = True
objWord.FileSearch.TextOrProperty = search_string
objWord.FileSearch.Execute
For Each objFile in objWord.FileSearch.FoundFiles
if right(objFile, 3) = "vbs" then
msg = msg & objFile & vbcrlf
end if
Next
thanks.