Solved

Link my label direct to outlook or my yahoo/hotmail email account

Posted on 2003-11-21
2
197 Views
Last Modified: 2010-05-01
How do i link my label object to any of my email account (outlook,yahoo,hotmail)?  The scenario: i have a clickable label w/ caption "Email" and a textbox. If the user fill up the textbox with his email add and then click the label, automatically popup the outlook express in new email mode plus the email address inserted to the "To:" option. Thanks
0
Comment
Question by:zack_online
  • 2
2 Comments
 
LVL 5

Accepted Solution

by:
rajaamirapu earned 300 total points
ID: 9795504
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
Const SW_SHOWNORMAL = 1
Here is the code
Private Sub Label1_Click()
'URL: http://www.allapi.net/
    'E-Mail: kpdteam@allapi.net
    'Send an E-Mail to the KPD-Team
    ShellExecute Me.hwnd, vbNullString, "mailto:" & Label1.Caption, vbNullString, "C:\", SW_SHOWNORMl
End Sub
0
 
LVL 5

Expert Comment

by:rajaamirapu
ID: 9795512
Sorry SW_SHOWNORMl should be SW_SHOWNORMAL
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

947 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now