Hi there, I need your appreciated help.
I need disable "autoexec macro" access 2003 with VBS script.
I try this code, I don't have error but the autoexec macro run with open db access and not run the OutputTo excel file:
Code:
Set accDB = CreateObject("Access.Application")
With accDB
.visible = true
.automationsecurity = 1
.OpenCurrentDatabase("C:\Inetpub\wwwroot\db\db.mdb")
.DoCmd.SelectObject acMacro, "autoexec"
.DoCmd.DeleteObject
.DoCmd.OutputTo acOutputTable, "db", "xls", "C:\Inetpub\wwwroot\db\db.xls"
.CloseCurrentDatabase
.Quit
End With
Set accDB = Nothing
Can you help me?
Thks in advance-