I would look into this bit of info:
Microsoft Office Library
It has a good bit of information on getting the version from the Document.
First thing you need to do is add a reference to:
Microsoft.Office.Interop.Word;
Then instantiate a document from the file you want to extract the Version from:
Application application = new Application();
Document document = new Document();
Open the Document:
this.application.Documents.Open(@"C:\Users\...\nameOfDoc.doc", ReadOnly: true);
document = this.application.Documents["nameOfDoc.doc"];
Extract your Version:
String documentVersion;
if (document.Versions.Count > 0)
{
documentVersion = document.Versions[document.Versions.Count - 1].ToString();
}
else
{
documentVersion = "No Versioning";
}
The ReadOnly: true
is not required and can be set to false depending on what you want to do. I generally don't like to have more power than necessary.
Also, the [document.Versions.Count - 1]
should get you the latest Version according to what I read in the documentation (not tested).
I hope this helps you! If not, it should get you on the right track.