Getting data from excel

J

jarlen

I have looked a bit at the documentation here:
http://msdn.microsoft.com/da-dk/library/aa342321(en-us).aspx about connection
to an excel-sheet and pulling the data out, but I just get a: "Run-time
error":
"Could not make connection to data."
I'm not sure what is wrong, and the error message really doesn't give a
hint, all I know is that the error is in the connection line (last line):
Set vsoDataRecordset = ActiveDocument.DataRecordsets.Add(strConnection,
strCommand, 0, "Data")
Only thing I've changed in the script is the path name, which I know to be
correct (I'm printing it to a msgbox before attempting to connect.)
Any ideas why this happens, or any suggestions on where I can learn more
about connecting to and working with Excel-data?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top