I m using Python (and the Win32 extensions) to execute macros in an Excel spreadsheet via the COM interface, as shown below:
import win32com.client
o = win32com.client.Dispatch("Excel.Application")
o.Visible = 1
o.Workbooks.Open (r"C: est.xls")
o.Application.Run("macro1")
What I d like to do is have the Excel macro output text warning messages, which the Python code can catch via COM or stdout (or some other mechanism). Is it possible to write to stdout from within a Microsoft VBA app? Is there another way to do this that I don t know about?