Community discussion forum

Getting the version of Word used to create a document (C#)

  • 1 year ago
    Is there any way to programmatically get the version of Word used to create a given document? I need to automate this, as I'm dealing with thousands of folders. I tried using Word._Document oDoc = oWord.Documents.Open(ref oFileName, ref oMissing, ref readOnly, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref isVisible, ref oMissing, ref oMissing, ref oMissing, ref oMissing); string version = oDoc.Versions.Application.Version;, but this seems to return the version of Word being used locally to open the files on the computer running the program I am working on.
  • 1 year ago
    Hi Rob - welcome to developerFusion! I'm afraid I don't think it's possible to reliably do this within VBA. However, it does appear to be present in the binary file itself; [http://word.tips.net/Pages/T000601_Determining_Word_Versions_of_Documents.html](http://word.tips.net/Pages/T000601_Determining_Word_Versions_of_Documents.html) So you might be able to do some digging prior to opening the document using the VBA bits? Hope that helps.

Post a reply

Enter your message below

Sign in or Join us (it's free).

We'd love to hear what you think! Submit ideas or give us feedback