+ Reply to Thread
Results 1 to 11 of 11

Late Binding for Outlook

  1. #1
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Late Binding for Outlook

    I am trying to get the following code to be independent of whether I use Outlook 2013 or Outlook 2016. I do not want to Reference the library.

    I thought
    Please Login or Register  to view this content.
    was all that I needed.

    However the code fails on the indicated line with the error Sub of Function not defined.
    Please Login or Register  to view this content.
    Otherwise this code works just fine!
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  2. #2
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,910

    Re: Late Binding for Outlook

    You need an Outlook.Application object to call GetNameSpace.
    Rory

  3. #3
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Late Binding for Outlook

    OK here is the new code. It still fails in the same spot.
    Please Login or Register  to view this content.

  4. #4
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,910

    Re: Late Binding for Outlook

    You need to amend the next line to:

    Please Login or Register  to view this content.

  5. #5
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Late Binding for Outlook

    Well I got it working on the Outlook 2016 system. When I "port" it to my Outlook 2013 system I get: Error Message Run-Time error 429, "Active X component cannot create object." on
    Please Login or Register  to view this content.
    I included various Microsoft ActiveX references but none of them fix the issue.

    The long list is what I tried on the 2013 system. The short list is what works on the 2016 system.
    Attached Images Attached Images
    Last edited by dflak; 06-07-2019 at 11:46 AM.

  6. #6
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Late Binding for Outlook

    The Outlook 2016 is a 32-bit implementation running on a 64-bit machine. The Outlook 2013 is a 32-bit implementation running on a 32-bit machine. If that makes any difference.

  7. #7
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,910

    Re: Late Binding for Outlook

    Bitness shouldn't have anything to do with it, and you don't need any references set for this (certainly not any ADO ones that you show there). Here's a troubleshooting article for that error, which is an unfortunately common one: https://support.microsoft.com/en-gb/...e-applications

  8. #8
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Late Binding for Outlook

    I was just there. Everything seems to be OK. Maybe I'll have my IT department do a reinstall on office.

  9. #9
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Late Binding for Outlook

    BTW: This is the same system that ran the code with no problem with early binding.

  10. #10
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,910

    Re: Late Binding for Outlook

    Also, just FYI, you aren't actually using the constant you declared (twice).

    And your SendMail code needs to create (or be passed) an outlook.application object too.

  11. #11
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Late Binding for Outlook

    My original question about late binding has been answered, so I will mark this thread as solved.

    I did an off-line repair of office and that did not solve the problem. I might get my IT department to do a clean re-install.

    To get on with my deadline, I'm going back to the early binding on the machine that will run the code. I can set up a parallel system (different Key words -different folder) to continue testing with late binding and getting it to work on the laptop.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Save birthday as Outlook calendar with recurrence every year with late binding
    By Goodstart14 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-07-2017, 12:31 PM
  2. [SOLVED] Learning differences between Early Binding & Late Binding
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 06-28-2013, 01:16 AM
  3. [SOLVED] Seeking knowledge on Early Binding, Late Binding
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-17-2013, 10:45 PM
  4. Late Binding to Outlook Web Apps 2003 from Excel 2000
    By Dave Benson in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-29-2005, 07:00 PM
  5. Late binding issues with Excel and Outlook
    By Dave Benson in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-25-2005, 11:10 PM
  6. Late Binding examples of binding excel application
    By HeatherO in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 03-17-2005, 01:06 PM
  7. [SOLVED] repost: need help trying to automate Outlook from XL, with late binding
    By KR in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-06-2005, 12:06 PM

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