SOLVED

Document ID in a Quick Part for Word Templates used across Site Collections

%3CLINGO-SUB%20id%3D%22lingo-sub-299591%22%20slang%3D%22en-US%22%3EDocument%20ID%20in%20a%20Quick%20Part%20for%20Word%20Templates%20used%20across%20Site%20Collections%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-299591%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%3EHi.%20I%20have%20a%20requirement%20to%20display%20the%20Document%20ID%20column%20value%20in%20a%20Document%20Template%20that%20is%20used%20across%20different%20site%20collections%20in%20SharePoint%20Online.%20The%20Document%20ID%20service%20is%20enabled%20for%20all%20site%20collections.%20If%20I%20add%20the%20Quick%20Part%20in%20Word%20for%20the%20Document%20ID%26nbsp%3B%20on%20the%20template%2C%20it%20only%20works%20for%20document%20created%20from%20the%20template%20in%20that%20Site%20Collection%2C%20however%20I%20need%20it%20to%20work%20in%20multiple%20collections.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20currently%20have%20other%20custom%20SharePoint%20properties%20working%20by%20adding%20them%20to%20a%20new%20content%20type%20in%20the%20content%20type%20hub%2C%20however%20I%20can't%20seem%20to%20add%20Document%20ID%20to%20this%20content%20type.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EAny%20assistance%20would%20be%20greatly%20appreciated.%20Thank%20you.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-299591%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDocument%20ID%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ETemplates%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-319885%22%20slang%3D%22en-US%22%3ERe%3A%20Document%20ID%20in%20a%20Quick%20Part%20for%20Word%20Templates%20used%20across%20Site%20Collections%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-319885%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20everyone%2C%20So%20I%E2%80%99ve%20just%20had%20a%20breakthrough%20and%20managed%20to%20finally%20get%20this%20all%20working!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3ETo%20replicate%20the%20solution%3A%20%3C%2FSTRONG%3E%3C%2FP%3E%3COL%3E%3CLI%3ECreate%20a%20new%20Word%20document%3C%2FLI%3E%3CLI%3ECopy%20it%20to%20a%20site%20collection%20with%20the%20Document%20ID%20service%20enabled%3C%2FLI%3E%3CLI%3EMove%20the%20document%20outside%20of%20a%20SharePoint%20collection%20(locally%20on%20a%20PC)%3C%2FLI%3E%3CLI%3ECreate%20a%20%E2%80%98Document%20ID%E2%80%99%20Content%20Control%20type%20(plain%20text%20or%20rich%20text)%3C%2FLI%3E%3CLI%3EIn%20the%20XML%20Mapping%20pane%2C%20find%20%3CA%20href%3D%22http%3A%2F%2Fschemas.microsoft.com%2Foffice%2F2006%2Fmetadata%2Fproperties%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.microsoft.com%2Foffice%2F2006%2Fmetadata%2Fproperties%3C%2FA%3E%3C%2FLI%3E%3CLI%3EFind%20%E2%80%98_dlc_DocId%E2%80%99%20Under%20properties%2FdocumentManagement%3C%2FLI%3E%3CLI%3ESelect%20the%20%E2%80%98Document%20ID%E2%80%99%20Content%20Control%3C%2FLI%3E%3CLI%3ERight%20click%20the%20%E2%80%98_dlc_DocId%E2%80%99%20in%20the%20XML%20Mapping%20Pane%20and%20select%20%E2%80%98Map%20to%20Selected%20Content%20Control%E2%80%99%3C%2FLI%3E%3CLI%3EDelete%20the%20contents%20of%20the%20%E2%80%98Document%20ID%E2%80%99%20Content%20Control.%20Ensure%20that%20%E2%80%98Contents%20cannot%20be%20edited%E2%80%99%20is%20unchecked%20in%20the%20Content%20Control%20Properties.%3C%2FLI%3E%3CLI%3EUpload%20the%20document%20to%20a%20SharePoint%20site%20collection%20using%20the%20new%20%E2%80%98Add%20template%E2%80%99%20feature%20described%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FMicrosoft-SharePoint-Blog%2FAnnouncing-new-file-template-management-for-document-library%2Fba-p%2F238374%22%20target%3D%22_self%22%3Ehere%3C%2FA%3E%3C%2FLI%3E%3CLI%3ECreate%20a%20new%20document%20from%20the%20template%20drop%20down%20menu.%3C%2FLI%3E%3CLI%3ESuccess%3C%2FLI%3E%3C%2FOL%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-312867%22%20slang%3D%22en-US%22%3ERe%3A%20Document%20ID%20in%20a%20Quick%20Part%20for%20Word%20Templates%20used%20across%20Site%20Collections%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-312867%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20for%20the%20reply%20Juan.%20I'm%20surprised%20this%20is%20not%20a%20common%20problem.%20Do%20you%20know%20of%20a%20solution%20where%20a%20word%20template%20can%20have%20a%20document%20ID%20that%20works%20across%20collections%3F%20It%20would%20be%20a%20nightmare%20for%20us%20to%20have%20to%20create%20unique%20templates%20for%20every%20site.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-312852%22%20slang%3D%22en-US%22%3ERe%3A%20Document%20ID%20in%20a%20Quick%20Part%20for%20Word%20Templates%20used%20across%20Site%20Collections%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-312852%22%20slang%3D%22en-US%22%3EIf%20you%20need%20to%20use%20the%20Document%20ID%20provided%20by%20Microsoft%20that%20is%20unique%20per%20site%20collection%2C%20I%20believe%20we%20don't%20have%20a%20workaround%20here%20that%20can%20help%20you%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-312822%22%20slang%3D%22en-US%22%3ERe%3A%20Document%20ID%20in%20a%20Quick%20Part%20for%20Word%20Templates%20used%20across%20Site%20Collections%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-312822%22%20slang%3D%22en-US%22%3E%3CP%3EWould%20anyone%20know%20of%20a%20workaround%20to%20get%20this%20working%3F%20Thank%20you.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-299643%22%20slang%3D%22en-US%22%3ERe%3A%20Document%20ID%20in%20a%20Quick%20Part%20for%20Word%20Templates%20used%20across%20Site%20Collections%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-299643%22%20slang%3D%22en-US%22%3EI'm%20afraid%20this%20scenario%20will%20only%20work%20at%20the%20site%20collection%20level%20and%20not%20the%20tenant%20one%20as%20you%20need%3C%2FLINGO-BODY%3E
Highlighted
Contributor

Hi. I have a requirement to display the Document ID column value in a Document Template that is used across different site collections in SharePoint Online. The Document ID service is enabled for all site collections. If I add the Quick Part in Word for the Document ID  on the template, it only works for document created from the template in that Site Collection, however I need it to work in multiple collections.

 

I currently have other custom SharePoint properties working by adding them to a new content type in the content type hub, however I can't seem to add Document ID to this content type. 

 

Any assistance would be greatly appreciated. Thank you.

5 Replies
Highlighted
I'm afraid this scenario will only work at the site collection level and not the tenant one as you need
Highlighted

Would anyone know of a workaround to get this working? Thank you.

Highlighted
If you need to use the Document ID provided by Microsoft that is unique per site collection, I believe we don't have a workaround here that can help you
Highlighted

Thanks for the reply Juan. I'm surprised this is not a common problem. Do you know of a solution where a word template can have a document ID that works across collections? It would be a nightmare for us to have to create unique templates for every site.

Highlighted
Best Response confirmed by Scott_Whitmore (Contributor)
Solution

Hi everyone, So I’ve just had a breakthrough and managed to finally get this all working!

 

To replicate the solution:

  1. Create a new Word document
  2. Copy it to a site collection with the Document ID service enabled
  3. Move the document outside of a SharePoint collection (locally on a PC)
  4. Create a ‘Document ID’ Content Control type (plain text or rich text)
  5. In the XML Mapping pane, find http://schemas.microsoft.com/office/2006/metadata/properties
  6. Find ‘_dlc_DocId’ Under properties/documentManagement
  7. Select the ‘Document ID’ Content Control
  8. Right click the ‘_dlc_DocId’ in the XML Mapping Pane and select ‘Map to Selected Content Control’
  9. Delete the contents of the ‘Document ID’ Content Control. Ensure that ‘Contents cannot be edited’ is unchecked in the Content Control Properties.
  10. Upload the document to a SharePoint site collection using the new ‘Add template’ feature described here
  11. Create a new document from the template drop down menu.
  12. Success