I'm updating a file that contains versioning and previously it stated that the document requires checking out to edit so I run the following code that results with the same error:
if (oCurrent.File.CheckOutType.ToString() == "None")
{
oCurrent.File.CheckOut();
oCurrent["Tasks Generated"] = "true";
oCurrent.File.CheckIn("Automated Tasks Generated by Event Handler");
oCurrent.Update();
GenerateTasksForNewDocument(oCurrent, ocollCirculation);
}
The file "../sample.txt" is not checked out. You must first check out this document before making changes.
In addition, when changing the code to the following, I get a similar error:
oCurrent.SystemUpdate();
The file International Standards/sample2.txt has been modified by ..\matt on 21 Apr 2015 15:09:26 +0100
How can I get around this as I'm checking the document out already?
Let me know if you need any more information