+ Reply to Thread
Results 1 to 3 of 3

Need additional code to load object library

  1. #1
    Forum Contributor rkjudy's Avatar
    Join Date
    03-31-2009
    Location
    Longview, TX
    MS-Off Ver
    MS Office 2010
    Posts
    239

    Need additional code to load object library

    I have a worksheet that uses MS Outlook Object Library to send one sheet of the workbook via Outlook email. I have code written to load MS Outlook 14.0 Object Library (MS Excel 2010) and it works great. I distribute this workbook to other users, some of which run MS Excel 2007. MS Excel 2007 uses MS Outlook 12.0 Object Library. I want to add code to my macro that will load the proper Object Library based on the version being used. I need to add an 'on error then' statement to my existing code. In other words if Object Library 14.0 is not found, then load Object Library 12.0. This will cover all my users versions. I will need to know where the Object Library 12.0 is located in the registry. See my current code that loads Object Library 14.0 below. Thanks in advance.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Need additional code to load object library

    There are some old threads on this subject dotted around the board - one being:

    http://www.excelforum.com/excel-prog...eferences.html

    Whether or not you want / need to Early Bind is another matter - you could perhaps (if viable) revert to Late Binding which though slower would remove the need for the above altogether.

  3. #3
    Forum Contributor rkjudy's Avatar
    Join Date
    03-31-2009
    Location
    Longview, TX
    MS-Off Ver
    MS Office 2010
    Posts
    239

    Re: Need additional code to load object library

    Being a novice to VB, I really don't understand late binding. If I could just add to the code I have to load Object Library 14.0 or 12.0 whichever is needed, that would work just fine.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1