Results 1 to 6 of 6
  1. #1
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Microsoft SendObject Error? (A2K SR1)

    You don't indicate how it fails, so it's pretty hard to guess what might be wrong - it's pretty safe to assume that under the right conditions the MS code works.

    Several possible hitchesl come to mind - do you have the right references set for the Collaborative Data Objects functions? Do you have the Outlook security patch applied? Are you running Outlook 2000? Do you need to attach an Access object to the email, or could it be sent as text or some other embedded format in email? Hope this gives you some ideas to pursue.
    Wendell

  2. #2
    Lounger
    Join Date
    Apr 2001
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Microsoft SendObject Error? (A2K SR1)

    The error occurs in the following code when trying to compile the module:
    It seems that "Dim clsSendObject As accSendObject " is not defined

    Sub SendMail()
    Dim clsSendObject As accSendObject
    Dim strMsg As String

    Set clsSendObject = New accSendObject
    strMsg = String(3000, "a")
    clsSendObject.SendObject acSendReport, "Alphabetical List of Products", accOutputSNP, _
    "<SomeEmailName>", , , "This is a test subject", strMsg, True
    Set clsSendObject = Nothing
    End Sub

  3. #3
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Microsoft SendObject Error? (A2K SR1)

    It appears to me that something in step 9 may have gone astray. I'm not much of an expert at class modules as I avoid them whenever I can, but basically you are creating a reference to the class module. In all honesty, the line
    set clsSendObject = New accSendObject
    looks strange to me. The syntax seems like it should be reversed, and I can't see anywhere in the code that would be triggered by that. However I'm not an expert here, so perhaps Charlotte or one of the other gurus can make more sense than I. In any event if the code doesn't compile, there's an obvious problem somewhere in the registration of accSendOgject. This is a reach, but can you compile and save the module without the code giving you trouble, and then try it again - just a remote possibility but all I can think of at the moment. If you solve the problem please post the solution - thanks.
    Wendell

  4. #4
    Lounger
    Join Date
    Apr 2001
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Microsoft SendObject Error? (A2K SR1)

    Yes the reference is to the class module in the example located by the link to the Microsoft article in my original post. I feel that the class module has not declared this object and cannot figure a way to fix it.

    I did not include the entire class Module here for the sake of saving space but it must be the culprit otherwise I have a problem with references and their priority.

  5. #5
    Lounger
    Join Date
    Apr 2001
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Microsoft SendObject Error? (A2K SR1)

    Hold the Phone!!!

    You were absolutely correct!
    I screwed up on step 9. I followed the instructions a second time and found that I did not correctly rename the class module property.

    Thanks a bunch!

  6. #6
    Lounger
    Join Date
    Apr 2001
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Microsoft SendObject Error? (A2K SR1)

    I can't get this sample code from Microsoft to work.
    <A target="_blank" HREF=http://support.microsoft.com/default.aspx?scid=kb;en-us;Q260819&id=260819&SD=MSKB>http://support.microsoft.com/default.aspx?...b;EN-US;Q260819</A>
    Is it faulty or am I doing something wrong?

    Thanks in advance

    Edited to activate link--Charlotte

Posting Permissions

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