UseWordtoSearchforFiles_javascript技巧
來源:懂視網
責編:小采
時間:2020-11-27 20:37:20
UseWordtoSearchforFiles_javascript技巧
UseWordtoSearchforFiles_javascript技巧:Demonstration script that uses Microsoft Word to locate all the .mp3 files stored on drive C of the local computer 代碼如下:Set objWord = CreateObject(Word.Application) Set objDoc
導讀UseWordtoSearchforFiles_javascript技巧:Demonstration script that uses Microsoft Word to locate all the .mp3 files stored on drive C of the local computer 代碼如下:Set objWord = CreateObject(Word.Application) Set objDoc

Demonstration script that uses Microsoft Word to locate all the
.mp3 files stored on drive C of the local computer
代碼如下:
Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Add()
objWord.FileSearch.FileName = "*.mp3"
objWord.FileSearch.LookIn = "C:\"
objWord.FileSearch.SearchSubfolders = True
objWord.FileSearch.Execute
For Each objFile in objWord.FileSearch.FoundFiles
Wscript.Echo objFile
Next
objWord.Quit
聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com
UseWordtoSearchforFiles_javascript技巧
UseWordtoSearchforFiles_javascript技巧:Demonstration script that uses Microsoft Word to locate all the .mp3 files stored on drive C of the local computer 代碼如下:Set objWord = CreateObject(Word.Application) Set objDoc