I have a Run Command workflow. When I run it on my local computer, works fine. When I run it on the server Designer version it works fine and creates the expected excel file. When I run in the gallery, it executes successfully but the excel file is not created. The excel macro is manipulating some data and saving off a new file. I've attached the run command image as well as the vb script code below.
I confirmed that the server isn’t restricted. I cannot figure out why it won’t work on Gallery.
'Input Excel File's Full Path
ExcelFilePath = "C:\Test_Files\Template\Template.xlsm"
'Input Module/Macro name within the Excel File
MacroPath = "Module1.Save"
'Create an instance of Excel
Set ExcelApp = CreateObject("Excel.Application")
'Do you want this Excel instance to be visible?
ExcelApp.Visible = True 'or "False"
'Prevent any App Launch Alerts (ie Update External Links)
ExcelApp.DisplayAlerts = False
'Open Excel File
Set wb = ExcelApp.Workbooks.Open(ExcelFilePath)
On Error Resume Next
'Execute Macro Code
ExcelApp.Run MacroPath
'Save Excel File (if applicable)
wb.Save
'Reset Display Alerts Before Closing
ExcelApp.DisplayAlerts = True
'Close Excel File
wb.Close
'End instance of Excel
ExcelApp.Quit