PIA version, Word version

D

David Thielen

Hi;

Is there a method call to get the version of the Word, office, and vbe PIAs?
And is there a method call to get the version of Word? (From inside my
add-in.)

I want to call all 4 and alert the user if there is a mis-match.
 
P

Peter Huang

Hi

You may use the code below to get the version
MessageBox.Show(ThisApplication.Version.ToString());
MessageBox.Show(Assembly.GetAssembly(typeof(Application)).FullName.ToString(
));

NOTE, the assembly's fullname including the assembly's version, you may
need to parse it yourself.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
D

David Thielen

For others, here is what you get:

string s = ThisApplication.Version; // 11.0
s = Assembly.GetAssembly(typeof
(Microsoft.Office.Interop.Word.Application)).FullName; //
Microsoft.Office.Interop.Word, Version=11.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c
s = Assembly.GetAssembly(typeof
(Microsoft.Office.Core.CommandBar)).FullName; // office, Version=11.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c
s = Assembly.GetAssembly(typeof
(Microsoft.Vbe.Interop.Application)).FullName; // Microsoft.Vbe.Interop,
Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c

thanks - dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top