FindFile_Word

Finds a file within open documents of current instance

Function FindFile_Word(FileOnlyName)
 ' Finds a file within open documents
 Found1 = False
 For i = 1 To Documents.Count
  If UCase(FileOnlyName) = UCase(Documents(i).Name) Then
   Found1 = True
   Exit For
  End If
 Next
 FindFile_Word = Found1
End Function

Parameters

FileOnlyName

Examples

If FindFile_Word("Resume 2018.doc") Then Msgbox "Please open doc first"

Views 56 Downloads 19

Perm link