yuechu
Chemical
- Oct 21, 2015
- 5
I am writing a macro that would:
check out a document from sharepoint
open a document on C drive
save (stack) the open document on the sharepoint document
close the file
check in the document.
my code is as follows:
Workbooks.CheckOut "Set wbTarget = Workbooks.Open("c:\theTestFile.xlsx")
wbTarget.SaveAs FileName:="wbTarget.CheckIn SaveChanges:=False, Comments:="updating file"
wbTarget.Close False
I keep getting an error when I check get to the checkin line:"we can't do that for you because the file is no longer checked out or has been deleted.".....but file is not deleted and I'm checking it in after it was checked out....any ideas?
check out a document from sharepoint
open a document on C drive
save (stack) the open document on the sharepoint document
close the file
check in the document.
my code is as follows:
Workbooks.CheckOut "Set wbTarget = Workbooks.Open("c:\theTestFile.xlsx")
wbTarget.SaveAs FileName:="wbTarget.CheckIn SaveChanges:=False, Comments:="updating file"
wbTarget.Close False
I keep getting an error when I check get to the checkin line:"we can't do that for you because the file is no longer checked out or has been deleted.".....but file is not deleted and I'm checking it in after it was checked out....any ideas?