Share via

Adding SharePoint version number to Word template on a content type

Anonymous
2016-01-14T08:15:32+00:00

Hello

Is the following possible somehow?

I am trying to create a content type with a document template containing the SharePoint Version number. I want to use the content type including template when creating other document libraries on the same site, which mean I don’t want to use the contenttypehub to publish the content type.

I have done the following but not been able to figure out how to get the version number into the document from the list where the document is placed. I can only get the version number from the template shown unless the document is placed in the same library as the template. I guess this has to do with the label from SharePoint being unique to the given list?

  1. Created site content type called ‘Test template’.
  2. Created document library called ‘Templates’.
  3. Set versioning to minor and major for all users.
  4. Added Label {Version} to the library.
  5. Activated content type for the library.
  6. Added the ‘Test template’ content type to the library.
  7. Created .dotx template and added ‘Label’ to the document header.
  8. Saved the .dotx file as template for the content type.

So far so good. If I create a new document(.docx) in my ‘Templates’ library I get the correct version number from SharePoint.

  1. I create a new document library called ‘Testing templates’.
  2. Set versioning to minor and major for all users.
  3. Added Label {Version} to the library.
  4. Activated content type for the library.
  5. Added the ‘Test template’ content type to the library.

Now if I try to create a new document it opens from the correct .dotx template but I don’t get the correct active version number from my new SharePoint library but the one from the template document(.dotx) itself.

My question is how do I make a generic version numbered document template added to a content type?

Thanks, Jesper Bergmann

Microsoft 365 and Office
Microsoft 365 and Office

A comprehensive suite of productivity tools and cloud services that enhance collaboration, communication, and efficiency. Combining classic Office apps with advanced Microsoft 365 features, it supports both personal and business needs

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

5 answers

Sort by: Most helpful
  1. Anonymous
    2016-01-20T04:40:25+00:00

    hi jesper,

    i would explain that, during creating the .dotx, the steps of 1.2 is enabling the label on the default content type of document. the custom site content type has not been involved yet.

    please proceed with the steps and see the outcome.

    in addition, i would explain that the sharepoint online variations feature is mainly helping us to localize the site we have.

    best regards,

    rene

    Was this answer helpful?

    3 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2016-01-19T02:32:58+00:00

    Hi Rene

    It is not doing the job. I have tried to do exactly as you have described except from adding label to the library before adding the content type as it is not possible to do this before the content type is on the library.

    I have tried variations too, opening the template after uploading it to the CT to see if the content type ID was there and it was not. However when I create a new document it has a CT ID on it '0x010100714CB19F1F31C243A649EF58ED9DBD0E002D766DB2607ECB4089A7CA9CD0E7B383003B90CE4D6586BA4C8D5CCBE1A7918F33'. The string I get from versioning is '{_UIVersionString}' whcih is what I see when I initially add the Label to the .dotx file.

    I have user our own variation of the document CT where we have added 'Classification' from Termstore, could that be an issue? I have not tried with the 'Document' CT itself.

    Best regards

    Jesper Bergmann

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2016-01-16T06:26:05+00:00

    hi jesper,

    thanks for your updates.

    first, i would explain that, it is an expected behavior that if we create document based on content type, the file will be tagged as version 0.2, or if you do not enabled minor versions, 2.0.

    then, please follow the below steps to see if you can have the generic version number available to a content type.

    1. create the document template.

    1.1 create a library > go to library settings > enable major and minor (draft) versions.

    1.2 at library settings > information management policy settings > enable labels on the document content type.

    1.3 from local word client, create a .dotx and upload it to the library to have label available on the file.

    1.4 download the .dotx, and open it using word.

    1.5 insert the quick part of label to header or footer.

    1.6 go to file > info > properties > advanced properties > custom tab > delete the contenttypeid.

    1.7 save it as a new .dotx.

    1. create the site content type.

    2.1 go to site settings > site content types > create.

    2.2 configure to add a document content type.

    2.3 at the new site content settings page, advanced settings > select upload a new document template to upload the new .dotx.

    1. go to a library you actually work with > enable major and minor (draft) versions, information management policy of label and management of content types.
    2. add the site content type to the library.

    best regards,

    rene

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2016-01-15T05:02:45+00:00

    Hi Rene

    A. I have tried various solutions for this to see if that made any changes.

    • I have copied the url for the .dotx template file into the path edit box in advanced settings for the site content type.
    • I have tried to save the template file to my desktop and upload it as a new template under advanced settings for the site content type.

    In both cases I have tried to edit the template from the advanced settings without any positive result.

    B. I have selected the 'Test template' content type in both libraries. I have tried to do this from both the settings in the library and from the settings under the actual content type without any positive result.

    Best regards

    Jesper Bergmann

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2016-01-15T04:51:14+00:00

    Hi Jesper,

    We would like to run a few tests regarding this topic. Therefore, I would like to confirm the more details on your steps to make sure we can understand the situation correctly.

    a. Could you let us know how you "Saved the .dotx file as template for the content type", does the content type used a uploaded .dotx, or a .dotx stored in "Test template" library?

    b. Regarding adding Label {Version} to both libraries, which content types do you select at Information management policy settings?

    Please feel free to post back at any time and we will try to further look into the case.

    Best Regards,

    Rene

    Was this answer helpful?

    0 comments No comments