Exporting Multiple Tables to an XML Data File : XML Export « XML « VBA / Excel / Access / Word






Exporting Multiple Tables to an XML Data File

 
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

 








Related examples in the same category

1.Exporting an Access Report to an XML Data File with ASP