asked on
Imports Microsoft.Office.Interop.Access
Module modAccess
Private Const acStructureAndData = 2
Public Function makeMDB(ByVal tempFile As String, ByVal xmlFile As String) As Boolean
Dim appAccess = New Application
Try
appAccess.NewCurrentDatabase(tempFile, AcNewDatabaseFormat.acNewDatabaseFormatAccess2007)
appAccess.ImportXML(DataSource:=xmlFile, ImportOptions:=acStructureAndData)
Catch Excep As System.Runtime.InteropServices.COMException
Return False
Finally
appAccess.CloseCurrentDatabase()
appAccess = Nothing
End Try
Return True
End Function
End Module
Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.
TRUSTED BY
ASKER
I'm trying to automate a download for an "unsophisticated" user! I can download the XML and let him import that (rather than create a .csv) but I'd prefer to make it seamless.