• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 215
  • Last Modified:

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

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
zack_online
Asked:
zack_online
  • 2
1 Solution
 
rajaamirapuCommented:
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
 
rajaamirapuCommented:
Sorry SW_SHOWNORMl should be SW_SHOWNORMAL
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now