Created
March 12, 2017 06:12
-
-
Save tmplinshi/652d241abc86914c2bd817590a771621 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; 判断 word 文件是否已经打开 | |
IsDocOpened(FileName) { | |
; 确保 FileName 是完整路径 | |
if !InStr(FileName, ":") | |
FileName := A_ScriptDir "\" FileName | |
try { | |
oWord := ComObjActive("Word.Application") | |
oWord.Documents(FileName) | |
return true | |
} | |
return false | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment