Results 1 to 5 of 5
  1. #1
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Access to Outlook email error (2002)

    Hi,

    I'm working on a database that is set up to email outlook via access and its been working fine. Now the user is getting the following error and I'm not sure what the issue is:
    Function SendMail( _
    Recipient As String, _
    Subject As String, _
    Message As String, _
    Attachment As String, _
    Optional ShowMail As Boolean) As Boolean

    Dim objOL As Outlook.Application
    Dim objMI As Outlook.MailItem
    Dim blnNotActive As Boolean
    Dim intPos1 As Integer, intPos2 As Integer

    The first 6 lines are hightlighted in yellow.

    I've attached a screen shot of the reference library.
    Attached Images Attached Images

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

    Re: Access to Outlook email error (2002)

    You should have a reference to the Microsoft Outlook 10.0 Object Library instead of to the Microsoft Outlook View Control.

  3. #3
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Access to Outlook email error (2002)

    Hi Hans,

    I made the change you recommended and that worked for the email, however now they are getting an error when they go to fax and I'm not sure if its at all related. The error states its a compile error, use type not defined. I'm attaching a screen shot. I didn't write this software so I'm not sure where to begin. They are faxing via the Access software and its been working fine up until now.

    Thanks,
    Leesha
    Attached Files Attached Files

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

    Re: Access to Outlook email error (2002)

    Clear the check boxes for OLE Automation and Microsoft Visual Basic for Applications Extensibility 5.3. They aren't necessary.
    Scroll down the list until you see Microsoft DAO 3.6 Object Library and tick its check box. Then click OK.

    It's best to change the declaration of rs from

    Dim rs As Recordset

    to

    Dim rs As DAO.Recordset

    It won't make any difference at the moment, but it can help to avoid problems in the future.

  5. #5
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Access to Outlook email error (2002)

    Hans you are the most wonderful man! This user's business depends on getting these faxes out and this was so out of my league!!
    Thanks for the quick response.

    Leesha

Posting Permissions

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