importing XML files
Sub getxml()
Const myfolder As String = "c:\temp"
Set fso = CreateObject _
("Scripting.FileSystemObject")
Set folder = _
fso.GetFolder(myfolder)
If folder.subfolders.Count 0 Then
For Each sf In folder.subfolders
If sf.Files.Count 0 Then
For Each file In sf.Files
If UCase(Right(file, 3)) = "XML" Then
'add code to open each file here.
End If
Next file
End If
Next sf
End If
End Sub
" wrote:
Hi!
Firstly, is there a macro to go through many subfolders and change the
extension of all the files? Or if I do that myself,
Is there a way to somehow get a macro to seek the XML files, if
they're all in groups separated by folders?
So, have the macro get the 1st file (using an XML map), edit it using
another macro, save and close, then go get the next folder?
I have a series of groups of XML files, all following the same XML Map
in Excel, and I want a macro to bring them in, group by group, saving
them as separate files.
Thanks!
|