Results 1 to 11 of 11

Thread: Active X

  1. #1
    Join Date
    Mar 2002
    Location
    Sacramento, CA
    Posts
    120

    Unanswered: Active X

    I have a command button on a form with code to send an email.

    It works fine on all computers but one. When she clicks on it an error message:
    "Active X Component cannot create object"

    What should I be looking at on her computer?

    The code is probably irrelevant because, like I said, it does work on everyone's machine but hers.

    Thank for any direction!

    Michael Abrams

  2. #2
    Join Date
    Oct 2003
    Location
    São Paulo - Brazil
    Posts
    91

    Re: Active X

    Do the machines have the same version of windows/access/outlook express ?

  3. #3
    Join Date
    Mar 2002
    Location
    Sacramento, CA
    Posts
    120
    Windows 2000 - all of us
    Access 97 - all of us
    Outlook 97 all of us EXCEPT THE PROBLEM MACHINE She is on Outlook 98.

    Do I need to set a different reference?

    Thank you for your help !

    Michael

  4. #4
    Join Date
    Oct 2003
    Posts
    1,091
    Outlook 98 is for Macs
    old, slow, and confused
    but at least I'm inconsistent!

    Rich
    (retired Excel 2003 user, 3/28/2008)

    How to ask a question on forums

  5. #5
    Join Date
    Mar 2002
    Location
    Sacramento, CA
    Posts
    120
    "Outlook 98 is for Macs"

    I will notify my IT department. (We do not have Macs.)
    Hmmmmm..... that is strange !!

    Is that the only answer? Everything else about her Outlook seems to be working fine. Just can't email through Access code.

    Any other suggestions?

    Thank you,
    Michael

  6. #6
    Join Date
    Oct 2003
    Posts
    8
    This is my first post.

    The reason is that the code is unable to create an active X component.

    If you are using CreatObject, then make it sure that it is using something like CreateObject("Outlook.Application"). This is version-less statement. Many people use Outlook.Application.8 or Outlook.Application.10.

    If you have explicitly declared variable like

    Dim objOutlook as Outlook.Application
    Set objOutlook = New Outlook.Application

    Then try CreateObject.

    Which version of outlook have you referred to?

  7. #7
    Join Date
    Mar 2002
    Location
    Sacramento, CA
    Posts
    120
    Actually, this is an internal email. We are all on MS Exchange.

    Here is the code:

    Private Sub cmdSend_Click()
    SendMessage status, rep
    End Sub

    Private Sub SendMessage(status As String, Recip As String)

    On Error GoTo Err_SendMessage_Click
    DoCmd.SendObject , , acFormatTXT, Recip, , , "Record# " & [txtRecordnum] & " IPA - " & [cboIPA] & " ABC - " & [cbo_ABC], Recip & Chr(10) & _
    "Please process Record #: " & [txtRecordnum] & Chr(10) & " Status: " & [cboType_of_Request] & Chr(10) & " Member Name: " & _
    [txtFirstName] & " " & [txtLastName] & Chr(10) & " IDNum: " & [txtMemID] & Chr(10) & " Thank you. ", 0


    Exit_Err_SendMessage_Click:
    Exit Sub

    Err_SendMessage_Click:
    MsgBox Err.Description
    Resume Exit_Err_SendMessage_Click
    End Sub

    Like I said, it works fine everywhere but on the '98 machine.

    Are we sure sure it isn't a reference?

    Thanks again !
    Michael

  8. #8
    Join Date
    Oct 2003
    Location
    US
    Posts
    343
    Its your Outlook 98 because when you use sendobject method of docmd then it defaults to your excahnge server. Since everyone is using outlook 97 and she's on outlook 98, so there is a conflict. Either try using the technique that the mehmoobhaidri mentioned or change her s t ooutlook 97.


    Originally posted by mrabrams
    Actually, this is an internal email. We are all on MS Exchange.

    Here is the code:

    Private Sub cmdSend_Click()
    SendMessage status, rep
    End Sub

    Private Sub SendMessage(status As String, Recip As String)

    On Error GoTo Err_SendMessage_Click
    DoCmd.SendObject , , acFormatTXT, Recip, , , "Record# " & [txtRecordnum] & " IPA - " & [cboIPA] & " ABC - " & [cbo_ABC], Recip & Chr(10) & _
    "Please process Record #: " & [txtRecordnum] & Chr(10) & " Status: " & [cboType_of_Request] & Chr(10) & " Member Name: " & _
    [txtFirstName] & " " & [txtLastName] & Chr(10) & " IDNum: " & [txtMemID] & Chr(10) & " Thank you. ", 0


    Exit_Err_SendMessage_Click:
    Exit Sub

    Err_SendMessage_Click:
    MsgBox Err.Description
    Resume Exit_Err_SendMessage_Click
    End Sub

    Like I said, it works fine everywhere but on the '98 machine.

    Are we sure sure it isn't a reference?

    Thanks again !
    Michael

  9. #9
    Join Date
    Mar 2002
    Location
    Sacramento, CA
    Posts
    120
    Thank you all very much !!!

    Michael

  10. #10
    Join Date
    Oct 2003
    Posts
    8

    Re: Active X

    Originally posted by mrabrams
    I have a command button on a form with code to send an email.

    It works fine on all computers but one. When she clicks on it an error message:
    "Active X Component cannot create object"

    What should I be looking at on her computer?

    The code is probably irrelevant because, like I said, it does work on everyone's machine but hers.

    Thank for any direction!

    Michael Abrams
    Mike:

    The best solution is to ask that Lady to install Outlook 97... -

    Anyway, the reason is simple, I am not sure if you are explicitly referencing the Outlook 97 Library in your program before compiling it, if yes then it will not work as the program is looking for Outlook 97 Library. One bad solution, compile the application on her machine with Outlook 98 selected... Other solution? I think the following Microsoft articles may give you an insight in how to create/send email regardless of which version of Outlook you have installed.

    http://support.microsoft.com/default...b;en-us;260819

    http://support.microsoft.com/default...b;EN-US;161088

  11. #11
    Join Date
    Mar 2002
    Location
    Sacramento, CA
    Posts
    120
    Thank you mahboobhaidari.

    I've got my work cut out for me Monday, but I think one of the suggestions should work.

    I appreciate you following up.

    You have been very helpful.

    Sincerely,
    Michael Abrams

Posting Permissions

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