Greetings,

I need some help with what seems to be a simple task but which, as
usual, is impossible to do given the state of VBA's help files.

I am looping through a series of XML files in a folder and want to
convert/save them off to another folder in CSV (because we found Excel
can do this). Inside my loop, I am doing the following to open the
file:

Workbooks.OpenXML Filename:=(inputDir + xmlFile),
LoadOption:=xlXmlLoadImportToList

That's fine and dandy but I don't really need the workbook to open like
a real workbook -- I need it to open like in C++ or Java (i.e. open it
internally and don't show me the contents, because I don't need to see
them). Then, I want to auto-close the file with a name that I give it,
but no matter what I try, the workbook opens up and I can't exit out of
the workbook unless I kill the macro and flip to another workbook (the
one containing the macro doing all the file conversion).

I've tried things like:

ActiveWorkbook.SaveAs Filename:=(outputDir + csvFile),
FileFormat:=xlCSV, CreateBackup:=False

and

ActiveWorkbook.Save Filename:=(outputDir + csvFile), FileFormat:=xlCSV,
CreateBackup:=False

and

ActiveWorkbook.Close SaveChanges:=True, Filename:=(outputDir +
csvFile), RouteWorkbook:=False

but they all open the workbook for me to see, which interrupts the
process and which I do not want to happen. I can't even do a
ActiveWorkbook.Close.

Any advice, please help! Thanks very much.

Mike