We have Excel workbooks that are currently opened manually. When opened, SFTP download macros are automatically executed. We will be automating the opening of these workbooks via Windows scheduled tasks so that the downloads are done automatically each morning.

First, does anyone have any examples of job streams (MSDOS .bat files) that open Excel and Access and auto execute macros?

Second, is there a way to determine if the Excel workbook was opened manually by a user or opened via a scheduled .bat file task? It's important to know how the workbooks were opened.

Thanks.