Solved

opening default email application

Posted on 2000-03-27
2
135 Views
Last Modified: 2010-05-02
Hi,

I'm creating a VB application which must allow the user to email the system administrator.

Can anyone please tell me how I can create a button that will invoke the default email application??

Any suggestions or help would be greatly appreciated!
cheers,
shovels
0
Comment
Question by:shovels
2 Comments
 
LVL 3

Accepted Solution

by:
Gordonp earned 50 total points
ID: 2660822
you can use ShellExecute to launch an email client using the "mailto:" protocol

ie.

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

then to launch the client


ShellExecute Me.hwnd, "open", "mailto:anyone@home.com", vbNullString, vbNullString, 0


Hope this helps

Gordon
0
 

Expert Comment

by:sljbaqga
ID: 2660836
use MAPI Session and MAPI Message components.To use these the user should have a MAPI compatible mail client.(most of them are)

for more details refer to MSDN
search for
e-mail, composing and managing messages

hope this would be usefull
regards
Prasad

ps. there is a sample app. in MSDN samples called VBMail

other than this i think you could use a hyperlink to execute a mailto: link
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

803 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