473,672 Members | 2,688 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Email

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_Cl ick()
Dim objOutlook As Express.Applica tion
Dim objOutlookMsg As Outlook.MailIte m
Dim objOutlookRecip As Outlook.Recipie nt
Dim objOutlookAttac h As Outlook.Attachm ent

' Create the Outlook session.
Set objOutlook = CreateObject("O utlook.Applicat ion")

' Create the message.
Set objOutlookMsg = objOutlook.Crea teItem(olMailIt em)

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
3 8470
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.btin ternet.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_Cl ick()
Dim objOutlook As Express.Applica tion
Dim objOutlookMsg As Outlook.MailIte m
Dim objOutlookRecip As Outlook.Recipie nt
Dim objOutlookAttac h As Outlook.Attachm ent

' Create the Outlook session.
Set objOutlook = CreateObject("O utlook.Applicat ion")

' Create the message.
Set objOutlookMsg = objOutlook.Crea teItem(olMailIt em)

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

"Neil Greenough" <ne***********@ btopenworld.com > skrev i en
meddelelse news:ce******** *@hercules.btin ternet.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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
8783
by: Chuck Anderson | last post by:
Can anyone point me in the right direction? I want to use Php to automate confirmation of someone joining an email list by them replying to an email (so they don't have to have a browser?). I will probably use a hyperlink with a unique ID, but I also want to know how to go about reading from a mailbox with Php so I can use an email reply method, too. I'm having trouble finding any kind of tutorial. From the bit of searching I've done,...
4
3012
by: dmiller23462 | last post by:
So here's my problem.....I need to set up different email distributions based on which option in the following Select form has been chosen....For instance if "Putaway" is chosen it needs to email User1@here.whatever and User4@here.whatever but if "Loaded" is chosen it needs to email User2@here.whatever and User3@here.whatever, etc, etc... I'm aware that the only thing that really needs to change is the "Mail.AddAddress" line (at least...
88
12480
by: Mike | last post by:
Is there a way to determine what a user's default email client is? I read a post from 3 years ago that said no. I guess I'm hoping something has come along since then.
2
2219
by: BSG-SMTP-Gateway | last post by:
The following message sent by this account has violated system policy: Connection From: 64.253.55.90 From: python-list@python.org To: terriss@birdsall.com, q4dzsAEAAAAA@birdsall.com, zSbxT7FSCIAEAAAAA@birdsall.com, rQEAAAAA@birdsall.com, 20a.9ea7bfe.306372db@birdsall.com, Gslotnick@birdsall.com, chrisbaker@birdsall.com, mshawver@birdsall.com, SJCSmile@birdsall.com, Pugsleydmd@birdsall.com, FredBMaier@birdsall.com, dbosco6896@birdsall.com,...
26
2744
by: libsfan01 | last post by:
Hi all! Can anyone show me how to check and email field on a form for the existence of these two characters. Kind regards Marc
3
2867
by: g0c | last post by:
hi, how to hide or replace email addresses in php mail function with something like "group" so the email addresses to which email is sent are not visible ? i have : $subs = "email1@dot.com, emai2@dot.com, email3@dot.com" $header .= "To : email@notset.com\r\n";
3
2516
by: Erik Johnson | last post by:
THE GOAL: I need to send an email with a simple ASCII text body and an attached HTML file. I have scripts that send basic emails via the smtplib module that don't have any attachements and that seems to work fine. I first looked at the mimetools modules but it says it is depreceated since 2.3, so I started trying to use the email module. Here is a script that basically follows the second example given in section 7.1.13 of the Python...
15
15214
by: Craig Hurley | last post by:
Hello, user@x.com receives an email from user@a.com. I want to forward that email to user@y.com. I want the contents/header to remain intact, with the exception of adding "X-Forwarded-For". In other words, when user@y.com received the email, it will be from user@a.com, but will contain a reference that it was forwarded by user@x.com. I'm piping all email destined for user@x.com to a php script. I've seen some very complicated...
3
8954
by: IGD | last post by:
I don't know if this is the right place to post this or not. If not, could someone direct me elsewhere where I would find more information on how to solve my problem? Thanks! My problem is this: I am writing an application for work. This application sends a basic html email via SMTP to a group. In this group are individual people's emails, but also about 5 other groups. The problem is that the email is only getting received by (or sent...
27
4819
matheussousuke
by: matheussousuke | last post by:
I'm having trouble with e-mail sending, I mean, the website is suposed to send a confirmation email after sign up, but it gets like text plain instead of HTML May someone help me, please? Here's the code <?php require_once 'path_cnfg.php';
0
8418
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8940
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8694
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5718
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4237
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4433
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2830
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2083
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1831
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.