Sub Export_CustomerOderDetails()
Dim objOtherTbls As AdditionalData
On Error GoTo ErrorHandle
Set objOtherTbls = Application.CreateAdditionalData
objOtherTbls.Add "Employees"
objOtherTbls.Add "Products"
Application.ExportXML ObjectType:=acExportTable, _
DataSource:="Customers", _
DataTarget:="C:\Details.xml", _
AdditionalData:=objOtherTbls
Exit_Here:
Exit Sub
ErrorHandle:
MsgBox Err.Number & ": " & Err.Description
Resume Exit_Here
End Sub
|