title: Code executes sometimes and gives error for the other times
body: <p>I am trying to automate a process in excel.  I have called two macros from Python.  The code executes successfully sometimes and sometimes gives an error.  I have saved the macros and the python file in the same location.</p>
  
  <pre><code>import os,os.path
  import win32com.client
  Path = 'xyz'
  if os.path.exists(r'D:\Code\ABC.xlsx'):
      xl = win32com.client.Dispatch("Excel.Application")
      xl.Workbooks.Open(os.path.abspath('D:\Code\ABC.xlsx'))
      xl.Application.Run(Macro.xlsm!Module1.Macro1, Path)
      xl.Application.Run(Macro.xlsm!Module2.Macro2)
      xl.Application.ActiveWorkbook.Save()
      del xl
  </code></pre>
  
  <p>The error that it gives at times is:</p>
  
  <blockquote>
    <p>(-2147352567, 'Exception occured.',(0,''Microsoft Excel','Cannot run
    macro 'D:\Code\Macro.xlsm!Module1.Macro1'. The macro may not be
    available in this workbook or all macros may be disabled',
    'xlmain11.chm, 0, -2146827284'), None)</p>
  </blockquote>
  
  <p>I am getting a new error, which is constant:
  //winp-oaf-118/FldrRedir_3$/Data/Macro.xlsm' cannot be found.Check your spelling, or try a different path.</p>