Good afternoon!
Ive been working on this for what seems like hours.
The title says it all.
I'm trying to set up a VBScript to be ran by Scheduled Tasks.
I need to open a file on Sharepoint, Run a macro, Save, then check the file back in. But I keep receiving errors here and there.
I am using the below. Any thoughts or suggestions would be great! I needed this completed this morning :( Thank you so much!
I am also receiveing an error: "Object doesn' support this property or method; objexcel.application.workbook.checkin'
Ive been working on this for what seems like hours.
The title says it all.
I'm trying to set up a VBScript to be ran by Scheduled Tasks.
I need to open a file on Sharepoint, Run a macro, Save, then check the file back in. But I keep receiving errors here and there.
I am using the below. Any thoughts or suggestions would be great! I needed this completed this morning :( Thank you so much!
I am also receiveing an error: "Object doesn' support this property or method; objexcel.application.workbook.checkin'
Code:
set objExcel = CreateObject("Excel.Application")
drPath = "http://mysites.sharepoint.xxx.xxx.xxx/script%20test.xlsm"
if (objExcel.Workbooks.CanCheckOut(drPath) = True) then
objExcel.Application.Workbooks.Open drPath
objExcel.Application.Workbooks.CheckOut drPath
objExcel.Application.run"'Script Test.xlsm'!Test"
objExcel.application.save
objExcel.Application.Workbooks.Checkin drPath
else
msgbox "Cannot currently checkout file."
end if