By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,231 Members | 1,707 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,231 IT Pros & Developers. It's quick & easy.

Email

P: n/a
I currently have the following VB code in a MS Access Database which I use
to send emails. Nonetheless, it opens Outlook and I would like it to send an
email using Outlook Express. Could anyone please oblige in ammending the
code for me, so that it uses Outlook Express 5?

Thanks

______________

Private Sub cmdSendEmail_Click()
Dim objOutlook As Express.Application
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Dim objOutlookAttach As Outlook.Attachment

' Create the Outlook session.
Set objOutlook = CreateObject("Outlook.Application")

' Create the message.
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)

With objOutlookMsg
' Add the To recipient(s) to the message.
Set objOutlookRecip = .Recipients.Add(Me.EMail)
objOutlookRecip.Type = olTo

.Display
End With
Set objOutlook = Nothing
End Sub
Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
well as far s i know it isn`t possible to send e-mails with outlook express
like this

the best you can get is using a mailto command in a shell ( this will open
the default mail proggy with a message )

i used the vbsendmail.dll from freevbcode.com to send e-mail messages from
my proggy`s it is free and comes with sourcecode

i retrieve the default SMTP server, and users e-mail adress from the
registry , feed this to the sendmail class and send my message

you can send even atachments , pictures , htmkl formated mail etc etc etc
http://www.freevbcode.com/ShowCode.Asp?ID=109
regards

M. Posseth [MCP]
"Neil Greenough" <ne***********@btopenworld.com> wrote in message
news:ce*********@hercules.btinternet.com...
I currently have the following VB code in a MS Access Database which I use
to send emails. Nonetheless, it opens Outlook and I would like it to send an email using Outlook Express. Could anyone please oblige in ammending the
code for me, so that it uses Outlook Express 5?

Thanks

______________

Private Sub cmdSendEmail_Click()
Dim objOutlook As Express.Application
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Dim objOutlookAttach As Outlook.Attachment

' Create the Outlook session.
Set objOutlook = CreateObject("Outlook.Application")

' Create the message.
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)

With objOutlookMsg
' Add the To recipient(s) to the message.
Set objOutlookRecip = .Recipients.Add(Me.EMail)
objOutlookRecip.Type = olTo

.Display
End With
Set objOutlook = Nothing
End Sub

Jul 17 '05 #2

P: n/a

"Neil Greenough" <ne***********@btopenworld.com> skrev i en
meddelelse news:ce*********@hercules.btinternet.com...
I currently have the following VB code in a MS Access Database which I use to send emails. Nonetheless, it opens Outlook and I would like it to send an email using Outlook Express. Could anyone please oblige in ammending the code for me, so that it uses Outlook Express 5?


Outlook Express does not expose an interface so you cannot do it
that way !
--
/\ preben nielsen
\/\ pr**@post.tele.dk
Jul 17 '05 #3

P: n/a
"Neil Greenough" <ne***********@btopenworld.com> wrote:
I currently have the following VB code in a MS Access Database which I use
to send emails. Nonetheless, it opens Outlook and I would like it to send an
email using Outlook Express. Could anyone please oblige in ammending the
code for me, so that it uses Outlook Express 5?

Thanks


Forget Outlook / Express and use an SMTP control to send mail directly. There's
a free control at www.ostrosoft.com

More about me: http://www.jecarter.com/
VB3/VB6/C/PowerBasic source code: http://www.jecarter.com/programs.html
Freeware for the Palm with NS Basic source code: http://nsb.jecarter.com
Drivers for Pablo graphics tablet and JamCam cameras: http://home.earthlink.net/~mwbt/
Email here: http://www.jecarter.com/contactme.htm
Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.