none
change document version number programmability

    Question

  • Hi,

     I try to change version number of a document in a document library programmability.I have documents with old version in file system I try to upload them sharepoint document library with custom version number.

    For example my a.doc document has version number. 1.0,1.1,1.5 and 2.0 .I want to upload this document to document library same version number.Is there any solution.When I activate versioning property in a document library .It gives the version number like 1.0,1.1,1.2 and go  on.I do not want to this.

     

    Thansk for your reply

    Monday, May 03, 2010 11:19 AM

Answers

  • There's no easy way to programatically set the version number. I would suggest you create a new column to store the version number and treat this as the version number outside of SharePoint. New documents can use the standard versioning numbers provided out of the box.
    Cogito, ergo sum.
    Wednesday, May 05, 2010 1:49 AM
  • Hi,

    Are you trying something like archiving older sharepoint document library item versions to another document library.

    Please see my blog below.

    http://aj-sharepoint.blogspot.com/2010/03/archive-sharepoint-document-library.html

    AS Chengyi Wu has mentioned, You can also try creating a custom column to add the version number which is  version.ID

     

     


    Regards, Aj (http://www.aj-sharepoint.blogspot.com/) MCTS
    Wednesday, May 05, 2010 10:53 AM

All replies

  • There's no easy way to programatically set the version number. I would suggest you create a new column to store the version number and treat this as the version number outside of SharePoint. New documents can use the standard versioning numbers provided out of the box.
    Cogito, ergo sum.
    Wednesday, May 05, 2010 1:49 AM
  • doumnetname.update() and documnetname.systemupdate() is available in the sharepoint API.  

    .update() method updates the document with new version number.

    .systemupdate() methos updates the document with old version number..

     

    i hope this might be help you.

    thanks

    Wednesday, May 05, 2010 9:39 AM
  • Hi,

    Are you trying something like archiving older sharepoint document library item versions to another document library.

    Please see my blog below.

    http://aj-sharepoint.blogspot.com/2010/03/archive-sharepoint-document-library.html

    AS Chengyi Wu has mentioned, You can also try creating a custom column to add the version number which is  version.ID

     

     


    Regards, Aj (http://www.aj-sharepoint.blogspot.com/) MCTS
    Wednesday, May 05, 2010 10:53 AM