Results 1 to 6 of 6

Thread: Referencing object library?

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2007
    Posts
    3

    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!

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Referencing object library?

    What were the exact names of the references you added?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2007
    Posts
    3

    Re: Referencing object library?

    Their names were,

    Microsoft Word 11.0 Object Library
    Microsoft Excel 11.0 Object Library

  4. #4
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: Referencing object library?

    Try removing them then re-adding them to see if it fixes your problem.

  5. #5

    Thread Starter
    New Member
    Join Date
    Feb 2007
    Posts
    3

    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?!

  6. #6
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    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
    Please mark you thread resolved using the Thread Tools as shown

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width