none
Getting Version and Document ID programmatically.

    Question

  • Hi,

    I'm looking for a way to create a file master list that allows me to have the file name, document ID, and current version. 

    So I guess I'm looking for a possible way to extract this information programatically? I haven't seen anything in the office sites section that would allow for this, but I'm not terribly experience with it so I may have missed it. Otherwise I have the sites synced to my computer which would run a local program and generate a document if I am able to get the information from the synced documents. 

    I see there is an advance properties section.

    When I clicked properties -> Advanced Properties I get a pop-up.

    Though I don't see the DocumentID Value anywhere in there. (There is a _dlc_DocIdItemGuid property but it's different than the Document ID show elsewhere...).  

    Thanks,

    KD

    Friday, May 27, 2016 5:05 PM

All replies

  • What are you using?

    The simplest way is normally to create a SharePoint personal view on a document library that includes the version, then export that view to excel.

    Saturday, May 28, 2016 1:03 AM
  • Hi KD,

    For showing Documents IDs, we need to enable and configure Document IDs firstly.

    1. Active the Document ID Service site collection feature.

    2. On site settings page, click on Documents ID settings. On the Document ID settings page, in the Assign Document IDs section, make sure there is a checkmark in the Assign Document IDs, check box.

    When the Document ID service is enabled for any given site collection, a column is added to the Document and Document Set content types as the site collection level. The Document ID column is used to display the ID assigned to an item.

    An article about how to enable the Document ID service for a site collection, and how to configure the Document ID options for custom file naming conventions.

    https://support.office.com/en-us/article/Enable-and-configure-unique-Document-IDs-ea7fee86-bd6f-4cc8-9365-8086e794c984

    Then, as Alex mentioned, modify library view, check Document ID in Columns section for showing in this view of this page. Export the data of this view to Excel.

    When you use the “"Export to Excel” feature, you may have noticed that document versions will not be exported as expected.

    Here are two workarounds for exporting library current version value to spreadsheet.

    Use a calculated column with formula as “=Version” to display current version:

    http://sharepointconnoisseur.blogspot.sg/2012/09/workaround-to-export-sharepoint-2010.html

    Create VBA-code which reads the version-info from your SharePoint-document library and inserts the version-info into your Excel file:

    https://blogs.technet.microsoft.com/fesiro/2012/12/01/how-to-includeretain-the-document-version-with-export-to-excel-spreadsheet/

    Best Regards,

    Linda Zhang


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Monday, May 30, 2016 4:52 AM
  • Hi Alex and Linda,

    Thanks for the help. I went and took a look and realized that I probably posted my question to the wrong form. (Sorry about that, new to this form and guess I wasn't paying enough attention when I wrote the question up). 

    Currently we are using the office 365 online "Site" / "SharePoint". Which you're able to sync locally with OneDrive for Business. Is there a set form for this / a better place to ask my question? (I took a look around and couldn't find any Export to Excel feature there.)

    Thanks,

    KD

    Tuesday, May 31, 2016 3:45 PM
  • It isn't the right forum, there's an Office 365 one, but on the other hand it's very lightly used and you'll get more rapid answers on here or the SharePoint 2013 forum right now.

    On the other hand the solution Linda provided should work and it's close enough you can keep going (in my opinion).

    Tuesday, May 31, 2016 4:28 PM