Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is version control with Word/Office, but using a proprietary document repository (i.e. NOT Sharepoint), catered for with some sort of provider model?

I cant find any resources for hooking into the version control features offered by Word 2010. I know that it hooks in seamlessly to Sharepoint in terms of providing features to access the Sharepoint document repository . But take sharepoint out as my repository how would I go about leveraging the word/office interop API to use features like "Manage Versions" etc. Is there a provider model for the version control features, for example?

I know there are plugins for word to hook into a a Perforce and Subversion repo, but, it appears, they don't use native word features and provide their functionality via additonal context menu items and ribbon/custom task pane related controls, i.e. not using word's in-built version management facilities.

Any resources or advice would be helpful, of course.

like image 653
brumScouse Avatar asked Sep 21 '12 11:09

brumScouse


2 Answers

I know a SharePoint alternative called Alfresco, which offers Microsoft Office integration, including version management.

Alfresco is an Enterprise Content Management solution and open source. Since it is open source, you might want to take a look how they implemented it.

http://www.alfresco.com/

Does this help you?

like image 86
Arthur Borsboom Avatar answered Oct 12 '22 23:10

Arthur Borsboom


I can't tell you how to fully integrate, but I can give you some details that should help.

Versioning is not a feature of Office 2010; the interface integrates with SharePoint document library versioning, which is what you'll need to imitate.

In SharePoint, a "virtual" directory is created for historical versions. If your document was located in "domain/sites/site/MyLibrary/MyDoc.docx", your first major version would be at "domain/sites/site/_vti_history/512/MyLibrary/MyDoc.docx".
Major versions are always multiples of 512, and minor (draft) versions increase by 1.
You can have minor versions starting at 1 if drafts were created before the first major version.

The Office API can reference a document's version information via the DocumentLibraryVersions collection object and the DocumentLibraryVersion object. While the latter has a couple methods (to restore or delete existing versions), the properties of the DocumentLibraryVersion object are read-only. It looks like the process of storing a document in a version-enabled library sets the DocumentLibraryVersions.IsVersioningEnabled property to True, but I'm not sure what else might be required to get Word to treat another system like SharePoint for integration purposes.

Bear in mind that if you get the basic integration to work, Word also expects to interact with versioning using Check-In/Out features.

That's about as far as I can take you right now, hopefully others can elaborate on where to go from here. Good luck!

MSDN document versioning in the object model: http://msdn.microsoft.com/en-us/library/office/ff860259(v=office.15).aspx

An article on creating SharePoint document version history using C#: http://www.tekritisoftware.com/sharepoint-document-version-history

like image 38
AjimOthy Avatar answered Oct 12 '22 23:10

AjimOthy