I am working on a semi-automated spread sheet import, it did work, mow all of a sudden it fails, with
debugstr = CurrentProject.ImportExportSpecifications.XML claiming the .xml is not found
sample snippit
[code]
' Pass it to the saved import
Dim OldSpec As ImportExportSpecification
Dim ImportSpec As ImportExportSpecification
Dim x As Integer
Dim debugstr As String
'Set OldSpec = CurrentProject.ImportExportSpecifications.Item(0)
For x = 0 To CurrentProject.ImportExportSpecifications.Count - 1 'radioboss import to come
If CurrentProject.ImportExportSpecifications.Item(x) = "Import-Log Sheet" Then
Set ImportSpec = CurrentProject.ImportExportSpecifications.Item(x)
debugstr = CurrentProject.ImportExportSpecifications.XML 'fails here
End If
Next x
debugstr = CurrentProject.ImportExportSpecifications.XML 'fails here
Set OldSpec = CurrentProject.ImportExportSpecifications.Item("Im port-Log Sheet")
'CurrentProject.ImportExportSpecifications.Add "Import-Log Sheet", OldSpec.XML
'Set ImportSpec = CurrentProject.ImportExportSpecifications.Item("Im port-Log Sheet")
ImportSpec.XML = Replace(OldSpec.ImportExportSpecifications.XML, "C:\Users\Owner\Downloads\Eclectic 20-11-21Log Sheet.xlsx", FilePath) 'also fails here.
ImportSpec.Execute
[/code
This did work, I have rewritten the saved import, still no joy on the .xml member.