System information?

noccy

Registered User.
Local time
Today, 23:56
Joined
Aug 19, 2003
Messages
67
Hello!

I'm building an access application, and on startup i want to check some system information.

The things i want to check is:

1. Office version (not just access, but word and excel too) Basicly I need this to make sure the user has the Office 10 Library available

2. Windows Mediaplayer version (has to be 9 to make the application work)


3. Windows version


tnx

noccy
 
I don't kow about 1 & 2 but you can get the Windows Version from my Computer Class on this thread.
 
Actually, for 1 you could go lop through the current references and get their names. You might find however that the references are called OFFICE rather than OFFICE8 or OFFICE10, etc.

Worth a try though.
 
and how do i find the references? =)

lol sorry for beeing noob
 
There's an example of reviewing references on this thread - it deals with checking if the user has the DAO and/or ADO object libraries referenced.
 
Did it =)

Well I used the references as you said, but I had to use the Full.Path to find out the Office version.

The final part of the path to MSO.DLL would be Office10\MSO.DLL, so if the 10 last charachters are 10\MSO.DLL the version would be right i guess......


Code:
Dim ref As Reference

For Each ref In References


If Right(ref.FullPath, 10) = "10\MSO.DLL" Then

Me.lblOffice.Caption = "Office XP installed"

End If

Next


Set ref = Nothing

If Not Me.lblOffice.Caption = "Office XP installed" Then

Me.lblOffice.Caption = "Office version too old"

End If
 
Bit of a change, for functionality:


Make it a public function in a module so that you can call it from anywhere and can even reuse it in other applications.

Code:
Public Function IsOfficeXP() As Boolean
    Dim ref As Reference

    For Each ref In References
        If InStr(1, ref.FullPath, "Office10") Then
            IsOfficeXP = True
            Exit Function
        End If
    Next
    
    Set ref = Nothing
End Function

From your form:

Code:
If IsOfficeXP Then
    Me.lblOffice.Caption = "Office XP installed"
Else
    Me.lblOffice.Caption = "Office version too old"
End If
 

Users who are viewing this thread

Back
Top Bottom