Referencing object library?
Hello everyone,
Please help me, I'm creating a program in VB that will access data in an access database.
I have to create an automated letter in Word as well as create a few graphs using Excel.
I've gone to 'Add Reference' and have referenced the Word and Excel object libraries and I can see them and add them. But when I go to project properties --> references the reference path for Word and Excel are, <The system cannot find the reference path specified>. And so I cant use Word and Excel with my application until I fix this and it doesnt recognise the code.
I can connect to the access database no problem at all. I just dont know how to fix this and it is driving me nuts, please help me!
Re: Referencing object library?
What were the exact names of the references you added?
Re: Referencing object library?
Their names were,
Microsoft Word 11.0 Object Library
Microsoft Excel 11.0 Object Library
Re: Referencing object library?
Try removing them then re-adding them to see if it fixes your problem.
Re: Referencing object library?
Nope I've tried that.
I've also tried re-installing both VB and the Office Package.
Please I desperately need this fixing?!
Re: Referencing object library?
you can try like this, without adding reference
Code:
dim x as object
x=server.createobject("Excel.Application")
'If excel is not installed it will throw an "ActiveX Cannot Create object Error"
Hope this Help :)