Solved

opening default email application

Posted on 2000-03-27
2
141 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
[X]
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
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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Suggested Solutions

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

739 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