Solved

DoCmd.SendObject acSendNoObject

Posted on 2004-08-26
5
631 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now