Here is the code. Please let me know what is wrong. I tried to run this within Word and / or Excel. Got the same error.
Dim ACObject As Object
Set ACObject = CreateObject("Access.Application")
.OpenCurrentDatabase "c:\testme.mdb", False
.DoCmd.TransferText acExportDelim, "Alpha Export", "Alpha", "c:\test.txt"
Set ACObject = Nothing
Object not defined refers to the c:\test.txt file.