Results 1 to 4 of 4
  1. #1
    Star Lounger
    Join Date
    Apr 2001
    Location
    Naperville, Illinois, USA
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Calling Outlook - Revisited (A2K, Acc2003)

    Earlier in the month, Hans (and Greg) gave me the code to call Outlook from an Access Program (Post 686,286).

    I have installed on several computers and it works fine on all of them but one. With that one I get: "Automation Error - the Specified Module could not be found").

    This computer has both Access 2003 and Outlook 2003. In the tools, references it has Outlook 11.0 Object Library checked.

    My code is:

    Private Sub cmdEmail_Click()
    On Error GoTo Err_cmdEmail_Click

    Dim appoutlook As Outlook.Application, sSubject
    Dim Mailoutlook As Outlook.MailItem
    Set appoutlook = CreateObject("outlook.Application")
    Set Mailoutlook = appoutlook.CreateItem(olMailItem)

    The program bombs on the first Set Line. Any suggestions?

    Thanks,

    Alan

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Calling Outlook - Revisited (A2K, Acc2003)

    Open the database on the problem computer.
    Activate the Visual Basic Editor.
    Select Debug | Compile <projectname>
    Do you get the same or a similar error?

  3. #3
    Star Lounger
    Join Date
    Apr 2001
    Location
    Naperville, Illinois, USA
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calling Outlook - Revisited (A2K, Acc2003)

    Wow, I have some old code to clean up. Got error in other forms. So I created a new database and imported the problem form with the tables. In the new databsae with just the one form, it was okay on the Compile / debug but still choked when the command button activating the form is clicked.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Calling Outlook - Revisited (A2K, Acc2003)

    If the code compiles OK in the new database, the Outlook module is available, but since you get an error about it, it would seem that there is a problem with it. I'd try Help | Detect and Repair from within an Office application.

Posting Permissions

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