N
Nick Smith
Hi
I am wanting to build a setup routine with Access 2003 packaging wizzard that will run a piece of code from the users shortcut. Is there any way to do this? My intention in doing this is to overcome the warning messages I am getting when installing Access 2003 on machines that don't have Access installed by setting the security level to low before my app. runs. The code I want to run is as follows:
Const cDatabaseToOpen = "C:\<FileToOpen>.mdb"
On Error Resume Next
Dim AcApp as ?
Set AcApp = CreateObject("Access.Application.11")
If AcApp.Version >= 11 Then
AcApp.AutomationSecurity = 1 ' msoAutomationSecurityLow
End If
AcApp.Visible = True
AcApp.OpenCurrentDatabase cDatabaseToOpen
If AcApp.CurrentProject.FullName <> "" Then
AcApp.UserControl = True
Else
AcApp.Quit
MsgBox "Failed to open '" & cDatabaseToOpen & "'."
End If
I am wanting to build a setup routine with Access 2003 packaging wizzard that will run a piece of code from the users shortcut. Is there any way to do this? My intention in doing this is to overcome the warning messages I am getting when installing Access 2003 on machines that don't have Access installed by setting the security level to low before my app. runs. The code I want to run is as follows:
Const cDatabaseToOpen = "C:\<FileToOpen>.mdb"
On Error Resume Next
Dim AcApp as ?
Set AcApp = CreateObject("Access.Application.11")
If AcApp.Version >= 11 Then
AcApp.AutomationSecurity = 1 ' msoAutomationSecurityLow
End If
AcApp.Visible = True
AcApp.OpenCurrentDatabase cDatabaseToOpen
If AcApp.CurrentProject.FullName <> "" Then
AcApp.UserControl = True
Else
AcApp.Quit
MsgBox "Failed to open '" & cDatabaseToOpen & "'."
End If