I'm using the below code in an Access form to import XML files.
I get an error 31593, "DTD is prohibited".
How can I fix this?
Thanks in advance,
Paul
Private Sub Command0_Click()
Dim StrFileName As String
Dim fd As FileDialog
Dim vrtSelectedItem As Variant
Dim strprop As String
Dim vbool As Boolean
Set fd = Application.FileDialog(msoFileDialogFilePicker)
With fd
.InitialFileName = "C:\Users\Toshiba\Documents\STEM\data\*.xml"
If .Show = -1 Then
For Each vrtSelectedItem In .SelectedItems
Application.ImportXML _
DataSource:=vrtSelectedItem, _
ImportOptions:=0
Next vrtSelectedItem
Else
End If
End With
Set fd = Nothing
End Sub
I get an error 31593, "DTD is prohibited".
How can I fix this?
Thanks in advance,
Paul
Private Sub Command0_Click()
Dim StrFileName As String
Dim fd As FileDialog
Dim vrtSelectedItem As Variant
Dim strprop As String
Dim vbool As Boolean
Set fd = Application.FileDialog(msoFileDialogFilePicker)
With fd
.InitialFileName = "C:\Users\Toshiba\Documents\STEM\data\*.xml"
If .Show = -1 Then
For Each vrtSelectedItem In .SelectedItems
Application.ImportXML _
DataSource:=vrtSelectedItem, _
ImportOptions:=0
Next vrtSelectedItem
Else
End If
End With
Set fd = Nothing
End Sub