UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Email Issue In Access 2007    
 
   
River34
post May 16 2012, 02:26 PM
Post #1

UtterAccess Addict
Posts: 252
From: Metro Detroit



I am attempting to send an email using the following lines of code -- both fail:

Private Sub Export_Click()
On Error GoTo Err_Export_Click

' DoCmd.SendObject acReport, "rptProject", acFormatPDF, Email_TO, , , "Sample Email Subject", , False
DoCmd.SendObject acReport, "rptProject", acFormatPDF, "RealEmailAddress@yahoo.com", , , "Sample Email Subject", , False

Exit_Export_Click:
Exit Sub

Err_Export_Click:
MsgBox Err.Description
Resume Exit_Export_Click

End Sub

My email uses Outlook Web Access and I am running over a wireless connection. When the code runs I get prompted for my email password. Sometimes I get prompted over and over then the email appears to have been sent but wasn't. Sometimes I am not prompted. Problem is that email is NEVER actually sent. Anyone have any suggestions?

The prompts are attached.



Go to the top of the page
 
+
theDBguy
post May 16 2012, 02:31 PM
Post #2

Access Wiki and Forums Moderator
Posts: 48,114
From: SoCal, USA



Hi,

Since you are not really using an email client, you might have better luck using CDO method.

Check the Code Archive for a demo by David Marten (cheekybuddha).

Just my 2 cents... (IMG:style_emoticons/default/2cents.gif)
Go to the top of the page
 
+
River34
post May 16 2012, 02:34 PM
Post #3

UtterAccess Addict
Posts: 252
From: Metro Detroit



Will take a look. Thanks for the fast lead, DB. This process is going to get very complex with variables and attachements, etc. and I can't very well code it and not be able to check and debug.
Go to the top of the page
 
+
theDBguy
post May 16 2012, 02:41 PM
Post #4

Access Wiki and Forums Moderator
Posts: 48,114
From: SoCal, USA



Hi,

Yes, if you're talking "attachments," then you can definitely not use SendObject() for that.

Good luck! Let us know how it goes...
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 26th May 2013 - 04:15 AM