Chat LIVE With Programming Experts! There Are 23 Online Right Now...

Welcome to Dream.In.Code
Become a VB Expert!

Join 244,293 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 913 people online right now. Registration is fast and FREE... Join Now!




MS Access & AOL

 
Reply to this topicStart new topic

MS Access & AOL, Use MS Access to send e-mail via AOL

geoffslea
5 Sep, 2008 - 01:50 AM
Post #1

New D.I.C Head
*

Joined: 4 Sep, 2008
Posts: 2

I'm trying to use MS Access to email via AOL
I don't want to use Outlook, and AOL help team are a fat lot of good!!
I've left a lot of commented code in as i have tried various ways of doing this and i keep old code till i'm finished then tidy it up.
No laughing please I'm doing my best here but am stumped for the moment.

Private Sub cmdEmail_Click()
On Error GoTo Err_cmdEmail_Click

Dim stAppName As String
Dim Recipients As String
Dim szSubject As String
Dim szMsgFile As String
Dim Stremail As String

Recipients = email 'field where email address is taken
szMsgFile = "This is a test message"
szSubject = "Message from Mercurius Dance Company"
stAppName = "C:\Program Files\AOL 9.0a\aol.exe"

' Call Shell(stAppName, 1) >>>>either of these work
Call Shell(stAppName, vbMaximizedFocus) >>>>either of these work
With AOLClientCommunications 'urgh this is where it goes wrong!
.MailCompose
.szSubject
.szMsgFile
.Recipients
' .CCRecipients >>>>> i'm not using this
' .BCCRecipients >>>>> i'm not using this
' .Attachments >>>>>> i'm not using this
.edit
End With

' Call Shell("C:\Program Files\AOL 9.0a\aol.exe", "MailCompose", 1)
' Call Shell("C:\Program Files\AOL 9.0a\aol.exe" "MailCompose" "szSubject" "szMsgFile" "Recipients"","",""),1")

'Shell ("c:\myapplication.exe" "argument1" "argument2")
' stAppName = "C:\Program Files\AOL 9.0a\aol.exe" "MailCompose(szSubject, szMsgFile, Recipients)"
'Stremail = "MailCompose stSubject, stMessageText, sttoEmail"
' MailCompose(szSubject As String, szMsgFile As String, Recipients, CCRecipients, BCCRecipients, Attachments)

Exit_cmdEmail_Click:
Exit Sub

Err_cmdEmail_Click:
MsgBox Err.Description
Resume Exit_cmdEmail_Click

End Sub

User is offlineProfile CardPM
+Quote Post


dineeshd
RE: MS Access & AOL
5 Sep, 2008 - 02:05 AM
Post #2


Group Icon

Joined: 30 Jun, 2008
Posts: 600



Thanked: 25 times
Dream Kudos: 575
My Contributions
So what is your issue with the code? Is it not working as you want? Is it throwing some error, if then what error its throwing? You need to explain.... rolleyes.gif
User is offlineProfile CardPM
+Quote Post

geoffslea
RE: MS Access & AOL
5 Sep, 2008 - 05:23 AM
Post #3

New D.I.C Head
*

Joined: 4 Sep, 2008
Posts: 2

oops sorry
it opens the AOL mail program ok, but Access throws up the error

object required


i understand how to do this if it was outlook being used as the mail program
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 7/4/09 04:10PM

Live VB Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month