Solved

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

Posted on 2003-11-21
2
198 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

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…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

831 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