Hello to all.
I'm receiving the following error message:
"2467: The expression you entered refers to an object that is closed or doesn't exit"
This is the code i'm using:
I am a bit new to this.
Can someone please explain what am i doing wrong?
Thanks a lot for any help.
Octavio
I'm receiving the following error message:
"2467: The expression you entered refers to an object that is closed or doesn't exit"
This is the code i'm using:
Code:
Sub ExportDetails()
Dim objOtherTbls As AdditionalData
On Error GoTo ErrorHandle
Set objOtherTbls = Application.CreateAdditionalData
objOtherTbls.Add "BillingAddress"
objOtherTbls.Add "Customer"
objOtherTbls.Add "DocumentTotals"
objOtherTbls.Add "Header"
objOtherTbls.Add "Invoice"
objOtherTbls.Add "Line"
objOtherTbls.Add "OrderReferences"
objOtherTbls.Add "Product"
objOtherTbls.Add "SalesInvoices"
objOtherTbls.Add "Settlement"
objOtherTbls.Add "Tax"
objOtherTbls.Add "TaxTableEntry"
Application.ExportXML ObjectType:=acExportTable, _
DataSource:="UF", DataTarget:="C:\Lixo\xpto.xml", _
AdditionalData:=objOtherTbls
Exit_Here:
Exit Sub
ErrorHandle:
MsgBox Err.Number & ": " & Err.Description
Resume Exit_Here
End Sub
Can someone please explain what am i doing wrong?
Thanks a lot for any help.
Octavio