Results 1 to 3 of 3

Thread: Email

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2002
    Posts
    114

    Email

    how would I make a link to an email address([email protected]) like mailto:[email protected] and when the user clicks on it it opens up a new email with the users default email client and in the address box: [email protected] and in the subject: Support. HELP!!!!

  2. #2
    PowerPoster
    Join Date
    Aug 2000
    Location
    India
    Posts
    2,288
    VB Code:
    1. 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
    2. Const SW_SHOWNORMAL = 1
    3. Private Sub Form_Load()
    4.     'KPD-Team 1998
    5.     'URL: [url]http://www.allapi.net/[/url]
    6.     'E-Mail: [email][email protected][/email]
    7.     'Send an E-Mail to the KPD-Team
    8.     ShellExecute Me.hwnd, vbNullString, "mailto:[email protected]", vbNullString, "C:\", SW_SHOWNORMAL
    9. End Sub

  3. #3
    Frenzied Member John McKernan's Avatar
    Join Date
    Jan 2002
    Location
    SE PA
    Posts
    1,295
    To populate the 'Subject' Line, change the ShellExecute statement to:
    VB Code:
    1. ShellExecute Me.hwnd, vbNullString, "mailto:[email protected]?subject=Support",  _
    2.     vbNullString, "C:\", SW_SHOWNORMAL
    If you want to populate the body with some text:
    VB Code:
    1. ShellExecute Me.hwnd, vbNullString, "mailto:[email protected]?subject=Support&body=Please help quickly",  _
    2.     vbNullString, "C:\", SW_SHOWNORMAL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width