You are viewing limited content. For full access, please sign in.

Question

Question

Creating/adding a new document version.

asked on October 25, 2016

I am importing documents that include documents that have multiple versions.

The initial import method for the first version will place the document under version control and return a "DocumentInfo" object.

From Here, if I detect additional versions) to be imported, how would I create a new version from the original document imported?

I was hoping to find something simple like "DocumentInfo,AddVersion".

Thank You For Any Help.

Bruce

0 0

Replies

replied on October 25, 2016

Call CheckOut()/CheckIn() on the DocumentInfo:

 

if (!doc.IsUnderVersionControl)
    doc.PutUnderVersionControl();

doc.CheckOut();

// Make changes here (replace edoc, set fields, etc)

doc.Comment = "the version comment";
doc.Save();
doc.CheckIn(CheckInOptions.None);

 

 

1 0
replied on October 25, 2016

Looks simple enough.

Thanks for your response

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.