Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

opening default email application

Posted on 2000-03-27
2
Medium Priority
?
143 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 200 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

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

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…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
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…
Suggested Courses

704 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