I am trying to run a vbscript that opens excel then executes a macro. I have code that works but I get an error saying "The macro "sort" can not be found. I found that if you open excel by the script it does not load any of the macros. I did some searching and found that by opening excel via automation does not load all addins and startup files to load quicker. Is there something that I can put in the script that will load the macro files? Here is what I have for the script.
Code:
filePath = "C:\Scripts\capplot\utilization.csv"
Set oExcel = CreateObject("Excel.Application")
oExcel.Workbooks.Open(filepath)
oExcel.Visible = True
oExcel.Run "utilization"
oExcel.ActiveWorkbook.Save
oExcel.ActiveWorkbook.Close
oExcel.Quit
Set oExcel = Nothing