I had a problem some time ago with a macro, which I reported here:
The solution worked for a while, but my system stopped working and I had to reinstall Windows 8.1 and all applications, and now the macro does not work.
As before, I have confirmed that the reference to the Microsoft Excel 15.0 Object Library is checked.
Option Compare Database
Dim filepath As String, xlapp As Object, xldoc As Object
filepath = "C:\Users\Lev\Desktop\ATR.xls"
filepath2 = "C:\Users\Lev\Desktop\ATR.txt"
DoCmd.OutputTo acOutputTable, "RecentlySentAnswers", acFormatXLS, filepath
Set xlapp = CreateObject("Excel.Application")
Set xldoc = xlapp.Workbooks.Open(filepath)
xlapp.DisplayAlerts = True
xldoc.SaveAs filepath2, xlCSV
deedCSV = 1
The error is
Run-time error '429':
ActiveX component can't create object
I do not know what to do now to get this to work.
At the same time, when I open the project (ADP file) I am told that it is in read-only mode, even though the folder e:\my documents has been listed as a "trusted zone". I saved the file with a different name (same folder), and am now working with that, but perhaps this is related.