1

Sometimes it happens that users leave documents checked out as drafts.

They are in the library but just not visible, and I can override the checkout if I want to.

However, I wanted a way to grab a copy of the document and take a look at it before deciding what to do.

So, is is possible, either from the UI or programatically, to download a copy of a user's draft document (apparently stored in the library itself)?

enter image description here

0

Well, first of all you should know where user has decided to store the drafts. Maybe the user has decided to store the drafts on their computer, so that would be in the "SharePoint Drafts" folder or maybe in default's SharePoint folder. Here you can see how to change that option.

  • Using UI: Make the folder for drafts of any user accessible for you so that you can read their drafts.
  • Programatically: Multiple options. But you could code some kind of script that would loop through the folders, to get a copy of the documents that you want.
  • thanks for taking the time. unfortunately this isn't very helpful. a) if a user has left the company, there is no folder to find. also I'm pretty sure we don't use local drafts b) you state that there are programmatic options but you don't reference any. theory may sound nice but in practice it's not that easy. ref: " I think CSOM doesn't support getting checked-out documents even if you are using SCA account. I did test it with getting draft versions and it wont work" sharepoint.stackexchange.com/questions/152852/… – Tiago Duarte Jan 25 '18 at 9:07
0

What if you created a new spsite based on the user's token and then read the draft. This should give you an instance of the SPSite for that user and then you can read the draft document. Unfortunately, I don't think there is a way to download drafts for another user at all (not even programatically unless you have that user's token).

This is how you should start

 SPUserToken userToken = web.AllUsers[user].UserToken;
 SPSite s = new SPSite(siteStr, userToken);
 SPWeb w = s.OpenWeb();
-1

If a user check out the document and make some change on the document, other users will not see the change until the document is checked in.

  • I don't see how this helps. and tbh I don't think you've actually read the question – Tiago Duarte Jan 25 '18 at 9:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.