Version of Microsoft Office  
Author Message
talljames





PostPosted: Fri Oct 24 10:24:42 CDT 2003 Top

Visual Basic >> Version of Microsoft Office

Hello All,
I Need to write an VB 6.0 App which checks the version of
Microsoft Office.Which DLL or Exe do I need to check for
Microsoft Office version? Any Ideas Please

Thanks

-Irshad

Visual Studio114  
 
 
Justin





PostPosted: Fri Oct 24 10:24:42 CDT 2003 Top

Visual Basic >> Version of Microsoft Office Irshad,

Try this.

Goto to

http://www.google.com/advanced_group_search?hl=en

and type in

+Determine +Office +version

in the "With all of the words" textbox and "*" in the groups box and press
enter.

It will get you where you need to go

Justin



> Hello All,
> I Need to write an VB 6.0 App which checks the version of
> Microsoft Office.Which DLL or Exe do I need to check for
> Microsoft Office version? Any Ideas Please
>
> Thanks
>
> -Irshad


 
 
jaf





PostPosted: Fri Oct 24 10:34:58 CDT 2003 Top

Visual Basic >> Version of Microsoft Office Hi,
c:\program files\microsoft office\office\mso9.dll would be office version 9
or office 2000.

--

John

johnf202 at hotmail dot com




> Hello All,
> I Need to write an VB 6.0 App which checks the version of
> Microsoft Office.Which DLL or Exe do I need to check for
> Microsoft Office version? Any Ideas Please
>
> Thanks
>
> -Irshad


 
 
Bob





PostPosted: Fri Oct 24 10:44:50 CDT 2003 Top

Visual Basic >> Version of Microsoft Office

> Hello All,
> I Need to write an VB 6.0 App which checks the version of
> Microsoft Office.Which DLL or Exe do I need to check for
> Microsoft Office version? Any Ideas Please

you could do something like this:

Private Sub Main()
MsgBox MSWordVersion
End Sub

Public Function MSWordVersion() As String
Dim oWord As Object
On Error Resume Next
Set oWord = CreateObject("Word.Application")
If Err.Number Then
MSWordVersion = "None"
Else
MSWordVersion = oWord.Version
If Err.Number Then MSWordVersion = "Unknown"
If oWord.Documents.Count = 0 Then oWord.Quit
Set oWord = Nothing
End If
End Function

 
 
Lofty





PostPosted: Fri Oct 24 11:07:27 CDT 2003 Top

Visual Basic >> Version of Microsoft Office Not on my system - I install all apps to D:\Program Files\.... ;-)

--
Lofty
http://www.brainache.demon.co.uk

- There are 10 types of people in this world:
Those who understand binary, and those who don't.





> Hi,
> c:\program files\microsoft office\office\mso9.dll would be office version
9
> or office 2000.
>
> --
>
> John
>
> johnf202 at hotmail dot com
>
>


> > Hello All,
> > I Need to write an VB 6.0 App which checks the version of
> > Microsoft Office.Which DLL or Exe do I need to check for
> > Microsoft Office version? Any Ideas Please
> >
> > Thanks
> >
> > -Irshad
>
>


 
 
Ben





PostPosted: Sat Oct 25 08:09:49 CDT 2003 Top

Visual Basic >> Version of Microsoft Office I know you shouldn't if it's a good app, but do you ever get problems with
apps 'assuming' that it's c:\program files?



> Not on my system - I install all apps to D:\Program Files\.... ;-)
>
> --
> Lofty
> http://www.brainache.demon.co.uk
>
> - There are 10 types of people in this world:
> Those who understand binary, and those who don't.
>
>
>


> > Hi,
> > c:\program files\microsoft office\office\mso9.dll would be office
version
> 9
> > or office 2000.
> >
> > --
> >
> > John
> >
> > johnf202 at hotmail dot com
> >
> >


> > > Hello All,
> > > I Need to write an VB 6.0 App which checks the version of
> > > Microsoft Office.Which DLL or Exe do I need to check for
> > > Microsoft Office version? Any Ideas Please
> > >
> > > Thanks
> > >
> > > -Irshad
> >
> >
>
>


 
 
Ben





PostPosted: Sat Oct 25 08:12:31 CDT 2003 Top

Visual Basic >> Version of Microsoft Office I know I'm being awkward but isn't there a chance that there's a different
version of word than Excel?






> > Hello All,
> > I Need to write an VB 6.0 App which checks the version of
> > Microsoft Office.Which DLL or Exe do I need to check for
> > Microsoft Office version? Any Ideas Please
>
> you could do something like this:
>
> Private Sub Main()
> MsgBox MSWordVersion
> End Sub
>
> Public Function MSWordVersion() As String
> Dim oWord As Object
> On Error Resume Next
> Set oWord = CreateObject("Word.Application")
> If Err.Number Then
> MSWordVersion = "None"
> Else
> MSWordVersion = oWord.Version
> If Err.Number Then MSWordVersion = "Unknown"
> If oWord.Documents.Count = 0 Then oWord.Quit
> Set oWord = Nothing
> End If
> End Function
>


 
 
BeastFish





PostPosted: Sat Oct 25 10:48:42 CDT 2003 Top

Visual Basic >> Version of Microsoft Office Try checking the registry. Enumerate thru the "version number" keys of
HKEY_LOCAL_MACHINE\Software\Microsoft\Office\ (ie. 8.0, 9.0, etc.) and the
highest one containing Common\InstallRoot should be the highest version of
MS Office installed.

To illustrate:
HKEY_LOCAL_MACHINE\Software\Microsoft\Office\8.0\Common\InstallRoot






> Hello All,
> I Need to write an VB 6.0 App which checks the version of
> Microsoft Office.Which DLL or Exe do I need to check for
> Microsoft Office version? Any Ideas Please
>
> Thanks
>
> -Irshad


 
 
NickD





PostPosted: Sat Oct 25 11:13:19 CDT 2003 Top

Visual Basic >> Version of Microsoft Office

> I know you shouldn't if it's a good app, but do you ever get problems with
> apps 'assuming' that it's c:\program files?
[...]

Yes. Windows 2000 resource kit, for one :p

Regards,
Nick


 
 
NickD





PostPosted: Sat Oct 25 11:18:13 CDT 2003 Top

Visual Basic >> Version of Microsoft Office

> I know I'm being awkward but isn't there a chance that there's a different
> version of word than Excel?
[...]

Absolutely, but then really, you probably aren't interested in the version
of "Office" anyway, but only one (or more) of the packages within, which you
can check in the way demonstrated.

If, however, the version of "Office" really is what you want then the
potential does exist that checking a single application package would give
the wrong result. It would be a small number of cases, relatively speaking,
but maybe enough to matter.

Regards,
Nick


 
 
jaf





PostPosted: Sat Oct 25 12:32:36 CDT 2003 Top

Visual Basic >> Version of Microsoft Office My reply was a quick way. Not the best way.
If your going to query the registry aren't you better off looking for the
class ID (clsid)?
The OP stated "Office Version" not Excel or Word.
I don't know if there is any way to differentiate between "Office packages"
like Office, Office Pro, Office Premium. If that makes any diff.

Like a previous post stated, you can have multiple office versions installed
or office 2000 & excel 2003.

Sounds like a potential cluster f... to me.

--

John

johnf202 at hotmail dot com




> Try checking the registry. Enumerate thru the "version number" keys of
> HKEY_LOCAL_MACHINE\Software\Microsoft\Office\ (ie. 8.0, 9.0, etc.) and the
> highest one containing Common\InstallRoot should be the highest version of
> MS Office installed.
>
> To illustrate:
> HKEY_LOCAL_MACHINE\Software\Microsoft\Office\8.0\Common\InstallRoot
>
>
>
>


> > Hello All,
> > I Need to write an VB 6.0 App which checks the version of
> > Microsoft Office.Which DLL or Exe do I need to check for
> > Microsoft Office version? Any Ideas Please
> >
> > Thanks
> >
> > -Irshad
>
>