Importing Multiple XML files into Access 2003

  • Thread starter Thread starter brianhlcl
  • Start date Start date
B

brianhlcl

I would like to import about 40 XML files all in the same folder with
the same structure into an Access table without having to import each
one individually. The file names of the XML files are all different,
and I have no control over that. Anyone know a way to do that?
 
I would like to import about 40 XML files all in the same folder with
the same structure into an Access table without having to import each
one individually. The file names of the XML files are all different,
and I have no control over that. Anyone know a way to do that?

something like this should work...

Private Sub Command0_Click()

Dim strFile As String
Dim strPath As String

strPath = BrowseFolder("Choose a directory...")

strFile = Dir(strPath & "\*.xml")
Do Until strFile = ""
strFile = Dir
'DoCmd.TransferText acImportDelim, "MySavedSpecName",
"DestinationTable", strFile, False
Application.ImportXML DataSource:=strFile, OtherFlags:=1
Loop


End Sub
Except you're going to use
 
Back
Top