• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2244
  • Last Modified:

Calling Outlook Express from VB6 code

I have an application developed by VB6 and I need to call Outlook Express from it contains the data on my form to be sed it through the email.

thanks

Mostafa
0
Mostafa_ElSadek
Asked:
Mostafa_ElSadek
1 Solution
 
pavaneeshkumarCommented:
use the code below.

You also need to add the reference for Microsoft Outlook XX.X Object library

where xx.x denote the version of outlook u are using.
Dim oa As New Outlook.Application
Dim msg As Outlook.MailItem
Set msg = oa.CreateItem(olMailItem)
msg.To = "receiver@mail.com"
msg.Body = "message"
msg.Send

Open in new window

0
 
Shanmuga SundaramDirector of Software EngineeringCommented:
There are numerous codes available in the net to send mail from outlook/outlook express. Usually these codes will send mail with the help of default mail clients.

http://www.freevbcode.com/ShowCode.Asp?ID=5213
http://www.freevbcode.com/ShowCode.Asp?ID=159
http://www.a1vbcode.com/snippet-2307.asp
http://www.a1vbcode.com/snippet-92.asp
http://www.a1vbcode.com/snippet-92.asp
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now