Emails not sending from Outlook 2010

frankbutcher

Registered User.
Local time
Today, 22:11
Joined
Aug 6, 2004
Messages
192
Hi
I have recently upgraded to Outlook 2010 from 2007, but my Access is still at 2003.
I used to send emails from Access with Outlook 2007 with the following code:-

---------------------------------
Private Sub Command67_Click()
On Error GoTo Err_Command67_Click
Dim strMailto As String ' email address
Dim strMailcc As String ' email address
Dim strSubject As String 'This is for the subject line in the e-mail
Dim strMessage As String 'This is for the email message text


strMailto = "eg@example.com"
strMailcc = "eg@example.com"
strSubject = "Quotation Number " & Me.ProjectNo & " can now be loaded"
strMessage = "All" & vbCrLf & vbCrLf & "Quotation Number " & Me.ProjectNo & " can now be loaded onto Sage" & vbCrLf & vbCrLf & "All relevant PO's/Email confirmation and quotation's should be in the folder" & vbCrLf & vbCrLf & "Any problems, please give me a call"

DoCmd.SendObject , , "RichTextFormat(*.rtf)", strMailto, strMailcc, "", strSubject, strMessage, True, ""

Command67_Click_Exit:
Exit Sub

Err_Command67_Click:
If MsgBox("The Email has not been sent, errors have occured", vbQuestion, "Change Status") = vbNo Then

DoCmd.CancelEvent

End If

End Sub
---------------------------------

Now I have changed to Outlook 2010, this does not seem to work.
I have read another post about the same issue, and it mentioned "binding" but have no idea what this is!!

Can anyone shed any light?

Thanks.

Frank.
 
That code doesn't rely on binding (there would be a Dim xx As Outlook...). Do you have a reference to Outlook in Tools/References in the VBA editor? If so, you can uncheck it, or if needed for other code uncheck it and check the new version.
 
No, there doesn't seem to be anything checked. It doesn't work with another Database as well, so I am thinking it may be a setting on Outlook 2010?
 
Not that I'm aware of, but I only have a couple of PC's with 2010 on them so far. Do you get an error, or?
 
I get the error message in the message box saying

"The Email has not been sent, errors have occured"
( I think I should have written this info before..!!)

I uninstalled 2010 and reinstalled 2007 and it worked. I then uninstalled 2007 and put 2010 back on and the same error message appeared again.

Thanks for your help on this..
 

Users who are viewing this thread

Back
Top Bottom