title: Check to see if a specific Excel file is open
body: <p>I use extensive Excel-Word linking, updated manually with VBA code. If the Excel file is not open, Word attempts to open it, warns that opening it again is trouble, requires a dialog box be answered, then go to the next link and starts again. Since there are usually 100 links, this is a big problem.</p>
  
  <p>I found simple VBA code that calls a function to check if Excel is running.</p>
  
  <pre><code>    Dim sApp As String
      sApp = "Excel.Application"
      If IsAppRunning(sApp) = True Then
          MsgBox "Excel is Running, continue" &amp; SourceFileName
      Else
          MsgBox "Excel is NOT Running, abort"
          Exit Sub
      End If
  </code></pre>
  
  <p>I want to check if the RIGHT Excel file is open. The "right" file will have the same name as the Word file, e.g., MyDocSample.doc will be linked to MyDocSample.xls.</p>
  
  <p>If MyDocSample.xls is open, then continue, if not, a warning should be posted saying "MyDocSample.xls" is not open, and offer an Abort selection.</p>