Here is my script. It works okay except when opening the Access.8 file, when the file opens only the title bar is visible in the upper left hand part of the screen. The Access.10 part works fine. I have macros in the database to maximize, etc. but none of them work. I have also tried to execute the macros from the script. This is the last thing I have to get figured out and then my chore is done. Any ideas will be greatly appreciated.
<Script Language="vbscript">
Dim KeyName,strMDEValue,objaccess
Set WshShell =CreateObject("WScript.Shell"
KeyName = "HKEY_CLASSES_ROOT\.mde\"
strMDEValue = WshShell.RegRead(KeyName)
If strMDEValue= "Access.MDEFile.8" Then
Set objaccess = CreateObject("Access.MDEFile.8"
objaccess.visible=True
objaccess.OpenCurrentDatabase "\\echne\north_db\Fpdb\Print97.mdb"
Set WshShell= nothing
Set objaccess=nothing
window.close()
ElseIf strMDEValue= "Access.MDEFile.10" Then
Set objaccess = CreateObject("Access.MDEFile.10"
objaccess.OpenCurrentDatabase "\\echne\north_db\Print2002.mde"
objaccess.visible=True
objaccess.UserControl = True
Set WshShell= nothing
Set objaccess=nothing
window.close()
End If
</Script>
<Script Language="vbscript">
Dim KeyName,strMDEValue,objaccess
Set WshShell =CreateObject("WScript.Shell"
KeyName = "HKEY_CLASSES_ROOT\.mde\"
strMDEValue = WshShell.RegRead(KeyName)
If strMDEValue= "Access.MDEFile.8" Then
Set objaccess = CreateObject("Access.MDEFile.8"
objaccess.visible=True
objaccess.OpenCurrentDatabase "\\echne\north_db\Fpdb\Print97.mdb"
Set WshShell= nothing
Set objaccess=nothing
window.close()
ElseIf strMDEValue= "Access.MDEFile.10" Then
Set objaccess = CreateObject("Access.MDEFile.10"
objaccess.OpenCurrentDatabase "\\echne\north_db\Print2002.mde"
objaccess.visible=True
objaccess.UserControl = True
Set WshShell= nothing
Set objaccess=nothing
window.close()
End If
</Script>