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.
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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With