Context: |
Function |
Library/Class: |
WinAPIWrapper |
Function IsMsOfficeRunning() As
IsMsOfficeRunning (Byval Filename As String) As Integer
This function makes some API calls to check if an MS Office Word or Excel application is running with the passed Filename in use. If this is the case the function returns True, otherwise False.
Parameters:
Name of the file to be checked whether it is in use by any MS Office Word or Excel task.
Return Value:
Example:
Fnam = “c:\MyDocument.doc”
If IsMsOfficeRunning(fnam) Then
Call MessageDialog(“The file “ & fnam & “ is in use”,0, _
”Microsoft Word/Excel is running”)
End If
|