By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,145 Members | 1,516 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,145 IT Pros & Developers. It's quick & easy.

Can't get ImportXML to work

P: n/a
Hi

I have an Access 2000 app where I will soon get an XML file as an input
(of which I already have an early test file), instead of an Excel
spreadsheet. So I set out to see how to import the XML. This seems easy
enough, so I created a new mdb (Access 2003, BTW), added one function
(called by a macro) which reads like this:

Public Function fXMLImport()
Application.ImportXML "P:\ApplDev\VBA-Access\Software\example.xml",
acStructureAndData
End Function

The Application.ImportXML line gives me an error, telling me it can't
find the path, although that path and file name is definitively valid,
I copied it from the Explorer address bar and file name !

Worse, if I take away the path and keep only the file name (the xml
file is in the same dir as the mdb), I get a fatal error "Method
'ImportXML' of object '_Application' failed" !!!

What's going on, and what am I doing wrong ???

What worries me is that the ImportXML help mentions as the data source
"file name and path" instead of "path and file name", but there are of
course no examples with a real path... Is there a special syntax that
escapes me ?

Thanks for your help
Bernard

Oct 11 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.