Solved

DoCmd.SendObject acSendNoObject

Posted on 2004-08-26
5
670 Views
Last Modified: 2012-06-27
Hi,

I am running the following code on two seperate systems. One works the other errors constantly;

If Not IsNull(Me.HD_Email) Then
    strMsg = MsgBox("Do You Want To Send This Customer An Email?", vbYesNo, ConTitle)
        If strMsg = vbNo Then Exit Sub
   
        DoCmd.SendObject acSendNoObject, , , Me.HD_Email, , , "At Home In London"

        Exit Sub
Else
    MsgBox "No Email Address Found For This Customer", vbOKOnly, ConTitle
    Exit Sub
End If

-----------
Using Access 2002. the error message as follows

(From)Microsoft Exchange
The Object Could Not Be Found

Followed by error from Access.
2993
Can't send this message

would appreciate any help

Scott
0
Comment
Question by:scottsanpedro
  • 3
  • 2
5 Comments
 
LVL 26

Expert Comment

by:dannywareham
ID: 11901951
0
 
LVL 1

Author Comment

by:scottsanpedro
ID: 11901973
yep...i've been everywhere :)
0
 
LVL 26

Expert Comment

by:dannywareham
ID: 11902071
Okey doke

What are you trying to do - just send an email without an attachment through Outlook?
0
 
LVL 26

Accepted Solution

by:
dannywareham earned 150 total points
ID: 11902094
If so, it may be better to do it through a different code:

'* Set a reference to 'Microsoft Outlook 9.0 Object Library  *
'* (or any other version)                                    *
'* Menu 'Tools', 'References', check the appropriate library *
'*************************************************************
Private Sub Knop1_Click()
Dim ol As New Outlook.Application
Dim olMail As Outlook.MailItem
Dim strTO As String
Dim strCC As String

   strTO = "Who@where.com"
   'strCC = "who@domain.com" & ";" & "who2@domain.com"


    Set olMail = ol.CreateItem(olMailItem)

    With olMail
        .To = strTO
        '.CC = strCC
        '.BCC = "address2@aa.com"
        '.Attachments.Add "c:\somefile.txt"
        '.Attachments.Add "c:\somefile2.txt"
        .Subject = "Testing"
        .Body = "This is the body..."
        .Display
        '.Send
    End With

    Set olMail = Nothing
    Set ol = Nothing

End Sub

I've ' out some of the code, so that you can add or remove it as nessessary
0
 
LVL 1

Author Comment

by:scottsanpedro
ID: 11902581
Thanks Danny...looks like it could work

I will check later as away for a bit...thank you and will get back

0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question