Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Creating an email message using VB6

Posted on 2000-02-17
4
190 Views
Last Modified: 2010-05-02
I want to create a button to open a new email message with the subject and email address filled in.  Can any one help me please?
0
Comment
Question by:sgundrum
  • 2
4 Comments
 
LVL 6

Expert Comment

by:Marine
ID: 2533621
What are you using to send email ? MAPI ? CDONTS ? Other Services ? Give information.
0
 

Author Comment

by:sgundrum
ID: 2533623
this will be for people using internet mail, outlook express and outlook under 95/98 and possible NT
0
 

Accepted Solution

by:
amuru earned 50 total points
ID: 2533634
Use Microsoft MAPI Controls
(Add in the component, C:\windows\system\MSMAPI32.OCX)

On the button click, put command :
<mapictrlname>.compose
<mapictrlname>.send true

0
 
LVL 6

Expert Comment

by:Marine
ID: 2533638
If you have a webserver installed then you can adopt to this code.

dim objMail as Object' I am using late bound since i don't know if i can create CDONTS with New Keword
Set objMail = CreateObject("CDONTS.NewMail")
objMail.From "yourcompanyname@cp.com"
objMail.TO text1.text ' send mail to
objMail.Subject text2.text 'subj message
objMail.Body Text3.text 'body message
objMail.Send 'Method to send Mail.
Set objMail = nothing 'Kill Reference.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Pull multiple cvs files into one access table 28 69
Adding to a VBA? 6 76
How to make an ADE file by code? 11 94
Excel Automation VBA 19 88
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question