How to insert documentID in the document when i upload document in the document library in SharePoint Online.

rajesh vsnk 1 Reputation point
2021-01-12T08:12:28.14+00:00

Hi All,

I have a SharePoint Online document library, when i upload any document like word document i want to append the documentID or any Unique ID to the footer of the uploaded document library. How can we achieve this either power shell scripts or any other way we can achieve this?

Thanks

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,719 questions
{count} votes

5 answers

Sort by: Most helpful
  1. Echo Du_MSFT 17,161 Reputation points
    2021-01-13T06:43:26.117+00:00

    Hello @rajesh vsnk ,

    In my testing, I can not insert the Document ID or Unique ID as a Footer into the uploaded documents through PowerShell script.

    However, you can manually add the Document ID as a Footer to each word document.

    Please the following steps:

    1) Sign in the Document library as an admin
    2) Open the word document in app

    56121-open-in-app.png

    3) Go to the Insert tab, click on Footer menu, and then select Blank option

    55948-footer.png

    4) Select the [Type here], click on Quick Parts menu, and then select Document Property and select Document ID Value.

    56065-document-id.png

    5) Close Header and Footer and save it.

    56066-close.png

    6) When you open the word document again, you will find that the Footer has been set successfully.

    Thanks,
    Echo Du

    ==================

    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. rajesh vsnk 1 Reputation point
    2021-01-15T02:41:33.98+00:00

    Hi Echo,

    Thanks for your reply.
    But i want this should automatic because when ever the document uploaded it should add document ID automatically.
    It may by using script or powershell to run every 1 hour or1 day or 1 week.
    Its not possible to to open each document and update the values because it may be hundreds of documents.


  3. Carry4IT Megens 0 Reputation points
    2023-03-02T13:45:37.5266667+00:00

    To get this done for all your documents, make sure to enable the Document ID feature in the site collection(s) where your SharePoint libraries are. Read here how: https://support.microsoft.com/en-us/office/activate-and-configure-document-ids-in-a-site-collection-66345c77-f079-4104-ac7a-e25826849306

    When you enable Document IDs for a site collection, a column is added to the Document and Document Sets Content Types at the site collection level. The ID assigned to an item appears in the Document ID column. Find the Document ID in the details pane of the document library.

    It make take some time but eventually all your documents will have been populated with an unique Document ID.

    So: No need to run a batch job or powershell for this

    0 comments No comments

  4. Carry4IT Megens 0 Reputation points
    2023-03-02T13:48:21.98+00:00

    To make the Document ID visible, add the Document ID column to the library view.

    0 comments No comments

  5. Cord Thomas 0 Reputation points
    2024-04-09T20:46:52.8233333+00:00

    I am chiming in as I learned a few things getting this working.

    The timing of when the job happens is out of your control and there's no place to look for whether it's done. I noticed a label on the Document ID Setting page "Configuration of the Document ID feature..." that suggests when it might be done; after a few hours it disappeared.

    Next, adding the Document ID column to the view - this stumped me for too long - it is not available in the "Edit view columns" list in the new SharePoint; you have to chose "Edit current view" to use the legacy interface to chose the Document ID column.

    Now I am trying to figure out how to add Document ID to a footer template for Word documents. I read it can be done, but not clear how to do it. Seems maybe I have to use Windows as I don't find any way to do it on a Mac.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.