Sending Email

crt052681

New member
Local time
Today, 08:11
Joined
Apr 23, 2006
Messages
6
I have been able to create a form that will send an email automatically when the form is opened. Tha problem is, the email will not actually send until I open Outlook. Any ideas?

Thanks in advance.
 
I know the default SmartTags uses Outlook, have you tried that? Should open it automatically.
 
To open Outlook you can use code like below.

Dim OLApp as New Outlook.Application
 
IF your using the "sendObject" method you should not have to insert code to open any application. Outlook will open by itself.
 
Here it is.

Private Sub Form_Load()
Dim objOutlook As Outlook.Application

Set objOutlook = CreateObject("Outlook.Application")

DoCmd.SendObject acSendTable, "tblFireLog", acFormatXLS, "crt052681comcast.net", , , _
" Report Log", _
"Here is the monthly Log Report", False

Set objOutlook = Nothing

End Sub


Again, it doesn't actually send the email until I open outlook. Also, The outlook is hooked through my comcast.net account to send and receive emails. Not sure if this helps. Thanks again.
 
Try this

Private Sub Form_Open(Cancel As Integer)
DoCmd.SendObject acSendTable, "tblFireLog", acFormatXLS, "crt052681@comcast.net", "", "", _
" Report Log", _
"Here is the monthly Log Report", False, ""
End Sub


I put that........ and ONLY that on a form...... My outlook was closed.... Works fine.
PS...... Look at your "Docmd" line... the email address had no "@" sign.
 
Huh, weird. You think it might have something to do with the comcast account?
 
doubtful. email is email, just a different provider and Access has no way of telling who your provider is.
 
My guess is it's in Outlook........ Try looking at your settings there... Options.... Send tab..... Is "Send messages immediately" checked? If not check it. Then try it again. Had a problem with an app I did for the office here that was about the same..... That "Send message" ended up being the culprit.
 
crt052681 said:
I have been able to create a form that will send an email automatically when the form is opened. Tha problem is, the email will not actually send until I open Outlook. Any ideas?

Thanks in advance.

I'm having the same problem...now, I've been using Outlook Express until now, and now when I opened Mic Outlook, it sent out 30 e-mails (from my testing period :rolleyes: )
 
I use the following line and it will start an email message even when outlook is not open.

Code:
DoCmd.SendObject acSendNoObject, "", "", Me.EMAIL, "", "", Me.sub, Me.Text23
 
bonekrusher said:
I use the following line and it will start an email message even when outlook is not open.

Code:
DoCmd.SendObject acSendNoObject, "", "", Me.EMAIL, "", "", Me.sub, Me.Text23

Tnx I'll try that...it's funny how it opens new e-mail form but doesn't wanna send it.
 
Using Outlook express, with Tools / Options/Security remove the tick from "Warn me when other applications try to send e-mail as me" the following code will work.

Code:
DoCmd.SendObject acSendNoObject, "", "", "medog@myisp.com.au", "", "", "Subject Text", "Message Text"[B], False[/B]

When I try it with Outlook 2003 I get a security warning, and as far as I know you can't turn it off.
 
ansentry said:
Using Outlook express, with Tools / Options/Security remove the tick from "Warn me when other applications try to send e-mail as me" the following code will work.

Code:
DoCmd.SendObject acSendNoObject, "", "", "medog@myisp.com.au", "", "", "Subject Text", "Message Text"[B], False[/B]

When I try it with Outlook 2003 I get a security warning, and as far as I know you can't turn it off.

Well, it is unchecked...but I'm having the same problem...not until I open my Microsoft Outlook (and Not outlook Express) that my e-mail are sent out. My outlook express being opened or closed doesn't help with sending out e-mails.
Weird :eek:
 
Sorry, I forgot to mention that you must make Outlook Express your default mail program (that is how Access knows what program to use to sent the e-mails)

To change your e-mail program go to Control Panel /Internet options / Programs and change e-mail to Outlook Express.

Now reopen Access and fire off an e-mail.
 

Users who are viewing this thread

Back
Top Bottom